Subversion Repositories HomeAutomation

Rev

Rev 223 | Blame | Last modification | View Log | SVN | RSS feed

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