mirror of
https://github.com/hathach/tinyusb.git
synced 2026-03-11 18:14:35 +00:00
fix warnings
This commit is contained in:
@ -148,12 +148,12 @@ void board_init(void) {
|
||||
#ifdef USB_CONNECT_PIN
|
||||
void dcd_disconnect(uint8_t rhport) {
|
||||
(void)rhport;
|
||||
HAL_GPIO_WritePin(USB_CONNECT_PORT, USB_CONNECT_PIN, 1-USB_CONNECT_STATE);
|
||||
HAL_GPIO_WritePin(USB_CONNECT_PORT, USB_CONNECT_PIN, (GPIO_PinState)(1 - USB_CONNECT_STATE));
|
||||
}
|
||||
|
||||
void dcd_connect(uint8_t rhport) {
|
||||
(void)rhport;
|
||||
HAL_GPIO_WritePin(USB_CONNECT_PORT, USB_CONNECT_PIN, USB_CONNECT_STATE);
|
||||
HAL_GPIO_WritePin(USB_CONNECT_PORT, USB_CONNECT_PIN, (GPIO_PinState)USB_CONNECT_STATE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -123,7 +123,8 @@ void board_init(void) {
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
void board_led_write(bool state) {
|
||||
HAL_GPIO_WritePin(LED_PORT, LED_PIN, state ? LED_STATE_ON : (1 - LED_STATE_ON));
|
||||
GPIO_PinState pin_state = (GPIO_PinState)(state ? LED_STATE_ON : (1 - LED_STATE_ON));
|
||||
HAL_GPIO_WritePin(LED_PORT, LED_PIN, pin_state);
|
||||
}
|
||||
|
||||
uint32_t board_button_read(void) {
|
||||
|
||||
@ -175,7 +175,10 @@ void board_init(void) {
|
||||
#endif // USB_OTG_HS
|
||||
}
|
||||
|
||||
void board_led_write(bool state) { HAL_GPIO_WritePin(LED_PORT, LED_PIN, state ? LED_STATE_ON : (1 - LED_STATE_ON)); }
|
||||
void board_led_write(bool state) {
|
||||
GPIO_PinState pin_state = (GPIO_PinState)(state ? LED_STATE_ON : (1 - LED_STATE_ON));
|
||||
HAL_GPIO_WritePin(LED_PORT, LED_PIN, pin_state);
|
||||
}
|
||||
|
||||
uint32_t board_button_read(void) { return HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN) == BUTTON_STATE_ACTIVE; }
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ static const uint8_t *const permanent_hwaddr = tud_network_mac_address;
|
||||
|
||||
static usb_eth_stat_t usb_eth_stat = { 0, 0, 0, 0 };
|
||||
static uint32_t oid_packet_filter = 0x0000000;
|
||||
static rndis_state_t rndis_state;
|
||||
TU_ATTR_UNUSED static rndis_state_t rndis_state;
|
||||
|
||||
static const uint32_t OIDSupportedList[] =
|
||||
{
|
||||
|
||||
@ -47,10 +47,10 @@ static const ci_hs_controller_t _ci_controller[] =
|
||||
|
||||
#define CI_HS_REG(_port) ((ci_hs_regs_t*) _ci_controller[_port].reg_base)
|
||||
|
||||
#define CI_DCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum)
|
||||
#define CI_DCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum)
|
||||
#define CI_DCD_INT_ENABLE(_p) NVIC_EnableIRQ ((IRQn_Type)_ci_controller[_p].irqnum)
|
||||
#define CI_DCD_INT_DISABLE(_p) NVIC_DisableIRQ((IRQn_Type)_ci_controller[_p].irqnum)
|
||||
|
||||
#define CI_HCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum)
|
||||
#define CI_HCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum)
|
||||
#define CI_HCD_INT_ENABLE(_p) NVIC_EnableIRQ ((IRQn_Type)_ci_controller[_p].irqnum)
|
||||
#define CI_HCD_INT_DISABLE(_p) NVIC_DisableIRQ((IRQn_Type)_ci_controller[_p].irqnum)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user