mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
LM3s - Fix PWM disable macros, add SPI disable checks
This commit is contained in:
parent
ee3a3be740
commit
7ce3040500
@ -84,10 +84,14 @@
|
|||||||
// forward
|
// forward
|
||||||
static void timers_init();
|
static void timers_init();
|
||||||
static void uarts_init();
|
static void uarts_init();
|
||||||
|
|
||||||
|
#if NUM_SPI > 0
|
||||||
static void spis_init();
|
static void spis_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
static void pios_init();
|
static void pios_init();
|
||||||
|
|
||||||
#ifdef NUM_PWM > 0
|
#if NUM_PWM > 0
|
||||||
static void pwms_init();
|
static void pwms_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -108,8 +112,10 @@ int platform_init()
|
|||||||
// Setup PIO
|
// Setup PIO
|
||||||
pios_init();
|
pios_init();
|
||||||
|
|
||||||
// Setup SSIs
|
#if NUM_SPI > 0
|
||||||
|
// Setup SPIs
|
||||||
spis_init();
|
spis_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Setup UARTs
|
// Setup UARTs
|
||||||
uarts_init();
|
uarts_init();
|
||||||
@ -117,7 +123,7 @@ int platform_init()
|
|||||||
// Setup timers
|
// Setup timers
|
||||||
timers_init();
|
timers_init();
|
||||||
|
|
||||||
#ifdef NUM_PWM > 0
|
#if NUM_PWM > 0
|
||||||
// Setup PWMs
|
// Setup PWMs
|
||||||
pwms_init();
|
pwms_init();
|
||||||
#endif
|
#endif
|
||||||
@ -383,6 +389,8 @@ int platform_can_recv( unsigned id, u32 *canid, u8 *idtype, u8 *len, u8 *data )
|
|||||||
// SPI
|
// SPI
|
||||||
// Same configuration on LM3S8962, LM3S6965, LM3S6918 and LM3S9B92 (2 SPI ports)
|
// Same configuration on LM3S8962, LM3S6965, LM3S6918 and LM3S9B92 (2 SPI ports)
|
||||||
|
|
||||||
|
#if NUM_SPI > 0
|
||||||
|
|
||||||
// All possible LM3S SPIs defs
|
// All possible LM3S SPIs defs
|
||||||
// FIXME this anticipates support for a platform with 2 SPI port
|
// FIXME this anticipates support for a platform with 2 SPI port
|
||||||
// PIN info extracted from LM3S6950 and 5769 datasheets
|
// PIN info extracted from LM3S6950 and 5769 datasheets
|
||||||
@ -458,6 +466,8 @@ void platform_spi_select( unsigned id, int is_select )
|
|||||||
is_select = is_select;
|
is_select = is_select;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // NUM_SPI > 0
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
// UART
|
// UART
|
||||||
// Different configurations for LM3S8962, LM3S6918 (2 UARTs) and LM3S6965, LM3S9B92 (3 UARTs)
|
// Different configurations for LM3S8962, LM3S6918 (2 UARTs) and LM3S6965, LM3S9B92 (3 UARTs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user