mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 12:23:23 +08:00
[fix][lpc21] workaround for init of spi_slave_hs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
#generic spi driver
|
||||
$(TARGET).CFLAGS += -DUSE_SPI
|
||||
$(TARGET).CFLAGS += -DUSE_SPI -DSPI_SLAVE_HS
|
||||
|
||||
ifeq ($(TARGET), sim)
|
||||
else
|
||||
|
||||
@@ -47,7 +47,6 @@ uint8_t spi_slave_hs_tx_insert_idx, spi_slave_hs_tx_extract_idx;
|
||||
uint8_t spi_slave_hs_tx_buffer[SPI_SLAVE_HS_TX_BUFFER_SIZE];
|
||||
|
||||
/* Prototypes */
|
||||
// void spi_init( void ); // -> declared in spi.h
|
||||
static void SSP_ISR(void) __attribute__((naked));
|
||||
|
||||
/* SSPCR0 settings */
|
||||
@@ -105,7 +104,7 @@ static void SSP_ISR(void) __attribute__((naked));
|
||||
#endif
|
||||
|
||||
|
||||
void spi_init(void) {
|
||||
void spi_slave_hs_init(void) {
|
||||
|
||||
/* setup pins for SSP (SCK, MISO, MOSI) */
|
||||
PINSEL1 |= SSP_PINSEL1_SCK | SSP_PINSEL1_MISO | SSP_PINSEL1_MOSI | SSP_PINSEL1_SSEL;
|
||||
|
||||
@@ -143,6 +143,10 @@ void mcu_init(void) {
|
||||
spi3_slave_init();
|
||||
#endif
|
||||
#endif // SPI_SLAVE
|
||||
|
||||
#if SPI_SLAVE_HS
|
||||
spi_slave_hs_init();
|
||||
#endif
|
||||
#endif // USE_SPI
|
||||
|
||||
#ifdef USE_DAC
|
||||
|
||||
@@ -359,4 +359,8 @@ extern bool_t spi_slave_wait(struct spi_periph* p);
|
||||
/** @}*/
|
||||
/** @}*/
|
||||
|
||||
#if SPI_SLAVE_HS
|
||||
extern void spi_slave_hs_init(void);
|
||||
#endif
|
||||
|
||||
#endif /* SPI_H */
|
||||
|
||||
Reference in New Issue
Block a user