Subversion Repositories HomeAutomation

Rev

Rev 378 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. #ifndef BIOS_FUNS_H_
  2. #define BIOS_FUNS_H_
  3.  
  4. #define BIOS_BUILDTYPE_BIOS
  5. #define BIOS_VERSION 0x1005
  6. //#define BIOS_UART
  7.  
  8. #include "bios.h"
  9.  
  10. extern void __bios_start; // Start of BIOS area in flash, from ld-script.
  11.  
  12. //---------------------------------------------------------------------------
  13. // Function prototypes for the exported interface
  14.  
  15. static void reset(void);
  16. #ifdef BIOS_UART
  17. static void bios_putchar(char c);
  18. static char bios_getchar(void);
  19. #endif
  20. static unsigned long timebase_get(void);
  21. static Can_Return_t can_send(Can_Message_t* msg);
  22.  
  23. static bios_t bios_functions = {
  24.     BIOS_VERSION,
  25.     reset,
  26.     can_send,
  27.     0,
  28. #ifdef BIOS_UART
  29.     bios_putchar,
  30.     bios_getchar,
  31. #else
  32.     0,
  33.     0,
  34. #endif
  35.     timebase_get
  36. };
  37.  
  38. #define CAN_ID_NMT_BIOS_START  ((CAN_NMT << CAN_SHIFT_CLASS) \
  39.                               | (CAN_NMT_BIOS_START << CAN_SHIFT_NMT_TYPE) \
  40.                               | (NODE_ID << CAN_SHIFT_NMT_SID))
  41. #define CAN_ID_NMT_PGM_ACK     ((CAN_NMT << CAN_SHIFT_CLASS) \
  42.                               | (CAN_NMT_PGM_ACK << CAN_SHIFT_NMT_TYPE) \
  43.                               | (NODE_ID << CAN_SHIFT_NMT_SID))
  44. #define CAN_ID_NMT_PGM_NACK    ((CAN_NMT << CAN_SHIFT_CLASS) \
  45.                               | (CAN_NMT_PGM_NACK << CAN_SHIFT_NMT_TYPE) \
  46.                               | (NODE_ID << CAN_SHIFT_NMT_SID))
  47.  
  48. #endif /*BIOS_FUNS_H_*/
  49.