ESOS32
ESOSOn32-bitProcessors
esos_hwxxx_ecan.h
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2019 J. W. Bruce ("AUTHOR(S)")"
3  * All rights reserved.
4  * (J. W. Bruce, jwbruce_AT_tntech.edu, Tennessee Tech University)
5  *
6  * Permission to use, copy, modify, and distribute this software and its
7  * documentation for any purpose, without fee, and without written agreement is
8  * hereby granted, provided that the above copyright notice, the following
9  * two paragraphs and the authors appear in all copies of this software.
10  *
11  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
12  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
13  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
14  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15  *
16  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
17  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
19  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
20  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
21  *
22  * Please maintain this header in its entirety when copying/modifying
23  * these files.
24  *
25  *
26  */
27 
40 #ifndef ESOS_HWXXX_ECAN_H
41 #define ESOS_HWXXX_ECAN_H
42 
43 #include "esos.h"
44 #include "esos_hwxxx.h"
45 
46 #define __ESOS_ECAN_HW_NUM_TX_BUFS 1
47 #define __ESOS_ECAN_HW_NUM_BUFS 8
48 
49 #define __ESOS_ECAN_HW_ARE_MESSAGES_WAITING() ( _DMA1IF )
50 #define __ESOS_ECAN_HW_GET_BUFFER_ID() ( C1FIFO & 0x1F )
51 #define __ESOS_ECAN_HW_TX_IN_PROGRESS() ( C1TR01CONbits.TXREQ0 )
52 
53 void __esos_ecan_hw_config_ecan ( void );
54 void __esos_ecan_hw_config_baud ( void );
55 void __esos_ecan_hw_config_rxFilter ( );
56 void __esos_ecan_hw_config_dma_tx ( void );
57 void __esos_ecan_hw_config_dma_rx ( void );
58 void __esos_ecan_hw_mark_message_received ( uint16_t u16_rx_buff_id );
59 void __esos_ecan_hw_format_and_send ( ECANMSG *p_temp_Msg, uint16_t u16_can_id, uint8_t u8_payload_len );
60 
61 #endif /* ESOS_HWXXX_ECAN_H */
esos_hwxxx.h
This is the master include file template for the target hardware (hwxxxx)
esos.h