mirror of https://github.com/ARMmbed/mbed-os.git
SiLabs: Fix compiler warnings and other cleanup
- Compiler warnings fixed - Some private functions marked static - Removed unneeded comments - Some trailing whitespace strippedpull/1501/head
parent
9149e88dd1
commit
20a5bc2ab6
|
|
@ -33,19 +33,18 @@
|
|||
/************ADC***************/
|
||||
/* The third "function" value is used to select the correct ADC channel */
|
||||
const PinMap PinMap_ADC[] = {
|
||||
// Pearl ok
|
||||
{PA0, ADC_0, adcPosSelBUS3XCH8},
|
||||
{PA2, ADC_0, adcPosSelBUS3XCH10},
|
||||
{PA4, ADC_0, adcPosSelBUS3XCH12},
|
||||
{PB12, ADC_0, adcPosSelBUS3XCH28},
|
||||
{PB14, ADC_0, adcPosSelBUS3XCH30},
|
||||
{PC6, ADC_0, adcPosSelBUS1XCH6},
|
||||
{PC7, ADC_0, adcPosSelBUS2XCH7},
|
||||
{PC8, ADC_0, adcPosSelBUS1XCH8},
|
||||
{PC9, ADC_0, adcPosSelBUS2XCH9},
|
||||
{PA2, ADC_0, adcPosSelBUS3XCH10},
|
||||
{PA4, ADC_0, adcPosSelBUS3XCH12},
|
||||
{PB12, ADC_0, adcPosSelBUS3XCH28},
|
||||
{PB14, ADC_0, adcPosSelBUS3XCH30},
|
||||
{PC6, ADC_0, adcPosSelBUS1XCH6},
|
||||
{PC7, ADC_0, adcPosSelBUS2XCH7},
|
||||
{PC8, ADC_0, adcPosSelBUS1XCH8},
|
||||
{PC9, ADC_0, adcPosSelBUS2XCH9},
|
||||
{PC10, ADC_0, adcPosSelBUS1XCH10},
|
||||
{PC11, ADC_0, adcPosSelBUS2XCH11},
|
||||
{PD10, ADC_0, adcPosSelBUS3XCH2},
|
||||
{PC11, ADC_0, adcPosSelBUS2XCH11},
|
||||
{PD10, ADC_0, adcPosSelBUS3XCH2},
|
||||
{PD11, ADC_0, adcPosSelBUS3YCH3},
|
||||
{PD12, ADC_0, adcPosSelBUS3XCH4},
|
||||
{PD13, ADC_0, adcPosSelBUS3YCH5},
|
||||
|
|
@ -63,14 +62,11 @@ const PinMap PinMap_ADC[] = {
|
|||
|
||||
/************DAC***************/
|
||||
const PinMap PinMap_DAC[] = {
|
||||
// Pearl ok
|
||||
{NC , NC , NC}
|
||||
};
|
||||
|
||||
/************I2C SCL***********/
|
||||
const PinMap PinMap_I2C_SCL[] = {
|
||||
// Pearl ok
|
||||
|
||||
/* I2C0 */
|
||||
{PA1, I2C_0, 0},
|
||||
{PA2, I2C_0, 1},
|
||||
|
|
@ -110,9 +106,6 @@ const PinMap PinMap_I2C_SCL[] = {
|
|||
|
||||
/************I2C SDA***********/
|
||||
const PinMap PinMap_I2C_SDA[] = {
|
||||
|
||||
// Pearl ok
|
||||
|
||||
/* I2C0 */
|
||||
{PA0, I2C_0, 0},
|
||||
{PA1, I2C_0, 1},
|
||||
|
|
@ -153,9 +146,6 @@ const PinMap PinMap_I2C_SDA[] = {
|
|||
|
||||
/************PWM***************/
|
||||
const PinMap PinMap_PWM[] = {
|
||||
|
||||
// Pearl ok
|
||||
|
||||
{PA0, PWM_CH0, 0},
|
||||
{PA1, PWM_CH0, 1},
|
||||
{PA2, PWM_CH0, 2},
|
||||
|
|
@ -195,8 +185,6 @@ const PinMap PinMap_PWM[] = {
|
|||
/*************SPI**************/
|
||||
const PinMap PinMap_SPI_MOSI[] = {
|
||||
|
||||
// Pearl ok
|
||||
|
||||
/* USART0 */
|
||||
{PA0, SPI_0, 0},
|
||||
{PA1, SPI_0, 1},
|
||||
|
|
@ -270,8 +258,6 @@ const PinMap PinMap_SPI_MOSI[] = {
|
|||
|
||||
const PinMap PinMap_SPI_MISO[] = {
|
||||
|
||||
// Pearl ok
|
||||
|
||||
/* USART0 */
|
||||
{PA1, SPI_0, 0},
|
||||
{PA2, SPI_0, 1},
|
||||
|
|
@ -345,8 +331,6 @@ const PinMap PinMap_SPI_MISO[] = {
|
|||
|
||||
const PinMap PinMap_SPI_CLK[] = {
|
||||
|
||||
// Pearl ok
|
||||
|
||||
/* USART0 */
|
||||
{PA2, SPI_0, 0},
|
||||
{PA3, SPI_0, 1},
|
||||
|
|
|
|||
|
|
@ -90,12 +90,12 @@ int stdio_uart_inited = 0;
|
|||
serial_t stdio_uart;
|
||||
|
||||
static void uart_irq(UARTName, int, SerialIrq);
|
||||
uint8_t serial_get_index(serial_t *obj);
|
||||
void serial_enable(serial_t *obj, uint8_t enable);
|
||||
void serial_enable_pins(serial_t *obj, uint8_t enable);
|
||||
IRQn_Type serial_get_rx_irq_index(serial_t *obj);
|
||||
IRQn_Type serial_get_tx_irq_index(serial_t *obj);
|
||||
CMU_Clock_TypeDef serial_get_clock(serial_t *obj);
|
||||
static uint8_t serial_get_index(serial_t *obj);
|
||||
static void serial_enable(serial_t *obj, uint8_t enable);
|
||||
static void serial_enable_pins(serial_t *obj, uint8_t enable);
|
||||
static IRQn_Type serial_get_rx_irq_index(serial_t *obj);
|
||||
static IRQn_Type serial_get_tx_irq_index(serial_t *obj);
|
||||
static CMU_Clock_TypeDef serial_get_clock(serial_t *obj);
|
||||
static void serial_dmaSetupChannel(serial_t *obj, bool tx_nrx);
|
||||
|
||||
/* ISRs for RX and TX events */
|
||||
|
|
@ -182,7 +182,7 @@ static void uart_init(serial_t *obj, uint32_t baudrate)
|
|||
* @param obj pointer to serial object
|
||||
* @return internal index of U(S)ART peripheral
|
||||
*/
|
||||
inline uint8_t serial_get_index(serial_t *obj)
|
||||
static inline uint8_t serial_get_index(serial_t *obj)
|
||||
{
|
||||
switch ((uint32_t)obj->serial.periph.uart) {
|
||||
#ifdef UART0
|
||||
|
|
@ -223,7 +223,7 @@ inline uint8_t serial_get_index(serial_t *obj)
|
|||
* @param obj pointer to serial object
|
||||
* @return internal NVIC RX IRQ index of U(S)ART peripheral
|
||||
*/
|
||||
inline IRQn_Type serial_get_rx_irq_index(serial_t *obj)
|
||||
static inline IRQn_Type serial_get_rx_irq_index(serial_t *obj)
|
||||
{
|
||||
switch ((uint32_t)obj->serial.periph.uart) {
|
||||
#ifdef UART0
|
||||
|
|
@ -266,7 +266,7 @@ inline IRQn_Type serial_get_rx_irq_index(serial_t *obj)
|
|||
* @param obj pointer to serial object
|
||||
* @return internal NVIC TX IRQ index of U(S)ART peripheral
|
||||
*/
|
||||
inline IRQn_Type serial_get_tx_irq_index(serial_t *obj)
|
||||
static inline IRQn_Type serial_get_tx_irq_index(serial_t *obj)
|
||||
{
|
||||
switch ((uint32_t)obj->serial.periph.uart) {
|
||||
#ifdef UART0
|
||||
|
|
@ -479,7 +479,7 @@ void serial_preinit(serial_t *obj, PinName tx, PinName rx, int allow_leuart)
|
|||
}
|
||||
}
|
||||
|
||||
void serial_enable_pins(serial_t *obj, uint8_t enable)
|
||||
static void serial_enable_pins(serial_t *obj, uint8_t enable)
|
||||
{
|
||||
if (enable) {
|
||||
/* Configure GPIO pins*/
|
||||
|
|
@ -582,7 +582,7 @@ void serial_free(serial_t *obj)
|
|||
#endif
|
||||
}
|
||||
|
||||
void serial_enable(serial_t *obj, uint8_t enable)
|
||||
static void serial_enable(serial_t *obj, uint8_t enable)
|
||||
{
|
||||
if(LEUART_REF_VALID(obj->serial.periph.leuart)) {
|
||||
if (enable) {
|
||||
|
|
|
|||
|
|
@ -1237,7 +1237,7 @@ uint32_t spi_irq_handler_asynch(spi_t* obj)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
#endif LDMA_PRESENT
|
||||
#endif // LDMA_PRESENT
|
||||
/** Abort an SPI transfer
|
||||
*
|
||||
* @param obj The SPI peripheral to stop
|
||||
|
|
|
|||
Loading…
Reference in New Issue