ols1v.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. // eav1v.h :
  2. //
  3. #if !defined(AGD_PINS_H__9F94DC4E_A195_4754_9727_7DAF2FFB0DE2__INCLUDED_)
  4. #define AGD_PINS_H__9F94DC4E_A195_4754_9727_7DAF2FFB0DE2__INCLUDED_
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif // __cplusplus
  8. /////////////////////////////////////////////////////////////////////////////
  9. // pins.h - Declarations:
  10. //
  11. // GPIO PORTA is used for
  12. //
  13. #define PA0__RX_UART0 GPIO_PIN_0 // PA0 RX_UART0 (UART input)
  14. #define PA1__TX_UART0 GPIO_PIN_1 // PA1 TX_UART0 (UART output)
  15. #define PA2__LED3 GPIO_PIN_2 // PA2 LED3 (digital output)
  16. #define PA3__LED4 GPIO_PIN_3 // PA3 LED4 (digital output)
  17. #define PA4__LED5 GPIO_PIN_4 // PA4 LED5 (digital output)
  18. #define PA5__LED6 GPIO_PIN_5 // PA5 LED6 (digital output)
  19. #define PA6__5V_UART0 GPIO_PIN_6 // PA6 5V_UART0 (digital input)
  20. #define PA7__ GPIO_PIN_7 // PA7 (unused)
  21. //
  22. // GPIO PORTB is used for
  23. //
  24. #define PB0__RX_485_1 GPIO_PIN_0 // PB0 RX_485_1 (UART input)
  25. #define PB1__TX_485_1 GPIO_PIN_1 // PB1 TX_485_1 (UART output)
  26. #define PB2__I2C_WIFI_SCL GPIO_PIN_2 // PB2 I2C_WIFI_SCL (I2C interface)
  27. #define PB3__I2C_WIFI_SDA GPIO_PIN_3 // PB3 I2C_WIFI_SDA (I2C interface)
  28. #define PB4__DIGOUT1 GPIO_PIN_4 // PB4 DIGOUT1 (digital output)
  29. #define PB5__DIGOUT2 GPIO_PIN_5 // PB5 DIGOUT2 (digital output)
  30. #define PB0__LS_ON_ZI3 GPIO_PIN_0 // PB0 LS_ON_ZI3 (digital output)
  31. #define PB1__LS_ON_ZI2 GPIO_PIN_1 // PB1 LS_ON_ZI2 (digital output)
  32. #define PB2__Z_IN1_SCL3 GPIO_PIN_2 // PB2 Z_IN1_SCL3 (TIMER input, I2C interface)
  33. #define PB3__AN_CLK_SDA3 GPIO_PIN_3 // PB3 AN_CLK_SDA3 (TIMER input, I2C interface)
  34. #define PB4__ANIN1 GPIO_PIN_4 // PB4 ANIN1 (analog input)
  35. #define PB5__U_24V_IO GPIO_PIN_5 // PB5 U_24V_IO (analog input)
  36. //
  37. // GPIO PORTC is used for
  38. //
  39. #define PC0__ GPIO_PIN_0 // PC0 (JTAG TCK)
  40. #define PC1__ GPIO_PIN_1 // PC1 (JTAG TMS)
  41. #define PC2__ GPIO_PIN_2 // PC2 (JTAG TDI)
  42. #define PC3__ GPIO_PIN_3 // PC3 (JTAG TDO)
  43. #define PC4__ GPIO_PIN_4 // PC4 (unused)
  44. #define PC5__TASTE GPIO_PIN_5 // PC5 TASTE (digital input)
  45. #define PC6__VREF_ZIN_H GPIO_PIN_6 // PC6 VREF_ZIN_H (analog comparator reference)
  46. #define PC7__ZIN1 GPIO_PIN_7 // PC7 ZIN1 (analog comparator input)
  47. #define PC0__ GPIO_PIN_0 // PC0 (JTAG TCK)
  48. #define PC1__ GPIO_PIN_1 // PC1 (JTAG TMS)
  49. #define PC2__ GPIO_PIN_2 // PC2 (JTAG TDI)
  50. #define PC3__ GPIO_PIN_3 // PC3 (JTAG TDO)
  51. #define PC4__Z_IN2 GPIO_PIN_4 // PC4 Z_IN2 (analog comparator input)
  52. #define PC5__LED_BUS GPIO_PIN_5 // PC5 LED_BUS (digital output)
  53. #define PC6__VREF_ZIN_H GPIO_PIN_6 // PC6 VREF_ZIN_H (analog comparator reference)
  54. #define PC7__Z_IN3 GPIO_PIN_7 // PC7 Z_IN3 (analog comparator input)
  55. //
  56. // GPIO PORTD is used for
  57. //
  58. #define PD0__ANIN_OUT1 GPIO_PIN_0 // PD0 ANIN_OUT1 (analog input)
  59. #define PD1__ANIN4 GPIO_PIN_1 // PD1 ANIN4 (analog input)
  60. #define PD2__ANIN3 GPIO_PIN_2 // PD2 ANIN3 (analog input)
  61. #define PD3__ANIN0 GPIO_PIN_3 // PD3 ANIN0 (analog input)
  62. #define PD4__MP GPIO_PIN_4 // PD4 MP (UART input)
  63. #define PD5__MP GPIO_PIN_5 // PD4 MP (UART output)
  64. #define PD6__ACT_POS GPIO_PIN_6 // PD4 ACT_POS (analog input)
  65. #define PD7__RESTARTB GPIO_PIN_7 // PD4 RESTARTB (digital input)
  66. #define PD0__ANIN_OUT1 GPIO_PIN_0 // PD0 ANIN_OUT1 (analog input)
  67. #define PD1__ANIN_OUT2 GPIO_PIN_1 // PD1 ANIN_OUT2 (analog input)
  68. #define PD2__ANIN_OUT3 GPIO_PIN_2 // PD2 ANIN_OUT3 (analog input)
  69. #define PD3__ANIN_OUT4 GPIO_PIN_3 // PD3 ANIN_OUT4 (analog input)
  70. #define PD4__ANIN4 GPIO_PIN_4 // PD4 ANIN4 (analog input)
  71. #define PD5__ANIN5 GPIO_PIN_5 // PD4 ANIN5 (analog input)
  72. #define PD6__ANIN6 GPIO_PIN_6 // PD4 ANIN6 (analog input)
  73. #define PD7__ANIN0 GPIO_PIN_7 // PD4 ANIN0 (analog input)
  74. //
  75. // GPIO PORTE is used for
  76. //
  77. #define PE0__RX_WIFI2 GPIO_PIN_0 // PE0 RX_WIFI2 (UART input)
  78. #define PE1__TX_WIFI2 GPIO_PIN_1 // PE1 TX_WIFI2 (UART output)
  79. #define PE2__LS_ON_ZI1 GPIO_PIN_2 // PE2 LS_ON_ZI1 (digital output)
  80. #define PE3__ GPIO_PIN_3 // PE3 (unused)
  81. #define PE4__RX_485_2 GPIO_PIN_4 // PE4 RX_485_2 (UART input)
  82. #define PE5__TX_485_2 GPIO_PIN_5 // PE5 TX_485_2 (UART output)
  83. #define PE6__EN_485_2 GPIO_PIN_6 // PE6 EN_485_2 (digital output)
  84. #define PE7__EN_485_1 GPIO_PIN_7 // PE6 EN_485_1 (digital output)
  85. #define PE0__RX_485_1 GPIO_PIN_0 // PE0 RX_485_1 (UART input)
  86. #define PE1__TX_485_1 GPIO_PIN_1 // PE1 TX_485_1 (UART output)
  87. #define PE2__LED_ERR GPIO_PIN_2 // PE2 LED_ERR (digital output)
  88. #define PE3__Z_IN4 GPIO_PIN_3 // PE3 Z_IN4 (analog input)
  89. #define PE4__ANIN2 GPIO_PIN_4 // PE4 ANIN2 (analog input)
  90. #define PE5__ANIN3 GPIO_PIN_5 // PE5 ANIN3 (analog input)
  91. #define PE6__U_VERS GPIO_PIN_6 // PE6 U_VERS (analog input)
  92. #define PE7__U_V15V GPIO_PIN_7 // PE6 U_V15V (analog input)
  93. //
  94. // GPIO PORTF is used for
  95. //
  96. #define PF0__ANZ1_A GPIO_PIN_0 // PF0 ANZ1_A (digital output)
  97. #define PF1__ANZ1_B GPIO_PIN_1 // PF1 ANZ1_B (digital output)
  98. #define PF2__ANZ1_C GPIO_PIN_2 // PF2 ANZ1_C (digital output)
  99. #define PF3__ANZ1_D GPIO_PIN_3 // PF3 ANZ1_D (digital output)
  100. #define PF4__ANZ1_E GPIO_PIN_4 // PF4 ANZ1_E (digital output)
  101. #define PF5__ANZ1_F GPIO_PIN_5 // PF5 ANZ1_F (digital output)
  102. #define PF6__ANZ1_G GPIO_PIN_6 // PF6 ANZ1_G (digital output)
  103. #define PF7__ANZ1_DP GPIO_PIN_7 // PF7 ANZ1_DP (digital output)
  104. #define PF0__nCS_REL GPIO_PIN_0 // PF0 nCS_REL (digital input)
  105. #define PF1__nCS_DA1 GPIO_PIN_1 // PF1 nCS_DA1 (digital input)
  106. #define PF2__nCS_DA2 GPIO_PIN_2 // PF2 nCS_DA2 (digital input)
  107. #define PF3__PWM_CPU GPIO_PIN_3 // PF3 PWM_CPU (digital input)
  108. #define PF4__100Hz GPIO_PIN_4 // PF4 100Hz (TIMER output)
  109. #define PF5__nRES_PER GPIO_PIN_5 // PF5 nRES_PER (digital input)
  110. #define PF6__LED_BETR GPIO_PIN_6 // PF6 LED_BETR (digital output)
  111. #define PF7__LS_ON_ZI4 GPIO_PIN_7 // PF7 LS_ON_ZI3 (digital output)
  112. //
  113. // GPIO PORTG is used for
  114. //
  115. #define PG0__ANZ2_A GPIO_PIN_0 // PG0 ANZ1_A (digital output)
  116. #define PG1__ANZ2_B GPIO_PIN_1 // PG1 ANZ1_B (digital output)
  117. #define PG2__ANZ2_C GPIO_PIN_2 // PG2 ANZ1_C (digital output)
  118. #define PG3__ANZ2_D GPIO_PIN_3 // PG3 ANZ1_D (digital output)
  119. #define PG4__ANZ2_E GPIO_PIN_4 // PG4 ANZ1_E (digital output)
  120. #define PG5__ANZ2_F GPIO_PIN_5 // PG5 ANZ1_F (digital output)
  121. #define PG6__ANZ2_G GPIO_PIN_6 // PG6 ANZ1_G (digital output)
  122. #define PG7__ANZ2_DP GPIO_PIN_7 // PG7 ANZ1_DP (digital output)
  123. #define PG0__REL1 GPIO_PIN_0 // PG0 REL1 (digital output)
  124. #define PG1__REL2 GPIO_PIN_1 // PG1 REL2 (digital output)
  125. #define PG2__REL3 GPIO_PIN_2 // PG2 REL3 (digital output)
  126. #define PG3__REL4 GPIO_PIN_3 // PG3 REL4 (digital output)
  127. #define PG4__PWM_TRIAC GPIO_PIN_4 // PG4 PWM_TRIAC (PWM output)
  128. #define PG5__LS_ON_ZI1 GPIO_PIN_5 // PG5 LS_ON_ZI1 (digital output)
  129. #define PG6__NULLDURCH GPIO_PIN_6 // PG6 NULLDURCH (TIMER input)
  130. #define PG7__Z_IN1 GPIO_PIN_7 // PG7 Z_IN1 (analog comparator input)
  131. //
  132. // GPIO PORTH is used for
  133. //
  134. #define PH0__ANIN2 GPIO_PIN_0 // PH0 ANIN2 (analog input)
  135. #define PH1__ANIN1 GPIO_PIN_1 // PH1 ANIN1 (analog input)
  136. #define PH2__U_DIG_OUT2 GPIO_PIN_2 // PH2 U_DIG_OUT2 (analog input)
  137. #define PH3__U_VERS GPIO_PIN_3 // PH3 U_VERS (analog input)
  138. #define PH4__ST_DO1 GPIO_PIN_4 // PH4 ST_DO1 (digital input)
  139. #define PH5__ST_DO2 GPIO_PIN_5 // PH5 ST_DO2 (digital input)
  140. #define PH6__ GPIO_PIN_6 // PH6 (unused)
  141. #define PH7__PWM_AN1 GPIO_PIN_7 // PH7 PWM_AN1 (PWM output)
  142. #define PH0__LED_IN1 GPIO_PIN_0 // PH0 LED_IN1 (digital output)
  143. #define PH1__LED_IN2 GPIO_PIN_1 // PH1 LED_IN2 (digital output)
  144. #define PH2__LED_IN3 GPIO_PIN_2 // PH2 LED_IN3 (digital output)
  145. #define PH3__LED_IN4 GPIO_PIN_3 // PH3 LED_IN4 (digital output)
  146. #define PH4__PWM4 GPIO_PIN_4 // PG4 PWM4 (PWM output)
  147. #define PH5__PWM3 GPIO_PIN_5 // PG5 PWM3 (PWM output)
  148. #define PH6__PWM2 GPIO_PIN_6 // PG6 PWM2 (PWM output)
  149. #define PH7__PWM1 GPIO_PIN_7 // PG7 PWM1 (PWM output)
  150. //
  151. // GPIO PORTJ is used for
  152. //
  153. #define PJ0__RX_WIFI1 GPIO_PIN_0 // PJ0 RX_WIFI1 (UART input)
  154. #define PJ1__TX_WIFI1 GPIO_PIN_1 // PJ1 TX_WIFI1 (UART output)
  155. #define PJ2__EN_WIFI GPIO_PIN_2 // PJ2 EN_WIFI (digital output)
  156. #define PJ0__EN_V15V GPIO_PIN_0 // PJ0 EN_V15V (digital output)
  157. #define PJ1__EN_V24V_IO GPIO_PIN_1 // PJ1 EN_V24V_IO (digital output)
  158. #define PJ2__EN_485_1 GPIO_PIN_2 // PJ2 EN_485_1 (digital output)
  159. //
  160. // GPIO PORTK is used for
  161. //
  162. #define PK0__SPI_WIFI_CLK GPIO_PIN_0 // PK0 SPI_WIFI_CLK (SPI output)
  163. #define PK1__SPI_WIFI_CS GPIO_PIN_1 // PK1 SPI_WIFI_CS (SPI output)
  164. #define PK2__SPI_WIFI_MISO GPIO_PIN_2 // PK2 SPI_WIFI_MISO (SPI input)
  165. #define PK3__SPI_WIFI_MOSI GPIO_PIN_3 // PK3 SPI_WIFI_MOSI (SPI output)
  166. #define PK0__AN_A0 GPIO_PIN_0 // PK0 AN_A0 (digital input)
  167. #define PK1__AN_A1 GPIO_PIN_1 // PK1 AN_A1 (digital input)
  168. #define PK2__AN_A2 GPIO_PIN_2 // PK2 AN_A2 (digital input)
  169. #define PK3__nAB_DA GPIO_PIN_3 // PK3 nA/B_DA (digital input)
  170. /////////////////////////////////////////////////////////////////////////////
  171. // UART / RS485 / Timer
  172. #define UART_PORT_SYSCTL SYSCTL_PERIPH_GPIOB
  173. #define UART_PORT GPIO_PORTB_BASE
  174. #define UART_BASE_SYSCTL SYSCTL_PERIPH_UART1
  175. #define UART_BASE UART1_BASE
  176. #define UART_INT INT_UART1
  177. #define UART_RX_PIN PB0__RX_485_1
  178. #define UART_TX_PIN PB1__TX_485_1
  179. #define UART_RX_PIN_MUX GPIO_PB0_U1RX
  180. #define UART_TX_PIN_MUX GPIO_PB1_U1TX
  181. #define EN_485_PORT_SYSCTL SYSCTL_PERIPH_GPIOE
  182. #define EN_485_PORT GPIO_PORTE_BASE
  183. #define EN_485_PIN PE7__EN_485_1
  184. /////////////////////////////////////////////////////////////////////////////
  185. #ifdef __cplusplus
  186. }
  187. #endif // __cplusplus
  188. #endif // !defined(AGD_PINS_H__9F94DC4E_A195_4754_9727_7DAF2FFB0DE2__INCLUDED_)