Skip to content

Commit 783c02d

Browse files
committed
MCUXpresso: Update LPC I2C, SPI, UART HAL drivers
Use the individual IP count and not the FlexComm count Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent a934ba0 commit 783c02d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC/i2c_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl)
6969
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM7);
7070
RESET_PeripheralReset(kFC7_RST_SHIFT_RSTn);
7171
break;
72-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 8U)
72+
#if (FSL_FEATURE_SOC_I2C_COUNT > 8U)
7373
case 8:
7474
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM8);
7575
RESET_PeripheralReset(kFC8_RST_SHIFT_RSTn);
7676
break;
7777
#endif
78-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 9U)
78+
#if (FSL_FEATURE_SOC_I2C_COUNT > 9U)
7979
case 9:
8080
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM9);
8181
RESET_PeripheralReset(kFC9_RST_SHIFT_RSTn);

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC/serial_api.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ void serial_init(serial_t *obj, PinName tx, PinName rx)
7979
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM7);
8080
RESET_PeripheralReset(kFC7_RST_SHIFT_RSTn);
8181
break;
82-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 8U)
82+
#if (FSL_FEATURE_SOC_USART_COUNT > 8U)
8383
case 8:
8484
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM8);
8585
RESET_PeripheralReset(kFC8_RST_SHIFT_RSTn);
8686
break;
8787
#endif
88-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 9U)
88+
#if (FSL_FEATURE_SOC_USART_COUNT > 9U)
8989
case 9:
9090
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM9);
9191
RESET_PeripheralReset(kFC9_RST_SHIFT_RSTn);
@@ -225,15 +225,15 @@ void uart7_irq()
225225
uart_irq((status_flags & kUSART_TxFifoEmptyFlag), (status_flags & kUSART_RxFifoNotEmptyFlag), 7);
226226
}
227227

228-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 8U)
228+
#if (FSL_FEATURE_SOC_USART_COUNT > 8U)
229229
void uart8_irq()
230230
{
231231
uint32_t status_flags = USART8->FIFOSTAT;
232232
uart_irq((status_flags & kUSART_TxFifoEmptyFlag), (status_flags & kUSART_RxFifoNotEmptyFlag), 8);
233233
}
234234
#endif
235235

236-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 9U)
236+
#if (FSL_FEATURE_SOC_USART_COUNT > 9U)
237237
void uart9_irq()
238238
{
239239
uint32_t status_flags = USART9->FIFOSTAT;
@@ -277,12 +277,12 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
277277
case 7:
278278
vector = (uint32_t)&uart7_irq;
279279
break;
280-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 8U)
280+
#if (FSL_FEATURE_SOC_USART_COUNT > 8U)
281281
case 8:
282282
vector = (uint32_t)&uart8_irq;
283283
break;
284284
#endif
285-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 9U)
285+
#if (FSL_FEATURE_SOC_USART_COUNT > 9U)
286286
case 9:
287287
vector = (uint32_t)&uart9_irq;
288288
break;

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC/spi_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
114114
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM7);
115115
RESET_PeripheralReset(kFC7_RST_SHIFT_RSTn);
116116
break;
117-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 8U)
117+
#if (FSL_FEATURE_SOC_SPI_COUNT > 8U)
118118
case 8:
119119
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM8);
120120
RESET_PeripheralReset(kFC8_RST_SHIFT_RSTn);
121121
break;
122122
#endif
123-
#if (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 9U)
123+
#if (FSL_FEATURE_SOC_SPI_COUNT > 9U)
124124
case 9:
125125
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM9);
126126
RESET_PeripheralReset(kFC9_RST_SHIFT_RSTn);

0 commit comments

Comments
 (0)