|
11 | 11 | #include <nanoHAL_ConfigurationManager.h> |
12 | 12 | // #include <FreeRTOS.h> |
13 | 13 |
|
14 | | -#if (HAL_USE_I2C == TRUE) |
| 14 | +#if (HAL_USE_I2C_OPTION == TRUE) |
15 | 15 | #include <ti/drivers/I2C.h> |
16 | 16 | #include <win_dev_i2c_native_target.h> |
17 | 17 | #endif |
18 | | -#if (HAL_USE_SPI == TRUE) |
| 18 | +#if (HAL_USE_SPI_OPTION == TRUE) |
19 | 19 | #include <ti/drivers/SPI.h> |
20 | 20 | #include <win_dev_spi_native_target.h> |
21 | 21 | #endif |
| 22 | +#if (HAL_USE_SPI == ON) |
| 23 | +#include <easylink/EasyLink.h> |
| 24 | +#endif |
22 | 25 |
|
23 | 26 | // |
24 | 27 | // Reboot handlers clean up on reboot |
@@ -83,18 +86,18 @@ void nanoHAL_Initialize() |
83 | 86 |
|
84 | 87 | CPU_GPIO_Initialize(); |
85 | 88 |
|
86 | | -#if (HAL_USE_SPI == TRUE) |
| 89 | +#if (HAL_USE_SPI_OPTION == TRUE) |
87 | 90 | nanoSPI_Initialize(); |
88 | 91 | #endif |
89 | 92 |
|
90 | 93 | // no PAL events required until now |
91 | 94 | // PalEvent_Initialize(); |
92 | 95 |
|
93 | | -#if (HAL_USE_I2C == TRUE) |
| 96 | +#if (HAL_USE_I2C_OPTION == TRUE) |
94 | 97 | I2C1_PAL.i2c = NULL; |
95 | 98 | #endif |
96 | 99 |
|
97 | | -#if (HAL_USE_SPI == TRUE) |
| 100 | +#if (HAL_USE_SPI_OPTION == TRUE) |
98 | 101 | SPI1_PAL.masterSpi = NULL; |
99 | 102 | #endif |
100 | 103 |
|
@@ -127,20 +130,24 @@ void nanoHAL_Uninitialize() |
127 | 130 | // TODO need to call this but it's preventing the debug session from starting |
128 | 131 | // Network_Uninitialize(); |
129 | 132 |
|
130 | | -#if (HAL_USE_SPI == TRUE) |
| 133 | +#if (HAL_USE_SPI_OPTION == TRUE) |
131 | 134 | nanoSPI_Uninitialize(); |
132 | 135 | #endif |
133 | 136 |
|
134 | 137 | CPU_GPIO_Uninitialize(); |
135 | 138 |
|
136 | | -#if (HAL_USE_I2C == TRUE) |
| 139 | +#if (HAL_USE_I2C_OPTION == TRUE) |
137 | 140 | I2C_close(I2C1_PAL.i2c); |
138 | 141 | #endif |
139 | 142 |
|
140 | | -#if (HAL_USE_SPI == TRUE) |
| 143 | +#if (HAL_USE_SPI_OPTION == TRUE) |
141 | 144 | SPI_close(SPI1_PAL.masterSpi); |
142 | 145 | #endif |
143 | 146 |
|
| 147 | +#if (HAL_USE_EASYLINK == ON) |
| 148 | + EasyLink_abort(); |
| 149 | +#endif |
| 150 | + |
144 | 151 | Events_Uninitialize(); |
145 | 152 |
|
146 | 153 | HAL_CONTINUATION::Uninitialize(); |
|
0 commit comments