31 #ifndef AT90CAN_PRIVATE_H 32 #define AT90CAN_PRIVATE_H 37 #include <avr/interrupt.h> 48 #if (defined (__AVR_AT90CAN32__) || \ 49 defined (__AVR_AT90CAN64__) || \ 50 defined (__AVR_AT90CAN128__)) && \ 51 BUILD_FOR_AT90CAN == 1 53 #if F_CPU != 16000000UL 54 #error only 16 MHz for F_CPU supported! 57 #define SUPPORT_FOR_AT90CAN__ 1 61 #if CAN_RX_BUFFER_SIZE > 0 66 extern volatile uint8_t _messages_waiting;
69 #if CAN_TX_BUFFER_SIZE > 0 72 extern volatile uint8_t _free_buffer;
75 #if CAN_FORCE_TX_ORDER 76 extern volatile uint8_t _transmission_in_progress ;
80 extern uint8_t _find_free_mob(
void);
83 extern void _disable_mob_interrupt(
uint8_t mob);
86 extern void _enable_mob_interrupt(
uint8_t mob);
101 extern void at90can_copy_message_to_mob(
const can_t *msg);
113 extern bool at90can_copy_mob_to_message(
can_t *msg);
118 extern __attribute__ ((gnu_inline))
inline void _enter_standby_mode(
void)
121 CANGCON = (1 << ABRQ);
124 while (CANGSTA & (1 << RXBSY))
131 while (CANGSTA & (1 << ENFG))
138 extern __attribute__ ((gnu_inline))
inline void _leave_standby_mode(
void)
153 CANGCON = (1 << ENASTB);
156 while ((CANGSTA & (1 << ENFG)) == 0)
164 #endif // AT90CAN_PRIVATE_H
__attribute__((gnu_inline)) inline void spi_start(uint8_t data)
Datenstruktur zum Aufnehmen von CAN Nachrichten.