Skip to content

Commit 44f6cf2

Browse files
committed
Fix compiler warning: unused parameter [-Wunused-parameter]
Fix #44 Signed-off-by: Frederic.Pillon <[email protected]>
1 parent bc20b9e commit 44f6cf2

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

cores/arduino/stm32/analog.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ void HAL_DAC_MspInit(DAC_HandleTypeDef *hdac)
255255
{
256256
GPIO_InitTypeDef GPIO_InitStruct;
257257
GPIO_TypeDef *port;
258+
UNUSED(hdac);
259+
258260
/*##-1- Enable peripherals and GPIO Clocks #################################*/
259261
/* Enable GPIO clock ****************************************/
260262
port = set_GPIO_Port_Clock(STM_PORT(g_current_pin));
@@ -338,6 +340,7 @@ void dac_write_value(PinName pin, uint32_t value, uint8_t do_init)
338340
*/
339341
void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac)
340342
{
343+
UNUSED(hdac);
341344
/* DAC Periph clock disable */
342345
#ifdef __HAL_RCC_DAC1_CLK_DISABLE
343346
__HAL_RCC_DAC1_CLK_DISABLE();

cores/arduino/stm32/interrupt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ void stm32_interrupt_enable(GPIO_TypeDef *port, uint16_t pin, void (*callback)(v
206206
*/
207207
void stm32_interrupt_disable(GPIO_TypeDef *port, uint16_t pin)
208208
{
209+
UNUSED(port);
209210
uint8_t id = get_pin_id(pin);
210211
gpio_irq_conf[id].callback = NULL;
211212

cores/arduino/stm32/uart_emul.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ uint8_t g_rx_data[1];
131131
/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes
132132
* @{
133133
*/
134-
static void uart_emul_timer_irq(stimer_t *obj) {g_uartEmul_config[UART1_EMUL_E].uart_rx_irqHandle();}
134+
static void uart_emul_timer_irq(stimer_t *obj) {UNUSED(obj); g_uartEmul_config[UART1_EMUL_E].uart_rx_irqHandle();}
135135

136136
/**
137137
* @}
@@ -152,6 +152,7 @@ void HAL_UART_Emul_MspInit(UART_Emul_HandleTypeDef *huart)
152152
GPIO_InitTypeDef GPIO_InitStruct;
153153
GPIO_TypeDef *port_rx;
154154
GPIO_TypeDef *port_tx;
155+
UNUSED(huart);
155156

156157
// Enable GPIO clock
157158
port_rx = set_GPIO_Port_Clock(STM_PORT(g_uartEmul_config[UART1_EMUL_E].pin_rx));
@@ -189,6 +190,7 @@ void HAL_UART_Emul_MspDeInit(UART_Emul_HandleTypeDef *huart)
189190
{
190191
GPIO_TypeDef *port_rx = get_GPIO_Port(STM_PORT(g_uartEmul_config[UART1_EMUL_E].pin_rx));
191192
GPIO_TypeDef *port_tx = get_GPIO_Port(STM_PORT(g_uartEmul_config[UART1_EMUL_E].pin_tx));
193+
UNUSED(huart);
192194

193195
__UART_EMUL_CLK_DISABLE();
194196

0 commit comments

Comments
 (0)