1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/ucglib: silence -Wcast-align

This commit is contained in:
Marian Buschsieweke 2021-11-12 16:12:51 +01:00
parent c50c5ea436
commit a6eaddb818
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -90,8 +90,11 @@ int16_t ucg_com_hw_spi_riotos(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *da
/* setup SPI */
spi_init_pins(dev);
spi_acquire(dev, GPIO_UNDEF, SPI_MODE_0,
ucg_serial_clk_speed_to_spi_speed(((ucg_com_info_t *)data)->serial_clk_speed));
/* correct alignment of data can be assumed, as in pkg callers use
* ucg_com_info_t to allocate memory */
ucg_com_info_t *info = (void *)(uintptr_t)data;
spi_clk_t speed = ucg_serial_clk_speed_to_spi_speed(info->serial_clk_speed);
spi_acquire(dev, GPIO_UNDEF, SPI_MODE_0, speed);
break;
case UCG_COM_MSG_POWER_DOWN: