No Description

GlobalDef.h 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*--------------------------------------------------------------------------------------------------
  2. Name : GlobalDef.h
  3. Description : Global definitions.
  4. History : 2004/04/06 - Created by Louis Frigon.
  5. --------------------------------------------------------------------------------------------------*/
  6. #ifndef _GLOBALDEF_H_
  7. #define _GLOBALDEF_H_
  8. #include <avr/io.h>
  9. /*--------------------------------------------------------------------------------------------------
  10. Constants
  11. --------------------------------------------------------------------------------------------------*/
  12. #define FALSE 0
  13. #define TRUE (!FALSE)
  14. // AVC LAN bus directly connected to internal analog comparator (PD6/7)
  15. // PD6 AIN0 +
  16. // PD7 AIN1 -
  17. #define DATAIN_PIN ACSR
  18. #define DATAIN ACO
  19. #define INPUT_IS_SET ( bit_is_set( DATAIN_PIN, DATAIN ) )
  20. #define INPUT_IS_CLEAR ( bit_is_clear( DATAIN_PIN, DATAIN ) )
  21. #define LED_DDR DDRB
  22. #define LED_PORT PORTB
  23. #define LEDOUT _BV(PORT5)
  24. /*--------------------------------------------------------------------------------------------------
  25. Type definitions
  26. --------------------------------------------------------------------------------------------------*/
  27. typedef unsigned char byte;
  28. typedef unsigned int word;
  29. /*--------------------------------------------------------------------------------------------------
  30. Prototypes
  31. --------------------------------------------------------------------------------------------------*/
  32. inline void LedOff( void );
  33. inline void LedOn( void );
  34. #endif // _GLOBALDEF_H_
  35. /*--------------------------------------------------------------------------------------------------
  36. End of file.
  37. --------------------------------------------------------------------------------------------------*/