本文整理汇总了C++中stm32_gpiowrite函数的典型用法代码示例。如果您正苦于以下问题:C++ stm32_gpiowrite函数的具体用法?C++ stm32_gpiowrite怎么用?C++ stm32_gpiowrite使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了stm32_gpiowrite函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stm32_configgpio
void
PX4FMU::gpio_reset(void)
{
/*
* Setup default GPIO config - all pins as GPIOs, input if
* possible otherwise output if possible.
*/
for (unsigned i = 0; i < _ngpio; i++) {
if (_gpio_tab[i].input != 0) {
stm32_configgpio(_gpio_tab[i].input);
} else if (_gpio_tab[i].output != 0) {
stm32_configgpio(_gpio_tab[i].output);
}
}
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V1)
/* if we have a GPIO direction control, set it to zero (input) */
stm32_gpiowrite(GPIO_GPIO_DIR, 0);
stm32_configgpio(GPIO_GPIO_DIR);
#endif
}
示例2: stm32_spiinitialize
__EXPORT void weak_function stm32_spiinitialize(void)
{
stm32_configgpio(GPIO_SPI_CS_DATAFLASH);
stm32_configgpio(GPIO_SPI_CS_BMP280);
stm32_configgpio(GPIO_SPI_CS_MPU6000);
stm32_configgpio(GPIO_SPI_CS_SDCARD);
stm32_configgpio(GPIO_SPI_CS_EXP_MPU6000);
stm32_configgpio(GPIO_SPI_CS_EXP_FREE);
stm32_configgpio(GPIO_SPI_CS_EXP_HMC5983);
/* De-activate all peripherals,
* required for some peripheral
* state machines
*/
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_BMP280, 1);
stm32_gpiowrite(GPIO_SPI_CS_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_SDCARD, 1);
stm32_gpiowrite(GPIO_SPI_CS_EXP_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_EXP_FREE, 1);
stm32_gpiowrite(GPIO_SPI_CS_EXP_HMC5983, 1);
}
示例3: stm32_spi3select
__EXPORT void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
/* SPI select is active low, so write !selected to select the device */
switch (devid) {
case SPIDEV_MMCSD:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_SDCARD, !selected);
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
break;
case SPIDEV_FLASH:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, !selected);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_SDCARD, 1);
break;
default:
break;
}
}
示例4: arch_sporadic_lowpriority
void arch_sporadic_lowpriority(FAR struct tcb_s *tcb)
{
stm32_gpiowrite(GPIO_SCHED_HIGHPRI, false);
}
示例5: stm32_spi1select
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
stm32_gpiowrite(GPIO_MEMS_CS, !selected);
}
示例6: board_spi_reset
__EXPORT void board_spi_reset(int ms)
{
// TODO: DRDY
///* disable SPI bus 1 DRDY */
//stm32_configgpio(GPIO_DRDY_OFF_PORTD_PIN15);
//stm32_configgpio(GPIO_DRDY_OFF_PORTC_PIN14);
//stm32_configgpio(GPIO_DRDY_OFF_PORTE_PIN12);
//stm32_gpiowrite(GPIO_DRDY_OFF_PORTD_PIN15, 0);
//stm32_gpiowrite(GPIO_DRDY_OFF_PORTC_PIN14, 0);
//stm32_gpiowrite(GPIO_DRDY_OFF_PORTE_PIN12, 0);
/* disable SPI bus 1 CS */
stm32_configgpio(GPIO_SPI1_CS_MEMS_OFF);
stm32_gpiowrite(GPIO_SPI1_CS_MEMS_OFF, 0);
/* disable SPI bus 2 CS */
stm32_configgpio(GPIO_SPI2_CS_SDCARD_OFF);
stm32_gpiowrite(GPIO_SPI2_CS_SDCARD_OFF, 0);
/* disable SPI bus 3 CS */
stm32_configgpio(GPIO_SPI3_CS_BARO_OFF);
stm32_gpiowrite(GPIO_SPI3_CS_BARO_OFF, 0);
stm32_configgpio(GPIO_SPI3_CS_OSD_OFF);
stm32_gpiowrite(GPIO_SPI3_CS_OSD_OFF, 0);
/* disable SPI bus 1*/
stm32_configgpio(GPIO_SPI1_SCK_OFF);
stm32_configgpio(GPIO_SPI1_MISO_OFF);
stm32_configgpio(GPIO_SPI1_MOSI_OFF);
stm32_gpiowrite(GPIO_SPI1_SCK_OFF, 0);
stm32_gpiowrite(GPIO_SPI1_MISO_OFF, 0);
stm32_gpiowrite(GPIO_SPI1_MOSI_OFF, 0);
/* disable SPI bus 2*/
stm32_configgpio(GPIO_SPI2_SCK_OFF);
stm32_configgpio(GPIO_SPI2_MISO_OFF);
stm32_configgpio(GPIO_SPI2_MOSI_OFF);
stm32_gpiowrite(GPIO_SPI2_SCK_OFF, 0);
stm32_gpiowrite(GPIO_SPI2_MISO_OFF, 0);
stm32_gpiowrite(GPIO_SPI2_MOSI_OFF, 0);
/* disable SPI bus 3*/
stm32_configgpio(GPIO_SPI3_SCK_OFF);
stm32_configgpio(GPIO_SPI3_MISO_OFF);
stm32_configgpio(GPIO_SPI3_MOSI_OFF);
stm32_gpiowrite(GPIO_SPI3_SCK_OFF, 0);
stm32_gpiowrite(GPIO_SPI3_MISO_OFF, 0);
stm32_gpiowrite(GPIO_SPI3_MOSI_OFF, 0);
/* wait a bit before starting SPI, different times didn't influence results */
usleep(100);
stm32_spiinitialize();
stm32_configgpio(GPIO_SPI1_SCK);
stm32_configgpio(GPIO_SPI1_MISO);
stm32_configgpio(GPIO_SPI1_MOSI);
// TODO: why do we not enable SPI2 here?
stm32_configgpio(GPIO_SPI3_SCK);
stm32_configgpio(GPIO_SPI3_MISO);
stm32_configgpio(GPIO_SPI3_MOSI);
}
示例7: nsh_archinitialize
__EXPORT int nsh_archinitialize(void)
{
int result;
message("\n");
/* configure always-on ADC pins */
stm32_configgpio(GPIO_ADC1_IN0);
stm32_configgpio(GPIO_ADC1_IN10);
stm32_configgpio(GPIO_ADC1_IN11);
stm32_configgpio(GPIO_UART_SBUS_INVERTER);
#ifdef CONFIG_RC_INPUTS_TYPE(RC_INPUT_SBUS)
stm32_gpiowrite(GPIO_UART_SBUS_INVERTER, 1);
#else
stm32_gpiowrite(GPIO_UART_SBUS_INVERTER, 0);
#endif
/* configure the high-resolution time/callout interface */
hrt_init();
/* configure CPU load estimation */
#ifdef CONFIG_SCHED_INSTRUMENTATION
cpuload_initialize_once();
#endif
/* initial BUZZER state */
drv_buzzer_start();
buzzer_off(BUZZER_EXT);
/* initial LED state */
drv_led_start();
led_off(LED_AMBER);
led_off(LED_BLUE);
led_off(LED_GREEN);
led_off(LED_EXT1);
led_off(LED_EXT2);
/* Configure SPI-based devices */
message("[boot] Initializing SPI port 1\n");
spi1 = up_spiinitialize(1);
if (!spi1) {
message("[boot] FAILED to initialize SPI port 1\r\n");
led_on(LED_AMBER);
return -ENODEV;
}
/* Default SPI1 to 1MHz and de-assert the known chip selects. */
SPI_SETFREQUENCY(spi1, 10000000);
SPI_SETBITS(spi1, 8);
SPI_SETMODE(spi1, SPIDEV_MODE3);
SPI_SELECT(spi1, GPIO_SPI_CS_MS5611, false);
SPI_SELECT(spi1, GPIO_SPI_CS_EXP_MS5611, false);
SPI_SELECT(spi1, GPIO_SPI_CS_EXP_MPU6000, false);
SPI_SELECT(spi1, GPIO_SPI_CS_EXP_HMC5983, false);
SPI_SELECT(spi1, GPIO_SPI_CS_EXP_WIFI_EEPROM, false);
up_udelay(20);
message("[boot] Successfully initialized SPI port 1\r\n");
// message("[boot] Initializing Wireless Module\n");
// wireless_archinitialize();
message("[boot] Initializing SPI port 2\n");
spi2 = up_spiinitialize(2);
if (!spi2) {
message("[boot] FAILED to initialize SPI port 2\r\n");
led_on(LED_AMBER);
return -ENODEV;
}
/* Default SPI2 to 1MHz and de-assert the known chip selects. */
SPI_SETFREQUENCY(spi2, 10000000);
SPI_SETBITS(spi2, 8);
SPI_SETMODE(spi2, SPIDEV_MODE3);
SPI_SELECT(spi2, GPIO_SPI_CS_MPU6000, false);
SPI_SELECT(spi2, GPIO_SPI_CS_IMU_MS5611, false);
SPI_SELECT(spi2, GPIO_SPI_CS_IMU_MPU6000, false);
//.........这里部分代码省略.........
示例8: stm32_spi1select
__EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
/* SPI select is active low, so write !selected to select the device */
switch (devid) {
case PX4_SPIDEV_ICM:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU9250, 1);
stm32_gpiowrite(GPIO_SPI_CS_HMC5983, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_ICM_20608_G, !selected);
break;
case PX4_SPIDEV_ACCEL_MAG:
/* Making sure the other peripherals are not selected */
break;
case PX4_SPIDEV_BARO:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU9250, 1);
stm32_gpiowrite(GPIO_SPI_CS_HMC5983, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, !selected);
stm32_gpiowrite(GPIO_SPI_CS_ICM_20608_G, 1);
break;
case PX4_SPIDEV_HMC:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU9250, 1);
stm32_gpiowrite(GPIO_SPI_CS_HMC5983, !selected);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_ICM_20608_G, 1);
break;
case PX4_SPIDEV_MPU:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU9250, !selected);
stm32_gpiowrite(GPIO_SPI_CS_HMC5983, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_ICM_20608_G, 1);
break;
default:
break;
}
}
示例9: stm32_spi1select
__EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
/* SPI select is active low, so write !selected to select the device */
switch (devid) {
case SPIDEV_FLASH:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, !selected);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, 1);
break;
case SPIDEV_EEPROM:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, !selected);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
break;
case SPIDEV_DF_EXT1:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, !selected);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
break;
case SPIDEV_DF_EXT2:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, !selected);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
break;
case SPIDEV_DF_EXT3:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, !selected);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
break;
case SPIDEV_DF_EXT4:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, !selected);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
break;
case SPIDEV_DF_EXT5:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, !selected);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
break;
case SPIDEV_MS5611:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MS5611, !selected);
stm32_gpiowrite(GPIO_SPI_CS_DATAFLASH, 1);
stm32_gpiowrite(GPIO_SPI_CS_EEPROM, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT1, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT2, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT3, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT4, 1);
stm32_gpiowrite(GPIO_SPI_CS_DF_EXT5, 1);
break;
default:
break;
}
//.........这里部分代码省略.........
示例10: nsh_archinitialize
__EXPORT int nsh_archinitialize(void)
{
int result;
message("\n");
/* configure always-on ADC pins */
stm32_configgpio(GPIO_ADC1_IN10);
stm32_configgpio(GPIO_ADC1_IN11);
#if APM_BUILD_TYPE(APM_BUILD_ArduPlane)
stm32_configgpio(GPIO_GPIO0_INPUT);
stm32_configgpio(GPIO_ADC1_IN14);
#endif
stm32_configgpio(GPIO_UART_SBUS_INVERTER);
#if CONFIG_RC_INPUTS_TYPE(RC_INPUT_SBUS)
stm32_gpiowrite(GPIO_UART_SBUS_INVERTER, 1);
#else
stm32_gpiowrite(GPIO_UART_SBUS_INVERTER, 0);
#endif
/* configure the high-resolution time/callout interface */
hrt_init();
/* configure the DMA allocator */
dma_alloc_init();
/* configure CPU load estimation */
#ifdef CONFIG_SCHED_INSTRUMENTATION
cpuload_initialize_once();
#endif
/* set up the serial DMA polling */
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
/* initial BUZZER state */
drv_buzzer_start();
buzzer_off(BUZZER_EXT);
/* initial LED state */
drv_led_start();
led_off(LED_AMBER);
led_off(LED_BLUE);
led_off(LED_GREEN);
led_off(LED_EXT1);
led_off(LED_EXT2);
/* Configure SPI-based devices */
message("[boot] Initializing SPI port 1\n");
spi1 = up_spiinitialize(1);
if (!spi1) {
message("[boot] FAILED to initialize SPI port 1\r\n");
led_on(LED_AMBER);
return -ENODEV;
}
/* Default SPI1 to 1MHz and de-assert the known chip selects. */
SPI_SETFREQUENCY(spi1, 10000000);
SPI_SETBITS(spi1, 8);
SPI_SETMODE(spi1, SPIDEV_MODE3);
SPI_SELECT(spi1, SPIDEV_WIRELESS, false);
SPI_SELECT(spi1, SPIDEV_FLASH, false);
SPI_SELECT(spi1, SPIDEV_MS5611, false);
SPI_SELECT(spi1, SPIDEV_EXP_MS5611, false);
SPI_SELECT(spi1, SPIDEV_EXP_MPU6000, false);
SPI_SELECT(spi1, SPIDEV_EXP_HMC5983, false);
up_udelay(20);
message("[boot] Successfully initialized SPI port 1\r\n");
message("[boot] Initializing SPI port 2\n");
spi2 = up_spiinitialize(2);
if (!spi2) {
message("[boot] FAILED to initialize SPI port 2\r\n");
led_on(LED_AMBER);
return -ENODEV;
}
/* Default SPI2 to 1MHz and de-assert the known chip selects. */
SPI_SETFREQUENCY(spi2, 10000000);
SPI_SETBITS(spi2, 8);
//.........这里部分代码省略.........
示例11: stm32_usbpullup
int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable)
{
usbtrace(TRACE_DEVPULLUP, (uint16_t)enable);
stm32_gpiowrite(GPIO_USB_PULLUP, !enable);
return OK;
}
示例12: phy_set_led
static void phy_set_led(int led, bool state)
{
/* Active High */
stm32_gpiowrite(g_ledmap[led], state);
}
示例13: arch_sporadic_start
void arch_sporadic_start(FAR struct tcb_s *tcb)
{
stm32_gpiowrite(GPIO_SCHED_HIGHPRI, true);
}
示例14: stm32_gpiowrite
void
PWMIN::_turn_off()
{
stm32_gpiowrite(GPIO_VDD_RANGEFINDER_EN, 0);
}
示例15: stm32_spi2select
__EXPORT void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
/* SPI select is active low, so write !selected to select the device */
switch (devid) {
case SPIDEV_MPU6000:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU6000, !selected);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_HMC5983, 1);
break;
case SPIDEV_IMU_MS5611:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MS5611, !selected);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_HMC5983, 1);
break;
case SPIDEV_IMU_MPU6000:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MPU6000, !selected);
stm32_gpiowrite(GPIO_SPI_CS_IMU_HMC5983, 1);
break;
case SPIDEV_IMU_HMC5983:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_MPU6000, 1);
stm32_gpiowrite(GPIO_SPI_CS_IMU_HMC5983, !selected);
break;
default:
break;
}
}