25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

92 lines
2.9 KiB

  1. // ---------------
  2. // Pin Defines
  3. // ---------------
  4. #define LED_PORT PORTB
  5. #define LED_PIN PINB
  6. #define LED_DDR DDRB
  7. #define LED0 PB0
  8. #define LED1 PB1
  9. #define LED2 PB2
  10. #define LED3 PB3
  11. #define LED4 PB4
  12. #define LED5 PB5
  13. #define LED6 PB6
  14. #define LED7 PB7
  15. #define BUTTON_PORT PORTD
  16. #define BUTTON_PIN PIND
  17. #define BUTTON_DDR DDRD
  18. #define BUTTON PD2
  19. #define BUTTON2 PD3
  20. #define BUTTON3 PD4
  21. #define SPEAKER PD6 /* OC0A */
  22. #define SPEAKER_PORT PORTD
  23. #define SPEAKER_PIN PIND
  24. #define SPEAKER_DDR DDRD
  25. #define ANTENNA PD5 /* OC0B */
  26. #define ANTENNA_PORT PORTD
  27. #define ANTENNA_PIN PIND
  28. #define ANTENNA_DDR DDRD
  29. #define MODULATION PD3 /* OC2B */
  30. #define MODULATION_PORT PORTD
  31. #define MODULATION_PIN PIND
  32. #define MODULATION_DDR DDRD
  33. #define LIGHT_SENSOR PC0 /* ADC0 */
  34. #define LIGHT_SENSOR_PORT PORTC
  35. #define LIGHT_SENSOR_PIN PINC
  36. #define LIGHT_SENSOR_DDR DDRC
  37. #define CAP_SENSOR PC1 /* ADC1 */
  38. #define CAP_SENSOR_PORT PORTC
  39. #define CAP_SENSOR_PIN PINC
  40. #define CAP_SENSOR_DDR DDRC
  41. #define PIEZO PC2 /* ADC2 */
  42. #define PIEZO_PORT PORTC
  43. #define PIEZO_PIN PINC
  44. #define PIEZO_DDR DDRC
  45. #define POT PC3 /* ADC3 */
  46. #define POT_PORT PORTC
  47. #define POT_PIN PINC
  48. #define POT_DDR DDRC
  49. // SPI and I2C serial mode defines
  50. #define SPI_SS PB2
  51. #define SPI_SS_PORT PORTB
  52. #define SPI_SS_PIN PINB
  53. #define SPI_SS_DDR DDRB
  54. #define SPI_MOSI PB3
  55. #define SPI_MOSI_PORT PORTB
  56. #define SPI_MOSI_PIN PINB
  57. #define SPI_MOSI_DDR DDRB
  58. #define SPI_MISO PB4
  59. #define SPI_MISO_PORT PORTB
  60. #define SPI_MISO_PIN PINB
  61. #define SPI_MISO_DDR DDRB
  62. #define SPI_SCK PB5
  63. #define SPI_SCK_PORT PORTB
  64. #define SPI_SCK_PIN PINB
  65. #define SPI_SCK_DDR DDRB
  66. #define I2C_SDA PC4
  67. #define I2C_SDA_PORT PORTC
  68. #define I2C_SDA_PIN PINC
  69. #define I2C_SDA_DDR DDRC
  70. #define I2C_SCL PC5
  71. #define I2C_SCL_PORT PORTC
  72. #define I2C_SCL_PIN PINC
  73. #define I2C_SCL_DDR DDRC