Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef BIOS_H_
  2. #define BIOS_H_
  3.  
  4. #define F_CPU 8000000UL
  5. #define F_BAUD  31250UL
  6. #define NODE_ID 1
  7.  
  8. #include "can.h"
  9.  
  10. //---------------------------------------------------------------------------
  11. // Public function structure definition and declaration
  12.  
  13. typedef struct bios{
  14.     unsigned version;
  15.     void (*reset)(void);
  16.     Can_Return_t (*can_send)(Can_Message_t* msg);
  17.     void (*can_callback)(Can_Message_t *msg);
  18.     void (*debug_putchar)(char c);
  19.     char (*debug_getchar)(void);
  20.     unsigned long (*timebase_get)(void);
  21. } bios_t;
  22.  
  23. static bios_t bios_functions __attribute__ ((section (".bios_interface")));
  24.  
  25. static bios_t *bios __attribute__ ((used)) = (bios_t*)&bios_functions;
  26.  
  27. #endif /*BIOS_H_*/
  28.