Rev 1764 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1449 | myhrman | 1 | #ifndef SNS_SERIAL |
| 2 | #define SNS_SERIAL |
||
| 3 | |||
| 4 | /*----------------------------------------------------------------------------- |
||
| 5 | * Includes |
||
| 6 | *---------------------------------------------------------------------------*/ |
||
| 7 | /* system files */ |
||
| 8 | #include <avr/io.h> |
||
| 9 | #include <avr/interrupt.h> |
||
| 10 | #include <stdio.h> |
||
| 11 | /* lib files */ |
||
| 12 | #include <config.h> |
||
| 13 | #include <bios.h> |
||
| 14 | #include <drivers/can/stdcan.h> |
||
| 15 | #include <drivers/timer/timer.h> |
||
| 16 | #include <drivers/mcu/gpio.h> |
||
| 17 | #include <drivers/adc/adc.h> |
||
| 18 | #include <drivers/uart/uart.h> |
||
| 19 | |||
| 20 | //to use PCINT lib. uncomment the line below |
||
| 21 | //#include <drivers/mcu/pcint.h> |
||
| 22 | |||
| 23 | void sns_Serial_Init(void); |
||
| 24 | void sns_Serial_Process(void); |
||
| 25 | void sns_Serial_HandleMessage(StdCan_Msg_t *rxMsg); |
||
| 26 | void sns_Serial_List(uint8_t ModuleSequenceNumber); |
||
| 27 | |||
| 28 | |||
| 1978 | arune | 29 | #ifndef sns_Serial_USEEEPROM |
| 30 | #define sns_Serial_USEEEPROM 0 |
||
| 31 | #endif |
||
| 32 | |||
| 33 | #if sns_Serial_USEEEPROM==1 |
||
| 1764 | myhrman | 34 | struct sns_Serial_Data { |
| 1555 | myhrman | 35 | uint32_t baudRate; |
| 36 | uint16_t format; |
||
| 1582 | myhrman | 37 | uint8_t databits; |
| 38 | uint8_t stopbits; |
||
| 39 | uint8_t parityMode; |
||
| 1764 | myhrman | 40 | uint8_t dataTimeout; |
| 41 | uint8_t packetLength; |
||
| 42 | uint8_t prefixLength; |
||
| 43 | uint8_t suffixLength; |
||
| 44 | uint8_t prefixPattern[3]; |
||
| 45 | uint8_t suffixPattern[3]; |
||
| 1449 | myhrman | 46 | }; |
| 47 | #endif |
||
| 48 | |||
| 49 | #endif // SNS_SERIAL |