From c628529e2de9f128ce3e38ae14f36ea1258c2df5 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 17 Apr 2022 14:01:48 +0800 Subject: [PATCH] arch/arm: Remove FAR and CODE from board folder(3) Signed-off-by: Xiang Xiao --- .../samd21-xplained/src/sam_ug2832hsweg04.c | 10 +- boards/arm/stm32/axoloti/src/stm32_adau1961.c | 14 +- boards/arm/stm32/axoloti/src/stm32_boot.c | 2 +- boards/arm/stm32/axoloti/src/stm32_bringup.c | 2 +- boards/arm/stm32/axoloti/src/stm32_buttons.c | 2 +- boards/arm/stm32/axoloti/src/stm32_sdio.c | 4 +- boards/arm/stm32/axoloti/src/stm32_usbhost.c | 2 +- .../stm32/b-g431b-esc1/src/stm32_buttons.c | 2 +- boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c | 52 +++--- .../stm32/clicker2-stm32/src/stm32_appinit.c | 2 +- .../clicker2-stm32/src/stm32_automount.c | 52 +++--- .../stm32/clicker2-stm32/src/stm32_buttons.c | 2 +- .../stm32/clicker2-stm32/src/stm32_mmcsd.c | 28 ++-- .../stm32/clicker2-stm32/src/stm32_mrf24j40.c | 26 +-- .../arm/stm32/clicker2-stm32/src/stm32_spi.c | 18 +-- .../arm/stm32/clicker2-stm32/src/stm32_usb.c | 2 +- .../arm/stm32/clicker2-stm32/src/stm32_xbee.c | 38 ++--- .../arm/stm32/cloudctrl/src/stm32_buttons.c | 2 +- boards/arm/stm32/cloudctrl/src/stm32_spi.c | 8 +- boards/arm/stm32/cloudctrl/src/stm32_usb.c | 4 +- boards/arm/stm32/cloudctrl/src/stm32_w25.c | 4 +- .../arm/stm32/common/include/stm32_ihm07m1.h | 2 +- .../arm/stm32/common/include/stm32_ihm08m1.h | 2 +- .../arm/stm32/common/include/stm32_ihm16m1.h | 2 +- .../arm/stm32/common/include/stm32_ssd1306.h | 2 +- boards/arm/stm32/common/src/stm32_apa102.c | 2 +- boards/arm/stm32/common/src/stm32_apds9960.c | 14 +- boards/arm/stm32/common/src/stm32_bh1750.c | 2 +- boards/arm/stm32/common/src/stm32_bmp180.c | 2 +- boards/arm/stm32/common/src/stm32_dhtxx.c | 16 +- boards/arm/stm32/common/src/stm32_hcsr04.c | 50 +++--- boards/arm/stm32/common/src/stm32_ihm07m1.c | 54 +++---- boards/arm/stm32/common/src/stm32_ihm08m1.c | 54 +++---- boards/arm/stm32/common/src/stm32_ihm16m1.c | 54 +++---- boards/arm/stm32/common/src/stm32_ina219.c | 2 +- boards/arm/stm32/common/src/stm32_l3gd20.c | 4 +- .../arm/stm32/common/src/stm32_lcd_backpack.c | 4 +- boards/arm/stm32/common/src/stm32_lis3dsh.c | 2 +- boards/arm/stm32/common/src/stm32_lm75.c | 2 +- boards/arm/stm32/common/src/stm32_max31855.c | 2 +- boards/arm/stm32/common/src/stm32_max6675.c | 2 +- boards/arm/stm32/common/src/stm32_mlx90614.c | 2 +- boards/arm/stm32/common/src/stm32_mpl115a.c | 2 +- boards/arm/stm32/common/src/stm32_nrf24l01.c | 10 +- boards/arm/stm32/common/src/stm32_nunchuck.c | 2 +- boards/arm/stm32/common/src/stm32_ssd1306.c | 8 +- boards/arm/stm32/common/src/stm32_veml6070.c | 2 +- boards/arm/stm32/common/src/stm32_ws2812.c | 2 +- boards/arm/stm32/common/src/stm32_xen1210.c | 32 ++-- boards/arm/stm32/common/src/stm32_zerocross.c | 14 +- .../stm32/fire-stm32v2/src/stm32_appinit.c | 2 +- .../stm32/fire-stm32v2/src/stm32_buttons.c | 2 +- .../stm32/fire-stm32v2/src/stm32_enc28j60.c | 24 +-- .../arm/stm32/fire-stm32v2/src/stm32_mmcsd.c | 2 +- boards/arm/stm32/fire-stm32v2/src/stm32_spi.c | 8 +- .../arm/stm32/fire-stm32v2/src/stm32_usbdev.c | 4 +- boards/arm/stm32/fire-stm32v2/src/stm32_w25.c | 4 +- .../stm32/hymini-stm32v/src/stm32_appinit.c | 4 +- .../stm32/hymini-stm32v/src/stm32_buttons.c | 2 +- .../stm32/hymini-stm32v/src/stm32_r61505u.c | 30 ++-- .../arm/stm32/hymini-stm32v/src/stm32_spi.c | 12 +- .../stm32/hymini-stm32v/src/stm32_ssd1289.c | 28 ++-- boards/arm/stm32/hymini-stm32v/src/stm32_ts.c | 24 +-- .../stm32/hymini-stm32v/src/stm32_usbdev.c | 4 +- .../stm32/hymini-stm32v/src/stm32_usbmsc.c | 2 +- boards/arm/stm32/maple/src/stm32_lcd.c | 6 +- boards/arm/stm32/maple/src/stm32_spi.c | 12 +- boards/arm/stm32/maple/src/stm32_usbdev.c | 4 +- .../stm32/mikroe-stm32f4/src/mikroe-stm32f4.h | 2 +- .../stm32/mikroe-stm32f4/src/stm32_appinit.c | 6 +- .../mikroe-stm32f4/src/stm32_mio283qt2.c | 34 ++-- .../mikroe-stm32f4/src/stm32_mio283qt9a.c | 40 ++--- .../arm/stm32/mikroe-stm32f4/src/stm32_spi.c | 18 +-- .../mikroe-stm32f4/src/stm32_touchscreen.c | 96 +++++------ .../arm/stm32/mikroe-stm32f4/src/stm32_usb.c | 4 +- .../stm32/mikroe-stm32f4/src/stm32_vs1053.c | 34 ++-- .../arm/stm32/nucleo-f103rb/src/stm32_adc.c | 2 +- .../stm32/nucleo-f103rb/src/stm32_buttons.c | 2 +- .../arm/stm32/nucleo-f207zg/src/stm32_adc.c | 2 +- .../stm32/nucleo-f207zg/src/stm32_buttons.c | 2 +- .../arm/stm32/nucleo-f207zg/src/stm32_usb.c | 4 +- .../stm32/nucleo-f302r8/src/stm32_buttons.c | 2 +- .../stm32/nucleo-f302r8/src/stm32_highpri.c | 10 +- .../stm32/nucleo-f303re/src/nucleo-f303re.h | 2 +- .../arm/stm32/nucleo-f303re/src/stm32_adc.c | 2 +- .../stm32/nucleo-f303re/src/stm32_buttons.c | 2 +- .../arm/stm32/nucleo-f303re/src/stm32_spi.c | 18 +-- .../stm32/nucleo-f303re/src/stm32_ssd1351.c | 6 +- .../arm/stm32/nucleo-f303re/src/stm32_timer.c | 2 +- .../arm/stm32/nucleo-f303ze/src/stm32_adc.c | 2 +- .../stm32/nucleo-f303ze/src/stm32_buttons.c | 2 +- .../arm/stm32/nucleo-f303ze/src/stm32_lcd.c | 2 +- .../stm32/nucleo-f334r8/src/nucleo-f334r8.h | 2 +- .../arm/stm32/nucleo-f334r8/src/stm32_adc.c | 2 +- .../stm32/nucleo-f334r8/src/stm32_highpri.c | 16 +- .../arm/stm32/nucleo-f334r8/src/stm32_spwm.c | 102 ++++++------ .../stm32/nucleo-f410rb/src/stm32_buttons.c | 2 +- .../arm/stm32/nucleo-f412zg/src/stm32_usb.c | 4 +- .../stm32/nucleo-f429zi/src/stm32_bbsram.c | 10 +- .../stm32/nucleo-f429zi/src/stm32_buttons.c | 2 +- .../stm32/nucleo-f429zi/src/stm32_dma_alloc.c | 2 +- .../arm/stm32/nucleo-f429zi/src/stm32_gpio.c | 52 +++--- .../arm/stm32/nucleo-f429zi/src/stm32_sdio.c | 4 +- .../arm/stm32/nucleo-f429zi/src/stm32_spi.c | 36 ++--- .../arm/stm32/nucleo-f429zi/src/stm32_usb.c | 4 +- .../stm32/nucleo-f446re/src/stm32_ajoystick.c | 34 ++-- .../arm/stm32/nucleo-f446re/src/stm32_boot.c | 2 +- .../stm32/nucleo-f446re/src/stm32_buttons.c | 2 +- .../arm/stm32/nucleo-f446re/src/stm32_gpio.c | 52 +++--- .../stm32/nucleo-f446re/src/stm32_ili9225.c | 2 +- .../arm/stm32/nucleo-f446re/src/stm32_spi.c | 22 +-- .../stm32/nucleo-f4x1re/src/nucleo-f4x1re.h | 2 +- .../stm32/nucleo-f4x1re/src/stm32_ajoystick.c | 36 ++--- .../stm32/nucleo-f4x1re/src/stm32_buttons.c | 2 +- .../stm32/nucleo-f4x1re/src/stm32_mcp2515.c | 32 ++-- .../arm/stm32/nucleo-f4x1re/src/stm32_spi.c | 18 +-- .../arm/stm32/nucleo-g431rb/src/stm32_adc.c | 2 +- .../stm32/nucleo-g431rb/src/stm32_buttons.c | 2 +- .../stm32/nucleo-g431rb/src/stm32_cordic.c | 6 +- .../stm32/nucleo-l152re/src/nucleo-l152re.h | 2 +- .../nucleo-l152re/src/stm32_appinitialize.c | 4 +- .../stm32/nucleo-l152re/src/stm32_buttons.c | 2 +- .../stm32/nucleo-l152re/src/stm32_ili93418b.c | 44 ++--- .../arm/stm32/nucleo-l152re/src/stm32_spi.c | 24 +-- .../olimex-stm32-e407/src/olimex-stm32-e407.h | 2 +- .../olimex-stm32-e407/src/stm32_bringup.c | 2 +- .../olimex-stm32-e407/src/stm32_buttons.c | 2 +- .../olimex-stm32-e407/src/stm32_mrf24j40.c | 26 +-- .../stm32/olimex-stm32-e407/src/stm32_spi.c | 10 +- .../stm32/olimex-stm32-e407/src/stm32_timer.c | 2 +- .../stm32/olimex-stm32-e407/src/stm32_usb.c | 4 +- .../olimex-stm32-h405/src/stm32_buttons.c | 2 +- .../stm32/olimex-stm32-h405/src/stm32_usb.c | 2 +- .../olimex-stm32-h407/src/stm32_bringup.c | 2 +- .../olimex-stm32-h407/src/stm32_buttons.c | 2 +- .../stm32/olimex-stm32-h407/src/stm32_sdio.c | 4 +- .../stm32/olimex-stm32-h407/src/stm32_usb.c | 4 +- .../olimex-stm32-p107/src/stm32_encx24j600.c | 24 +-- .../stm32/olimex-stm32-p107/src/stm32_spi.c | 4 +- .../olimex-stm32-p207/src/stm32_buttons.c | 2 +- .../stm32/olimex-stm32-p207/src/stm32_usb.c | 4 +- .../olimex-stm32-p407/src/stm32_bringup.c | 2 +- .../olimex-stm32-p407/src/stm32_buttons.c | 2 +- .../olimex-stm32-p407/src/stm32_cs4344.c | 6 +- .../olimex-stm32-p407/src/stm32_djoystick.c | 24 +-- .../stm32/olimex-stm32-p407/src/stm32_spi.c | 18 +-- .../olimex-stm32-p407/src/stm32_st7735.c | 2 +- .../stm32/olimex-stm32-p407/src/stm32_usb.c | 4 +- .../stm32/olimexino-stm32/src/stm32_boot.c | 2 +- .../stm32/olimexino-stm32/src/stm32_buttons.c | 2 +- .../olimexino-stm32/src/stm32_composite.c | 16 +- .../arm/stm32/olimexino-stm32/src/stm32_spi.c | 18 +-- .../stm32/olimexino-stm32/src/stm32_usbdev.c | 4 +- .../stm32/olimexino-stm32/src/stm32_usbmsc.c | 2 +- boards/arm/stm32/omnibusf4/src/omnibusf4.h | 2 +- boards/arm/stm32/omnibusf4/src/stm32_boot.c | 2 +- .../arm/stm32/omnibusf4/src/stm32_bringup.c | 4 +- boards/arm/stm32/omnibusf4/src/stm32_spi.c | 12 +- boards/arm/stm32/omnibusf4/src/stm32_timer.c | 2 +- boards/arm/stm32/omnibusf4/src/stm32_usb.c | 4 +- boards/arm/stm32/photon/src/stm32_buttons.c | 2 +- boards/arm/stm32/photon/src/stm32_composite.c | 4 +- boards/arm/stm32/photon/src/stm32_spi.c | 18 +-- boards/arm/stm32/photon/src/stm32_usb.c | 2 +- boards/arm/stm32/photon/src/stm32_wdt.c | 6 +- boards/arm/stm32/shenzhou/src/stm32_buttons.c | 2 +- boards/arm/stm32/shenzhou/src/stm32_ili93xx.c | 132 +++++++-------- boards/arm/stm32/shenzhou/src/stm32_mmcsd.c | 2 +- boards/arm/stm32/shenzhou/src/stm32_spi.c | 8 +- boards/arm/stm32/shenzhou/src/stm32_ssd1289.c | 68 ++++---- .../stm32/shenzhou/src/stm32_touchscreen.c | 26 +-- boards/arm/stm32/shenzhou/src/stm32_usb.c | 4 +- boards/arm/stm32/shenzhou/src/stm32_w25.c | 4 +- .../arm/stm32/stm3210e-eval/include/board.h | 2 +- .../stm32/stm3210e-eval/src/stm32_bringup.c | 8 +- .../stm32/stm3210e-eval/src/stm32_buttons.c | 2 +- .../stm32/stm3210e-eval/src/stm32_composite.c | 16 +- .../stm32/stm3210e-eval/src/stm32_djoystick.c | 26 +-- .../arm/stm32/stm3210e-eval/src/stm32_idle.c | 2 +- .../arm/stm32/stm3210e-eval/src/stm32_lcd.c | 52 +++--- .../stm32/stm3210e-eval/src/stm32_pmbuttons.c | 2 +- .../arm/stm32/stm3210e-eval/src/stm32_spi.c | 12 +- .../stm32/stm3210e-eval/src/stm32_usbdev.c | 4 +- .../stm32/stm3210e-eval/src/stm32_usbmsc.c | 2 +- .../stm32/stm3220g-eval/src/stm32_appinit.c | 8 +- .../stm32/stm3220g-eval/src/stm32_buttons.c | 2 +- .../arm/stm32/stm3220g-eval/src/stm32_lcd.c | 46 +++--- .../arm/stm32/stm3220g-eval/src/stm32_spi.c | 12 +- .../stm32/stm3220g-eval/src/stm32_stmpe811.c | 28 ++-- .../arm/stm32/stm3220g-eval/src/stm32_usb.c | 4 +- .../stm32/stm3240g-eval/src/stm32_bringup.c | 10 +- .../stm32/stm3240g-eval/src/stm32_buttons.c | 2 +- .../arm/stm32/stm3240g-eval/src/stm32_lcd.c | 46 +++--- .../arm/stm32/stm3240g-eval/src/stm32_spi.c | 12 +- .../stm32/stm3240g-eval/src/stm32_stmpe811.c | 34 ++-- .../arm/stm32/stm3240g-eval/src/stm32_usb.c | 4 +- boards/arm/stm32/stm32_tiny/src/stm32_spi.c | 8 +- .../arm/stm32/stm32_tiny/src/stm32_usbdev.c | 4 +- .../stm32/stm32f103-minimum/src/stm32_at24.c | 4 +- .../stm32f103-minimum/src/stm32_buttons.c | 2 +- .../stm32f103-minimum/src/stm32_ds18b20.c | 10 +- .../stm32/stm32f103-minimum/src/stm32_gpio.c | 52 +++--- .../stm32f103-minimum/src/stm32_hyt271.c | 8 +- .../stm32f103-minimum/src/stm32_lcd_ssd1306.c | 2 +- .../stm32f103-minimum/src/stm32_lcd_st7567.c | 6 +- .../stm32f103-minimum/src/stm32_max7219.c | 6 +- .../stm32f103-minimum/src/stm32_mcp2515.c | 32 ++-- .../stm32f103-minimum/src/stm32_mfrc522.c | 4 +- .../stm32f103-minimum/src/stm32_pcd8544.c | 6 +- .../stm32/stm32f103-minimum/src/stm32_spi.c | 10 +- .../stm32f103-minimum/src/stm32_usbdev.c | 4 +- .../stm32/stm32f103-minimum/src/stm32_w25.c | 10 +- .../stm32f103-minimum/src/stm32f103_minimum.h | 4 +- .../arm/stm32/stm32f334-disco/src/stm32_adc.c | 2 +- .../stm32f334-disco/src/stm32_powerled.c | 122 +++++++------- .../stm32/stm32f334-disco/src/stm32_smps.c | 150 +++++++++--------- .../stm32f334-disco/src/stm32f334-disco.h | 2 +- .../stm32f3discovery/src/stm32_buttons.c | 2 +- .../stm32/stm32f3discovery/src/stm32_spi.c | 18 +-- .../stm32/stm32f3discovery/src/stm32_usb.c | 4 +- .../stm32/stm32f411-minimum/src/stm32_usb.c | 4 +- .../stm32/stm32f411e-disco/src/stm32_usb.c | 4 +- .../stm32/stm32f429i-disco/src/stm32_adc.c | 2 +- .../stm32f429i-disco/src/stm32_bringup.c | 10 +- .../stm32f429i-disco/src/stm32_buttons.c | 2 +- .../stm32f429i-disco/src/stm32_highpri.c | 10 +- .../stm32f429i-disco/src/stm32_ili93414ws.c | 86 +++++----- .../stm32/stm32f429i-disco/src/stm32_lcd.c | 12 +- .../stm32/stm32f429i-disco/src/stm32_spi.c | 34 ++-- .../stm32f429i-disco/src/stm32_stmpe811.c | 30 ++-- .../stm32/stm32f429i-disco/src/stm32_usb.c | 4 +- .../stm32f429i-disco/src/stm32f429i-disco.h | 6 +- .../stm32/stm32f4discovery/src/stm32_boot.c | 2 +- .../stm32f4discovery/src/stm32_bringup.c | 4 +- .../stm32f4discovery/src/stm32_buttons.c | 2 +- .../stm32f4discovery/src/stm32_cs43l22.c | 28 ++-- .../stm32/stm32f4discovery/src/stm32_ds1307.c | 2 +- .../stm32f4discovery/src/stm32_enc28j60.c | 24 +-- .../stm32f4discovery/src/stm32_ethernet.c | 2 +- .../stm32f4discovery/src/stm32_gs2200m.c | 14 +- .../stm32f4discovery/src/stm32_max7219.c | 6 +- .../stm32f4discovery/src/stm32_max7219_leds.c | 4 +- .../stm32f4discovery/src/stm32_pca9635.c | 2 +- .../stm32f4discovery/src/stm32_pmbuttons.c | 4 +- .../stm32/stm32f4discovery/src/stm32_sdio.c | 4 +- .../stm32/stm32f4discovery/src/stm32_spi.c | 18 +-- .../stm32f4discovery/src/stm32_ssd1289.c | 28 ++-- .../stm32f4discovery/src/stm32_ssd1351.c | 6 +- .../stm32/stm32f4discovery/src/stm32_st7032.c | 4 +- .../stm32/stm32f4discovery/src/stm32_st7567.c | 6 +- .../stm32/stm32f4discovery/src/stm32_st7789.c | 2 +- .../stm32/stm32f4discovery/src/stm32_sx127x.c | 6 +- .../stm32/stm32f4discovery/src/stm32_timer.c | 2 +- .../src/stm32_ug2864ambag01.c | 6 +- .../src/stm32_ug2864hsweg01.c | 6 +- .../stm32/stm32f4discovery/src/stm32_usb.c | 4 +- .../stm32f4discovery/src/stm32f4discovery.h | 18 +-- .../stm32/stm32ldiscovery/src/stm32_buttons.c | 2 +- .../arm/stm32/stm32ldiscovery/src/stm32_lcd.c | 46 +++--- .../arm/stm32/stm32ldiscovery/src/stm32_spi.c | 18 +-- .../stm32vldiscovery/src/stm32_buttons.c | 2 +- .../viewtool-stm32f107/src/stm32_ads7843e.c | 30 ++-- .../viewtool-stm32f107/src/stm32_bringup.c | 2 +- .../viewtool-stm32f107/src/stm32_buttons.c | 2 +- .../viewtool-stm32f107/src/stm32_ft80x.c | 40 ++--- .../viewtool-stm32f107/src/stm32_highpri.c | 4 +- .../viewtool-stm32f107/src/stm32_max3421e.c | 38 ++--- .../viewtool-stm32f107/src/stm32_mmcsd.c | 2 +- .../stm32/viewtool-stm32f107/src/stm32_spi.c | 12 +- .../viewtool-stm32f107/src/stm32_ssd1289.c | 28 ++-- .../viewtool-stm32f107/src/stm32_usbdev.c | 4 +- .../src/viewtool_stm32f107.h | 2 +- 272 files changed, 1787 insertions(+), 1787 deletions(-) diff --git a/boards/arm/samd2l2/samd21-xplained/src/sam_ug2832hsweg04.c b/boards/arm/samd2l2/samd21-xplained/src/sam_ug2832hsweg04.c index ff6875a65f..13b6f20c52 100644 --- a/boards/arm/samd2l2/samd21-xplained/src/sam_ug2832hsweg04.c +++ b/boards/arm/samd2l2/samd21-xplained/src/sam_ug2832hsweg04.c @@ -45,10 +45,10 @@ * 10 DISPLAY_RESET 10 PB05 PORT 10 PB15 PORT * ----------------- ---------------------- ---------------------- * 11 N/C 11 PA08 SERCOM2 PAD[0] 11 PA08 SERCOM2 PAD[0] - * I�C SDA I�C SDA + * I²C SDA I²C SDA * ----------------- ---------------------- ---------------------- * 12 N/C 12 PA09 SERCOM2 PAD[1] 12 PA09 SERCOM2 PAD[1] - * I�C SCL I�C SCL + * I²C SCL I²C SCL * ----------------- ---------------------- ---------------------- * 13 N/C 13 PB09 SERCOM4 PAD[1] 13 PB11 SERCOM4 PAD[1] * USART RX USART RX @@ -143,10 +143,10 @@ * ****************************************************************************/ -struct lcd_dev_s *board_graphics_setup(unsigned int devno) +FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) { - struct spi_dev_s *spi; - struct lcd_dev_s *dev; + FAR struct spi_dev_s *spi; + FAR struct lcd_dev_s *dev; /* Configure the OLED PORTs. This initial configuration is RESET low, * putting the OLED into reset state. diff --git a/boards/arm/stm32/axoloti/src/stm32_adau1961.c b/boards/arm/stm32/axoloti/src/stm32_adau1961.c index 8e6752f67e..9b5a21e538 100644 --- a/boards/arm/stm32/axoloti/src/stm32_adau1961.c +++ b/boards/arm/stm32/axoloti/src/stm32_adau1961.c @@ -57,21 +57,21 @@ struct stm32_mwinfo_s * Private Functions ****************************************************************************/ -static int adau1961_attach(FAR const struct adau1961_lower_s *lower, - adau1961_handler_t isr, FAR void *arg) +static int adau1961_attach(const struct adau1961_lower_s *lower, + adau1961_handler_t isr, void *arg) { audinfo("TODO\n"); return 0; } -static bool adau1961_enable(FAR const struct adau1961_lower_s *lower, +static bool adau1961_enable(const struct adau1961_lower_s *lower, bool enable) { audinfo("TODO\n"); return 0; } -static void adau1961_hw_reset(FAR const struct adau1961_lower_s *lower) +static void adau1961_hw_reset(const struct adau1961_lower_s *lower) { audinfo("TODO\n"); } @@ -125,9 +125,9 @@ static struct stm32_mwinfo_s g_adau1961info = int stm32_adau1961_initialize(int minor) { - FAR struct audio_lowerhalf_s *adau1961; - FAR struct i2c_master_s *i2c; - FAR struct i2s_dev_s *i2s; + struct audio_lowerhalf_s *adau1961; + struct i2c_master_s *i2c; + struct i2s_dev_s *i2s; static bool initialized = false; char devname[12]; int ret; diff --git a/boards/arm/stm32/axoloti/src/stm32_boot.c b/boards/arm/stm32/axoloti/src/stm32_boot.c index bfb8384ea3..3e1117f055 100644 --- a/boards/arm/stm32/axoloti/src/stm32_boot.c +++ b/boards/arm/stm32/axoloti/src/stm32_boot.c @@ -54,7 +54,7 @@ void stm32_boardinitialize(void) { #ifdef CONFIG_SCHED_CRITMONITOR - up_perf_init((FAR void *)STM32_SYSCLK_FREQUENCY); + up_perf_init((void *)STM32_SYSCLK_FREQUENCY); #endif #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || \ diff --git a/boards/arm/stm32/axoloti/src/stm32_bringup.c b/boards/arm/stm32/axoloti/src/stm32_bringup.c index a01d93818f..4738797758 100644 --- a/boards/arm/stm32/axoloti/src/stm32_bringup.c +++ b/boards/arm/stm32/axoloti/src/stm32_bringup.c @@ -72,7 +72,7 @@ int stm32_bringup(void) { #ifdef HAVE_RTC_DRIVER - FAR struct rtc_lowerhalf_s *lower; + struct rtc_lowerhalf_s *lower; #endif int ret = OK; diff --git a/boards/arm/stm32/axoloti/src/stm32_buttons.c b/boards/arm/stm32/axoloti/src/stm32_buttons.c index 0421c6ebae..8b55aecca0 100644 --- a/boards/arm/stm32/axoloti/src/stm32_buttons.c +++ b/boards/arm/stm32/axoloti/src/stm32_buttons.c @@ -131,7 +131,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/axoloti/src/stm32_sdio.c b/boards/arm/stm32/axoloti/src/stm32_sdio.c index 47cee08e5e..6d51212fc1 100644 --- a/boards/arm/stm32/axoloti/src/stm32_sdio.c +++ b/boards/arm/stm32/axoloti/src/stm32_sdio.c @@ -52,7 +52,7 @@ * Private Data ****************************************************************************/ -static FAR struct sdio_dev_s *g_sdio_dev; +static struct sdio_dev_s *g_sdio_dev; #ifdef HAVE_NCD static bool g_sd_inserted = 0xff; /* Impossible value */ #endif @@ -70,7 +70,7 @@ static bool g_sd_inserted = 0xff; /* Impossible value */ ****************************************************************************/ #ifdef HAVE_NCD -static int stm32_ncd_interrupt(int irq, FAR void *context, FAR void *arg) +static int stm32_ncd_interrupt(int irq, void *context, void *arg) { bool present; diff --git a/boards/arm/stm32/axoloti/src/stm32_usbhost.c b/boards/arm/stm32/axoloti/src/stm32_usbhost.c index 3249dda9ec..10447bcff8 100644 --- a/boards/arm/stm32/axoloti/src/stm32_usbhost.c +++ b/boards/arm/stm32/axoloti/src/stm32_usbhost.c @@ -252,7 +252,7 @@ int stm32_usbhost_initialize(void) uinfo("Start usbhost_waiter\n"); ret = kthread_create("usbhost", CONFIG_AXOLOTI_USBHOST_PRIO, CONFIG_AXOLOTI_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char *const *)NULL); + (main_t)usbhost_waiter, (char *const *)NULL); return ret < 0 ? -ENOEXEC : OK; } diff --git a/boards/arm/stm32/b-g431b-esc1/src/stm32_buttons.c b/boards/arm/stm32/b-g431b-esc1/src/stm32_buttons.c index b3ebf9a58a..1f11bd0163 100644 --- a/boards/arm/stm32/b-g431b-esc1/src/stm32_buttons.c +++ b/boards/arm/stm32/b-g431b-esc1/src/stm32_buttons.c @@ -94,7 +94,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c b/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c index 64b04ec430..df43b49028 100644 --- a/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c +++ b/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c @@ -195,17 +195,17 @@ * Private Function Protototypes ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev); -static int board_foc_shutdown(FAR struct foc_dev_s *dev); -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state); -static int board_foc_fault_clear(FAR struct foc_dev_s *dev); -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state); -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr); +static int board_foc_setup(struct foc_dev_s *dev); +static int board_foc_shutdown(struct foc_dev_s *dev); +static int board_foc_calibration(struct foc_dev_s *dev, bool state); +static int board_foc_fault_clear(struct foc_dev_s *dev); +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state); +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr); #ifdef CONFIG_MOTOR_FOC_TRACE -static int board_foc_trace_init(FAR struct foc_dev_s *dev); -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state); +static int board_foc_trace_init(struct foc_dev_s *dev); +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state); #endif /**************************************************************************** @@ -336,7 +336,7 @@ static struct stm32_foc_board_s g_stm32_foc_board = /* Global pointer to the upper FOC driver */ -static FAR struct foc_dev_s *g_foc_dev = NULL; +static struct foc_dev_s *g_foc_dev = NULL; /**************************************************************************** * Private Functions @@ -346,7 +346,7 @@ static FAR struct foc_dev_s *g_foc_dev = NULL; * Name: board_foc_setup ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev) +static int board_foc_setup(struct foc_dev_s *dev) { uint32_t regval = 0; @@ -412,7 +412,7 @@ static int board_foc_setup(FAR struct foc_dev_s *dev) * Name: board_foc_shutdown ****************************************************************************/ -static int board_foc_shutdown(FAR struct foc_dev_s *dev) +static int board_foc_shutdown(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -425,7 +425,7 @@ static int board_foc_shutdown(FAR struct foc_dev_s *dev) * Name: board_foc_calibration ****************************************************************************/ -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) +static int board_foc_calibration(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -438,7 +438,7 @@ static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_fault_clear ****************************************************************************/ -static int board_foc_fault_clear(FAR struct foc_dev_s *dev) +static int board_foc_fault_clear(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -451,7 +451,7 @@ static int board_foc_fault_clear(FAR struct foc_dev_s *dev) * Name: board_foc_pwm_start ****************************************************************************/ -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -464,9 +464,9 @@ static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_current_get ****************************************************************************/ -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr) +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr) { DEBUGASSERT(dev); DEBUGASSERT(curr_raw); @@ -489,7 +489,7 @@ static int board_foc_current_get(FAR struct foc_dev_s *dev, * Name: board_foc_trace_init ****************************************************************************/ -static int board_foc_trace_init(FAR struct foc_dev_s *dev) +static int board_foc_trace_init(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -504,7 +504,7 @@ static int board_foc_trace_init(FAR struct foc_dev_s *dev) * Name: board_foc_trace ****************************************************************************/ -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state) { DEBUGASSERT(dev); @@ -531,8 +531,8 @@ static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) int stm32_foc_setup(void) { - FAR struct foc_dev_s *foc = NULL; - int ret = OK; + struct foc_dev_s *foc = NULL; + int ret = OK; /* Initialize only once */ @@ -597,9 +597,9 @@ errout: int stm32_adc_setup(void) { - FAR struct adc_dev_s *adc = NULL; - int ret = OK; - static bool initialized = false; + struct adc_dev_s *adc = NULL; + int ret = OK; + static bool initialized = false; /* Initialize only once */ diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c b/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c index f2e13490c9..7509dda683 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c @@ -96,7 +96,7 @@ int board_app_initialize(uintptr_t arg) nxsig_usleep(CONFIG_CLICKER2_STM32_SYSLOG_FILE_DELAY * 1000); - FAR struct syslog_channel_s *channel; + struct syslog_channel_s *channel; channel = syslog_file_channel(CONFIG_CLICKER2_STM32_SYSLOG_FILE_PATH); if (channel == NULL) { diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c b/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c index ed62a972ab..cd8efd2bd1 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c @@ -51,10 +51,10 @@ struct stm32_automount_state_s { - volatile automount_handler_t handler; /* Upper half handler */ - FAR void *arg; /* Handler argument */ - bool enable; /* Fake interrupt enable */ - bool pending; /* Set if there an event while disabled */ + volatile automount_handler_t handler; /* Upper half handler */ + void *arg; /* Handler argument */ + bool enable; /* Fake interrupt enable */ + bool pending; /* Set if there an event while disabled */ }; /* This structure represents the static configuration of an automounter */ @@ -65,20 +65,20 @@ struct stm32_automount_config_s * struct automount_lower_s to struct stm32_automount_config_s */ - struct automount_lower_s lower; /* Publicly visible part */ - uint8_t mmcsd; /* MB1_MMCSD_SLOTNO or MB2_MMCSD_SLOTNO */ - FAR struct stm32_automount_state_s *state; /* Changeable state */ + struct automount_lower_s lower; /* Publicly visible part */ + uint8_t mmcsd; /* MB1_MMCSD_SLOTNO or MB2_MMCSD_SLOTNO */ + struct stm32_automount_state_s *state; /* Changeable state */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int stm32_attach(FAR const struct automount_lower_s *lower, - automount_handler_t isr, FAR void *arg); -static void stm32_enable(FAR const struct automount_lower_s *lower, +static int stm32_attach(const struct automount_lower_s *lower, + automount_handler_t isr, void *arg); +static void stm32_enable(const struct automount_lower_s *lower, bool enable); -static bool stm32_inserted(FAR const struct automount_lower_s *lower); +static bool stm32_inserted(const struct automount_lower_s *lower); /**************************************************************************** * Private Data @@ -148,15 +148,15 @@ static const struct stm32_automount_config_s g_mb2_mmcsdconfig = * ****************************************************************************/ -static int stm32_attach(FAR const struct automount_lower_s *lower, - automount_handler_t isr, FAR void *arg) +static int stm32_attach(const struct automount_lower_s *lower, + automount_handler_t isr, void *arg) { - FAR const struct stm32_automount_config_s *config; - FAR struct stm32_automount_state_s *state; + const struct stm32_automount_config_s *config; + struct stm32_automount_state_s *state; /* Recover references to our structure */ - config = (FAR struct stm32_automount_config_s *)lower; + config = (struct stm32_automount_config_s *)lower; DEBUGASSERT(config && config->state); state = config->state; @@ -187,16 +187,16 @@ static int stm32_attach(FAR const struct automount_lower_s *lower, * ****************************************************************************/ -static void stm32_enable(FAR const struct automount_lower_s *lower, +static void stm32_enable(const struct automount_lower_s *lower, bool enable) { - FAR const struct stm32_automount_config_s *config; - FAR struct stm32_automount_state_s *state; + const struct stm32_automount_config_s *config; + struct stm32_automount_state_s *state; irqstate_t flags; /* Recover references to our structure */ - config = (FAR struct stm32_automount_config_s *)lower; + config = (struct stm32_automount_config_s *)lower; DEBUGASSERT(config && config->state); state = config->state; @@ -238,11 +238,11 @@ static void stm32_enable(FAR const struct automount_lower_s *lower, * ****************************************************************************/ -static bool stm32_inserted(FAR const struct automount_lower_s *lower) +static bool stm32_inserted(const struct automount_lower_s *lower) { - FAR const struct stm32_automount_config_s *config; + const struct stm32_automount_config_s *config; - config = (FAR struct stm32_automount_config_s *)lower; + config = (struct stm32_automount_config_s *)lower; DEBUGASSERT(config && config->state); return stm32_cardinserted(config->mmcsd); @@ -268,7 +268,7 @@ static bool stm32_inserted(FAR const struct automount_lower_s *lower) int stm32_automount_initialize(void) { - FAR void *handle; + void *handle; finfo("Initializing automounter(s)\n"); @@ -323,8 +323,8 @@ int stm32_automount_initialize(void) void stm32_automount_event(int slotno, bool inserted) { - FAR const struct stm32_automount_config_s *config; - FAR struct stm32_automount_state_s *state; + const struct stm32_automount_config_s *config; + struct stm32_automount_state_s *state; #ifdef CONFIG_CLICKER2_STM32_MB1_MMCSD_AUTOMOUNT /* Is this a change in the MB1 MMCSD slot insertion state? */ diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_buttons.c b/boards/arm/stm32/clicker2-stm32/src/stm32_buttons.c index 172970cb55..b7373bcbd4 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_buttons.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_buttons.c @@ -110,7 +110,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { uint32_t btncfg; diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c b/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c index ab91c67ed2..63880beec9 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c @@ -105,7 +105,7 @@ struct stm32_mmcsd_state_s xcpt_t handler; /* Interrupt handler */ bool cd; /* TRUE: card is inserted */ spi_mediachange_t callback; /* SPI media change callback */ - FAR void *cbarg; /* Argument to pass to media change callback */ + void *cbarg; /* Argument to pass to media change callback */ struct work_s work; /* For deferring card detect interrupt work */ }; @@ -114,19 +114,19 @@ struct stm32_mmcsd_state_s ****************************************************************************/ static bool stm32_cardinserted_internal(struct stm32_mmcsd_state_s *state); -static void stm32_mmcsd_carddetect(FAR void *arg); -static int stm32_mmcsd_setup(FAR struct stm32_mmcsd_state_s *); +static void stm32_mmcsd_carddetect(void *arg); +static int stm32_mmcsd_setup(struct stm32_mmcsd_state_s *); #ifdef CONFIG_CLICKER2_STM32_MB1_MMCSD static int stm32_mb1_mmcsd_carddetect(int irq, - FAR void *regs, - FAR void *arg); + void *regs, + void *arg); #endif #ifdef CONFIG_CLICKER2_STM32_MB2_MMCSD static int stm32_mb2_mmcsd_carddetect(int irq, - FAR void *regs, - FAR void *arg); + void *regs, + void *arg); #endif /**************************************************************************** @@ -136,7 +136,7 @@ static int stm32_mb2_mmcsd_carddetect(int irq, /* MMCSD device state */ #ifdef CONFIG_CLICKER2_STM32_MB1_MMCSD -static int stm32_mb1_mmcsd_carddetect(int irq, void *regs, FAR void *arg); +static int stm32_mb1_mmcsd_carddetect(int irq, void *regs, void *arg); static struct stm32_mmcsd_state_s g_mb1_mmcsd = { @@ -151,7 +151,7 @@ static struct stm32_mmcsd_state_s g_mb1_mmcsd = #endif #ifdef CONFIG_CLICKER2_STM32_MB2_MMCSD -static int stm32_mb2_mmcsd_carddetect(int irq, void *regs, FAR void *arg); +static int stm32_mb2_mmcsd_carddetect(int irq, void *regs, void *arg); static struct stm32_mmcsd_state_s g_mb2_mmcsd = { @@ -197,11 +197,11 @@ static bool stm32_cardinserted_internal(struct stm32_mmcsd_state_s *state) * ****************************************************************************/ -static void stm32_mmcsd_carddetect(FAR void *arg) +static void stm32_mmcsd_carddetect(void *arg) { bool cd; - FAR struct stm32_mmcsd_state_s *state = - (FAR struct stm32_mmcsd_state_s *)arg; + struct stm32_mmcsd_state_s *state = + (struct stm32_mmcsd_state_s *)arg; /* Get the current card insertion state */ @@ -231,7 +231,7 @@ static void stm32_mmcsd_carddetect(FAR void *arg) } #ifdef CONFIG_CLICKER2_STM32_MB1_MMCSD -static int stm32_mb1_mmcsd_carddetect(int irq, FAR void *regs, FAR void *arg) +static int stm32_mb1_mmcsd_carddetect(int irq, void *regs, void *arg) { if (work_available(&g_mb1_mmcsd.work)) { @@ -244,7 +244,7 @@ static int stm32_mb1_mmcsd_carddetect(int irq, FAR void *regs, FAR void *arg) #endif #ifdef CONFIG_CLICKER2_STM32_MB2_MMCSD -static int stm32_mb2_mmcsd_carddetect(int irq, FAR void *regs, FAR void *arg) +static int stm32_mb2_mmcsd_carddetect(int irq, void *regs, void *arg) { if (work_available(&g_mb2_mmcsd.work)) { diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_mrf24j40.c b/boards/arm/stm32/clicker2-stm32/src/stm32_mrf24j40.c index f4f9931722..41e5de2b68 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_mrf24j40.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_mrf24j40.c @@ -76,7 +76,7 @@ struct stm32_priv_s { struct mrf24j40_lower_s dev; xcpt_t handler; - FAR void *arg; + void *arg; uint32_t intcfg; uint8_t spidev; }; @@ -94,11 +94,11 @@ struct stm32_priv_s * irq_enable - Enable or disable the GPIO interrupt */ -static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, - xcpt_t handler, FAR void *arg); -static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, +static int stm32_attach_irq(const struct mrf24j40_lower_s *lower, + xcpt_t handler, void *arg); +static void stm32_enable_irq(const struct mrf24j40_lower_s *lower, bool state); -static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv); +static int stm32_mrf24j40_devsetup(struct stm32_priv_s *priv); /**************************************************************************** * Private Data @@ -153,10 +153,10 @@ static struct stm32_priv_s g_mrf24j40_mb2_priv = * irq_enable - Enable or disable the GPIO interrupt */ -static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, - xcpt_t handler, FAR void *arg) +static int stm32_attach_irq(const struct mrf24j40_lower_s *lower, + xcpt_t handler, void *arg) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; DEBUGASSERT(priv != NULL); @@ -167,10 +167,10 @@ static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, return OK; } -static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, +static void stm32_enable_irq(const struct mrf24j40_lower_s *lower, bool state) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; /* The caller should not attempt to enable interrupts if the handler * has not yet been 'attached' @@ -208,11 +208,11 @@ static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, * ****************************************************************************/ -static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv) +static int stm32_mrf24j40_devsetup(struct stm32_priv_s *priv) { - FAR struct ieee802154_radio_s *radio; + struct ieee802154_radio_s *radio; MACHANDLE mac; - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Configure the interrupt pin */ diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_spi.c b/boards/arm/stm32/clicker2-stm32/src/stm32_spi.c index 04943e070e..2b2274a541 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_spi.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_spi.c @@ -94,21 +94,21 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -145,7 +145,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; @@ -161,7 +161,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -198,7 +198,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; @@ -238,14 +238,14 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { /* To be provided */ @@ -254,7 +254,7 @@ int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { /* To be provided */ diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_usb.c b/boards/arm/stm32/clicker2-stm32/src/stm32_usb.c index 5debd1f224..32197fdc32 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_usb.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_usb.c @@ -84,7 +84,7 @@ void stm32_usb_configure(void) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_xbee.c b/boards/arm/stm32/clicker2-stm32/src/stm32_xbee.c index 810e61863c..99c4c4bb99 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_xbee.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_xbee.c @@ -98,7 +98,7 @@ struct stm32_priv_s { struct xbee_lower_s dev; xcpt_t handler; - FAR void *arg; + void *arg; uint32_t rstcfg; uint32_t attncfg; uint8_t spidev; @@ -121,13 +121,13 @@ struct stm32_priv_s * attn_poll - Poll the current state of the GPIO interrupt (ATTN) */ -static void stm32_reset(FAR const struct xbee_lower_s *lower); -static int stm32_attach_attn(FAR const struct xbee_lower_s *lower, - xcpt_t handler, FAR void *arg); -static void stm32_enable_attn(FAR const struct xbee_lower_s *lower, +static void stm32_reset(const struct xbee_lower_s *lower); +static int stm32_attach_attn(const struct xbee_lower_s *lower, + xcpt_t handler, void *arg); +static void stm32_enable_attn(const struct xbee_lower_s *lower, bool state); -static bool stm32_poll_attn(FAR const struct xbee_lower_s *lower); -static int stm32_xbee_devsetup(FAR struct stm32_priv_s *priv); +static bool stm32_poll_attn(const struct xbee_lower_s *lower); +static int stm32_xbee_devsetup(struct stm32_priv_s *priv); /**************************************************************************** * Private Data @@ -190,9 +190,9 @@ static struct stm32_priv_s g_xbee_mb2_priv = * attn_poll - Poll the current state of the GPIO interrupt (ATTN) */ -static void stm32_reset(FAR const struct xbee_lower_s *lower) +static void stm32_reset(const struct xbee_lower_s *lower) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; DEBUGASSERT(priv != NULL); @@ -205,10 +205,10 @@ static void stm32_reset(FAR const struct xbee_lower_s *lower) up_mdelay(100); } -static int stm32_attach_attn(FAR const struct xbee_lower_s *lower, - xcpt_t handler, FAR void *arg) +static int stm32_attach_attn(const struct xbee_lower_s *lower, + xcpt_t handler, void *arg) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; DEBUGASSERT(priv != NULL); @@ -219,10 +219,10 @@ static int stm32_attach_attn(FAR const struct xbee_lower_s *lower, return OK; } -static void stm32_enable_attn(FAR const struct xbee_lower_s *lower, - bool state) +static void stm32_enable_attn(const struct xbee_lower_s *lower, + bool state) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; /* The caller should not attempt to enable interrupts if the handler * has not yet been 'attached' @@ -248,9 +248,9 @@ static void stm32_enable_attn(FAR const struct xbee_lower_s *lower, } } -static bool stm32_poll_attn(FAR const struct xbee_lower_s *lower) +static bool stm32_poll_attn(const struct xbee_lower_s *lower) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; return !stm32_gpioread(priv->attncfg); } @@ -267,9 +267,9 @@ static bool stm32_poll_attn(FAR const struct xbee_lower_s *lower) * ****************************************************************************/ -static int stm32_xbee_devsetup(FAR struct stm32_priv_s *priv) +static int stm32_xbee_devsetup(struct stm32_priv_s *priv) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; XBEEHANDLE xbee; int ret; diff --git a/boards/arm/stm32/cloudctrl/src/stm32_buttons.c b/boards/arm/stm32/cloudctrl/src/stm32_buttons.c index 9e8ba0b61e..37b9eeb8c8 100644 --- a/boards/arm/stm32/cloudctrl/src/stm32_buttons.c +++ b/boards/arm/stm32/cloudctrl/src/stm32_buttons.c @@ -145,7 +145,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/cloudctrl/src/stm32_spi.c b/boards/arm/stm32/cloudctrl/src/stm32_spi.c index 79f0f6220e..b08c553741 100644 --- a/boards/arm/stm32/cloudctrl/src/stm32_spi.c +++ b/boards/arm/stm32/cloudctrl/src/stm32_spi.c @@ -98,7 +98,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -114,21 +114,21 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/boards/arm/stm32/cloudctrl/src/stm32_usb.c b/boards/arm/stm32/cloudctrl/src/stm32_usb.c index e4fc3f3d41..66d4d249aa 100644 --- a/boards/arm/stm32/cloudctrl/src/stm32_usb.c +++ b/boards/arm/stm32/cloudctrl/src/stm32_usb.c @@ -200,7 +200,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -293,7 +293,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/cloudctrl/src/stm32_w25.c b/boards/arm/stm32/cloudctrl/src/stm32_w25.c index b857af8832..570d8b9a78 100644 --- a/boards/arm/stm32/cloudctrl/src/stm32_w25.c +++ b/boards/arm/stm32/cloudctrl/src/stm32_w25.c @@ -79,8 +79,8 @@ int stm32_w25initialize(int minor) { #ifdef HAVE_W25 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; #ifdef CONFIG_FS_NXFFS char devname[12]; #endif diff --git a/boards/arm/stm32/common/include/stm32_ihm07m1.h b/boards/arm/stm32/common/include/stm32_ihm07m1.h index 90244dfd65..e484a185d9 100644 --- a/boards/arm/stm32/common/include/stm32_ihm07m1.h +++ b/boards/arm/stm32/common/include/stm32_ihm07m1.h @@ -49,7 +49,7 @@ extern "C" * Name: stm32_ihm07m1_initialize ****************************************************************************/ -int board_ihm07m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg); +int board_ihm07m1_initialize(struct stm32_foc_adc_s *adc_cfg); #undef EXTERN #ifdef __cplusplus diff --git a/boards/arm/stm32/common/include/stm32_ihm08m1.h b/boards/arm/stm32/common/include/stm32_ihm08m1.h index 138b45d7e2..5cc307da64 100644 --- a/boards/arm/stm32/common/include/stm32_ihm08m1.h +++ b/boards/arm/stm32/common/include/stm32_ihm08m1.h @@ -49,7 +49,7 @@ extern "C" * Name: stm32_ihm08m1_initialize ****************************************************************************/ -int board_ihm08m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg); +int board_ihm08m1_initialize(struct stm32_foc_adc_s *adc_cfg); #undef EXTERN #ifdef __cplusplus diff --git a/boards/arm/stm32/common/include/stm32_ihm16m1.h b/boards/arm/stm32/common/include/stm32_ihm16m1.h index 8f28f4d6af..9641ce2e01 100644 --- a/boards/arm/stm32/common/include/stm32_ihm16m1.h +++ b/boards/arm/stm32/common/include/stm32_ihm16m1.h @@ -49,7 +49,7 @@ extern "C" * Name: stm32_ihm16m1_initialize ****************************************************************************/ -int board_ihm16m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg); +int board_ihm16m1_initialize(struct stm32_foc_adc_s *adc_cfg); #undef EXTERN #ifdef __cplusplus diff --git a/boards/arm/stm32/common/include/stm32_ssd1306.h b/boards/arm/stm32/common/include/stm32_ssd1306.h index c28d20ab86..1ddbbc744a 100644 --- a/boards/arm/stm32/common/include/stm32_ssd1306.h +++ b/boards/arm/stm32/common/include/stm32_ssd1306.h @@ -70,7 +70,7 @@ int board_ssd1306_initialize(int busno); * ****************************************************************************/ -FAR struct lcd_dev_s *board_ssd1306_getdev(void); +struct lcd_dev_s *board_ssd1306_getdev(void); #undef EXTERN #ifdef __cplusplus diff --git a/boards/arm/stm32/common/src/stm32_apa102.c b/boards/arm/stm32/common/src/stm32_apa102.c index a325b5b8e0..3f37ab891a 100644 --- a/boards/arm/stm32/common/src/stm32_apa102.c +++ b/boards/arm/stm32/common/src/stm32_apa102.c @@ -81,7 +81,7 @@ int board_apa102_initialize(int devno, int spino) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; char devpath[13]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_apds9960.c b/boards/arm/stm32/common/src/stm32_apds9960.c index 72beb0bd3f..3f5f5be6b1 100644 --- a/boards/arm/stm32/common/src/stm32_apds9960.c +++ b/boards/arm/stm32/common/src/stm32_apds9960.c @@ -51,16 +51,16 @@ struct stm32_apds9960config_s /* Additional private definitions only known to this driver */ - FAR void *arg; /* Argument to pass to the interrupt handler */ - FAR xcpt_t isr; /* ISR Handler */ + void *arg; /* Argument to pass to the interrupt handler */ + xcpt_t isr; /* ISR Handler */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int apds9960_irq_attach(FAR struct apds9960_config_s *state, - xcpt_t isr, FAR void *arg); +static int apds9960_irq_attach(struct apds9960_config_s *state, + xcpt_t isr, void *arg); /**************************************************************************** * Private Data @@ -90,8 +90,8 @@ static struct stm32_apds9960config_s g_apds9960config = /* Attach the APDS-9960 interrupt handler to the GPIO interrupt */ -static int apds9960_irq_attach(FAR struct apds9960_config_s *state, - xcpt_t isr, FAR void *arg) +static int apds9960_irq_attach(struct apds9960_config_s *state, + xcpt_t isr, void *arg) { irqstate_t flags; @@ -129,7 +129,7 @@ static int apds9960_irq_attach(FAR struct apds9960_config_s *state, int board_apds9960_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_bh1750.c b/boards/arm/stm32/common/src/stm32_bh1750.c index 9b26263a20..53bc1e56bb 100644 --- a/boards/arm/stm32/common/src/stm32_bh1750.c +++ b/boards/arm/stm32/common/src/stm32_bh1750.c @@ -60,7 +60,7 @@ int board_bh1750_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; sninfo("Initializing BH1750FVI!\n"); diff --git a/boards/arm/stm32/common/src/stm32_bmp180.c b/boards/arm/stm32/common/src/stm32_bmp180.c index 7725f504b0..5cae7288d6 100644 --- a/boards/arm/stm32/common/src/stm32_bmp180.c +++ b/boards/arm/stm32/common/src/stm32_bmp180.c @@ -75,7 +75,7 @@ int board_bmp180_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_dhtxx.c b/boards/arm/stm32/common/src/stm32_dhtxx.c index debb876dac..37f50eeccb 100644 --- a/boards/arm/stm32/common/src/stm32_dhtxx.c +++ b/boards/arm/stm32/common/src/stm32_dhtxx.c @@ -45,11 +45,11 @@ * Private Function Prototypes ****************************************************************************/ -static void dhtxx_config_data_pin(FAR struct dhtxx_config_s *state, +static void dhtxx_config_data_pin(struct dhtxx_config_s *state, bool mode); -static void dhtxx_set_data_pin(FAR struct dhtxx_config_s *state, bool value); -static bool dhtxx_read_data_pin(FAR struct dhtxx_config_s *state); -static int64_t dhtxx_get_clock(FAR struct dhtxx_config_s *state); +static void dhtxx_set_data_pin(struct dhtxx_config_s *state, bool value); +static bool dhtxx_read_data_pin(struct dhtxx_config_s *state); +static int64_t dhtxx_get_clock(struct dhtxx_config_s *state); /**************************************************************************** * Private Data @@ -71,7 +71,7 @@ struct timespec ts; * Private Functions ****************************************************************************/ -static void dhtxx_config_data_pin(FAR struct dhtxx_config_s *state, +static void dhtxx_config_data_pin(struct dhtxx_config_s *state, bool mode) { if (mode) @@ -84,17 +84,17 @@ static void dhtxx_config_data_pin(FAR struct dhtxx_config_s *state, } } -static void dhtxx_set_data_pin(FAR struct dhtxx_config_s *state, bool value) +static void dhtxx_set_data_pin(struct dhtxx_config_s *state, bool value) { stm32_gpiowrite(BOARD_DHTXX_GPIO_OUTPUT, value); } -static bool dhtxx_read_data_pin(FAR struct dhtxx_config_s *state) +static bool dhtxx_read_data_pin(struct dhtxx_config_s *state) { return stm32_gpioread(BOARD_DHTXX_GPIO_INPUT); } -static int64_t dhtxx_get_clock(FAR struct dhtxx_config_s *state) +static int64_t dhtxx_get_clock(struct dhtxx_config_s *state) { /* Get the time from free running timer */ diff --git a/boards/arm/stm32/common/src/stm32_hcsr04.c b/boards/arm/stm32/common/src/stm32_hcsr04.c index 98ec152f27..c18c08b326 100644 --- a/boards/arm/stm32/common/src/stm32_hcsr04.c +++ b/boards/arm/stm32/common/src/stm32_hcsr04.c @@ -56,26 +56,26 @@ struct stm32_hcsr04config_s /* Additional private definitions only known to this driver */ - FAR void *arg; /* Argument to pass to the interrupt handler */ - FAR xcpt_t isr; /* ISR Handler */ - bool rising; /* Rising edge enabled */ - bool falling; /* Falling edge enabled */ + void *arg; /* Argument to pass to the interrupt handler */ + xcpt_t isr; /* ISR Handler */ + bool rising; /* Rising edge enabled */ + bool falling; /* Falling edge enabled */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int hcsr04_irq_attach(FAR struct hcsr04_config_s *state, xcpt_t isr, - FAR void *arg); -static void hcsr04_irq_enable(FAR const struct hcsr04_config_s *state, +static int hcsr04_irq_attach(struct hcsr04_config_s *state, xcpt_t isr, + void *arg); +static void hcsr04_irq_enable(const struct hcsr04_config_s *state, bool enable); -static void hcsr04_irq_clear(FAR const struct hcsr04_config_s *state); -static void hcsr04_irq_setmode(FAR struct hcsr04_config_s *state, +static void hcsr04_irq_clear(const struct hcsr04_config_s *state); +static void hcsr04_irq_setmode(struct hcsr04_config_s *state, bool rise_mode); -static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state, +static void hcsr04_set_trigger(const struct hcsr04_config_s *state, bool on); -static int64_t hcsr04_get_clock(FAR const struct hcsr04_config_s *state); +static int64_t hcsr04_get_clock(const struct hcsr04_config_s *state); /**************************************************************************** * Private Data @@ -113,11 +113,11 @@ struct timespec ts; /* Attach the HC-SR04 interrupt handler to the GPIO interrupt */ -static int hcsr04_irq_attach(FAR struct hcsr04_config_s *state, xcpt_t isr, - FAR void *arg) +static int hcsr04_irq_attach(struct hcsr04_config_s *state, xcpt_t isr, + void *arg) { - FAR struct stm32_hcsr04config_s *priv = - (FAR struct stm32_hcsr04config_s *)state; + struct stm32_hcsr04config_s *priv = + (struct stm32_hcsr04config_s *)state; irqstate_t flags; sinfo("hcsr04_irq_attach\n"); @@ -139,11 +139,11 @@ static int hcsr04_irq_attach(FAR struct hcsr04_config_s *state, xcpt_t isr, /* Setup the interruption mode: Rising or Falling */ -static void hcsr04_irq_setmode(FAR struct hcsr04_config_s *state, +static void hcsr04_irq_setmode(struct hcsr04_config_s *state, bool rise_mode) { - FAR struct stm32_hcsr04config_s *priv = - (FAR struct stm32_hcsr04config_s *)state; + struct stm32_hcsr04config_s *priv = + (struct stm32_hcsr04config_s *)state; if (rise_mode) { @@ -159,11 +159,11 @@ static void hcsr04_irq_setmode(FAR struct hcsr04_config_s *state, /* Enable or disable the GPIO interrupt */ -static void hcsr04_irq_enable(FAR const struct hcsr04_config_s *state, - bool enable) +static void hcsr04_irq_enable(const struct hcsr04_config_s *state, + bool enable) { - FAR struct stm32_hcsr04config_s *priv = - (FAR struct stm32_hcsr04config_s *)state; + struct stm32_hcsr04config_s *priv = + (struct stm32_hcsr04config_s *)state; iinfo("%d\n", enable); @@ -173,14 +173,14 @@ static void hcsr04_irq_enable(FAR const struct hcsr04_config_s *state, /* Acknowledge/clear any pending GPIO interrupt */ -static void hcsr04_irq_clear(FAR const struct hcsr04_config_s *state) +static void hcsr04_irq_clear(const struct hcsr04_config_s *state) { /* FIXME: Nothing to do ? */ } /* Set the Trigger pin state */ -static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state, +static void hcsr04_set_trigger(const struct hcsr04_config_s *state, bool on) { stm32_gpiowrite(BOARD_HCSR04_GPIO_TRIG, on); @@ -188,7 +188,7 @@ static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state, /* Return the current Free Running clock tick */ -static int64_t hcsr04_get_clock(FAR const struct hcsr04_config_s *state) +static int64_t hcsr04_get_clock(const struct hcsr04_config_s *state) { /* Get the time from free running timer */ diff --git a/boards/arm/stm32/common/src/stm32_ihm07m1.c b/boards/arm/stm32/common/src/stm32_ihm07m1.c index 750e1b2986..bf192c2702 100644 --- a/boards/arm/stm32/common/src/stm32_ihm07m1.c +++ b/boards/arm/stm32/common/src/stm32_ihm07m1.c @@ -105,17 +105,17 @@ * Private Function Protototypes ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev); -static int board_foc_shutdown(FAR struct foc_dev_s *dev); -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state); -static int board_foc_fault_clear(FAR struct foc_dev_s *dev); -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state); -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr); +static int board_foc_setup(struct foc_dev_s *dev); +static int board_foc_shutdown(struct foc_dev_s *dev); +static int board_foc_calibration(struct foc_dev_s *dev, bool state); +static int board_foc_fault_clear(struct foc_dev_s *dev); +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state); +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr); #ifdef CONFIG_MOTOR_FOC_TRACE -static int board_foc_trace_init(FAR struct foc_dev_s *dev); -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state); +static int board_foc_trace_init(struct foc_dev_s *dev); +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state); #endif /**************************************************************************** @@ -158,7 +158,7 @@ static struct stm32_foc_board_s g_stm32_foc_board = /* Global pointer to the upper FOC driver */ -static FAR struct foc_dev_s *g_foc_dev = NULL; +static struct foc_dev_s *g_foc_dev = NULL; /**************************************************************************** * Private Functions @@ -168,7 +168,7 @@ static FAR struct foc_dev_s *g_foc_dev = NULL; * Name: board_foc_setup ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev) +static int board_foc_setup(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -189,7 +189,7 @@ static int board_foc_setup(FAR struct foc_dev_s *dev) * Name: board_foc_shutdown ****************************************************************************/ -static int board_foc_shutdown(FAR struct foc_dev_s *dev) +static int board_foc_shutdown(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -202,7 +202,7 @@ static int board_foc_shutdown(FAR struct foc_dev_s *dev) * Name: board_foc_calibration ****************************************************************************/ -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) +static int board_foc_calibration(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -215,7 +215,7 @@ static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_fault_clear ****************************************************************************/ -static int board_foc_fault_clear(FAR struct foc_dev_s *dev) +static int board_foc_fault_clear(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -228,7 +228,7 @@ static int board_foc_fault_clear(FAR struct foc_dev_s *dev) * Name: board_foc_pwm_start ****************************************************************************/ -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -251,9 +251,9 @@ static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_current_get ****************************************************************************/ -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr) +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr) { DEBUGASSERT(dev); DEBUGASSERT(curr_raw); @@ -273,7 +273,7 @@ static int board_foc_current_get(FAR struct foc_dev_s *dev, * Name: board_foc_trace_init ****************************************************************************/ -static int board_foc_trace_init(FAR struct foc_dev_s *dev) +static int board_foc_trace_init(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -293,7 +293,7 @@ static int board_foc_trace_init(FAR struct foc_dev_s *dev) * Name: board_foc_trace ****************************************************************************/ -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state) { DEBUGASSERT(dev); @@ -351,10 +351,10 @@ static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) * Name: board_ihm07m1_initialize ****************************************************************************/ -int board_ihm07m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg) +int board_ihm07m1_initialize(struct stm32_foc_adc_s *adc_cfg) { - FAR struct foc_dev_s *foc = NULL; - int ret = OK; + struct foc_dev_s *foc = NULL; + int ret = OK; DEBUGASSERT(adc_cfg); @@ -407,9 +407,9 @@ errout: int stm32_adc_setup(void) { - FAR struct adc_dev_s *adc = NULL; - int ret = OK; - static bool initialized = false; + struct adc_dev_s *adc = NULL; + int ret = OK; + static bool initialized = false; /* Initialize only once */ diff --git a/boards/arm/stm32/common/src/stm32_ihm08m1.c b/boards/arm/stm32/common/src/stm32_ihm08m1.c index e15bb8360c..3f945c7e53 100644 --- a/boards/arm/stm32/common/src/stm32_ihm08m1.c +++ b/boards/arm/stm32/common/src/stm32_ihm08m1.c @@ -113,17 +113,17 @@ * Private Function Protototypes ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev); -static int board_foc_shutdown(FAR struct foc_dev_s *dev); -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state); -static int board_foc_fault_clear(FAR struct foc_dev_s *dev); -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state); -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr); +static int board_foc_setup(struct foc_dev_s *dev); +static int board_foc_shutdown(struct foc_dev_s *dev); +static int board_foc_calibration(struct foc_dev_s *dev, bool state); +static int board_foc_fault_clear(struct foc_dev_s *dev); +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state); +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr); #ifdef CONFIG_MOTOR_FOC_TRACE -static int board_foc_trace_init(FAR struct foc_dev_s *dev); -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state); +static int board_foc_trace_init(struct foc_dev_s *dev); +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state); #endif /**************************************************************************** @@ -166,7 +166,7 @@ static struct stm32_foc_board_s g_stm32_foc_board = /* Global pointer to the upper FOC driver */ -static FAR struct foc_dev_s *g_foc_dev = NULL; +static struct foc_dev_s *g_foc_dev = NULL; /**************************************************************************** * Private Functions @@ -176,7 +176,7 @@ static FAR struct foc_dev_s *g_foc_dev = NULL; * Name: board_foc_setup ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev) +static int board_foc_setup(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -189,7 +189,7 @@ static int board_foc_setup(FAR struct foc_dev_s *dev) * Name: board_foc_shutdown ****************************************************************************/ -static int board_foc_shutdown(FAR struct foc_dev_s *dev) +static int board_foc_shutdown(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -202,7 +202,7 @@ static int board_foc_shutdown(FAR struct foc_dev_s *dev) * Name: board_foc_calibration ****************************************************************************/ -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) +static int board_foc_calibration(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -215,7 +215,7 @@ static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_fault_clear ****************************************************************************/ -static int board_foc_fault_clear(FAR struct foc_dev_s *dev) +static int board_foc_fault_clear(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -228,7 +228,7 @@ static int board_foc_fault_clear(FAR struct foc_dev_s *dev) * Name: board_foc_pwm_start ****************************************************************************/ -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -241,9 +241,9 @@ static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_current_get ****************************************************************************/ -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr) +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr) { DEBUGASSERT(dev); DEBUGASSERT(curr_raw); @@ -263,7 +263,7 @@ static int board_foc_current_get(FAR struct foc_dev_s *dev, * Name: board_foc_trace_init ****************************************************************************/ -static int board_foc_trace_init(FAR struct foc_dev_s *dev) +static int board_foc_trace_init(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -283,7 +283,7 @@ static int board_foc_trace_init(FAR struct foc_dev_s *dev) * Name: board_foc_trace ****************************************************************************/ -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state) { DEBUGASSERT(dev); @@ -341,10 +341,10 @@ static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) * Name: board_ihm08m1_initialize ****************************************************************************/ -int board_ihm08m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg) +int board_ihm08m1_initialize(struct stm32_foc_adc_s *adc_cfg) { - FAR struct foc_dev_s *foc = NULL; - int ret = OK; + struct foc_dev_s *foc = NULL; + int ret = OK; /* Initialize only once */ @@ -395,9 +395,9 @@ errout: int stm32_adc_setup(void) { - FAR struct adc_dev_s *adc = NULL; - int ret = OK; - static bool initialized = false; + struct adc_dev_s *adc = NULL; + int ret = OK; + static bool initialized = false; /* Initialize only once */ diff --git a/boards/arm/stm32/common/src/stm32_ihm16m1.c b/boards/arm/stm32/common/src/stm32_ihm16m1.c index 606f9bb231..341ec73c38 100644 --- a/boards/arm/stm32/common/src/stm32_ihm16m1.c +++ b/boards/arm/stm32/common/src/stm32_ihm16m1.c @@ -103,17 +103,17 @@ * Private Function Protototypes ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev); -static int board_foc_shutdown(FAR struct foc_dev_s *dev); -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state); -static int board_foc_fault_clear(FAR struct foc_dev_s *dev); -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state); -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr); +static int board_foc_setup(struct foc_dev_s *dev); +static int board_foc_shutdown(struct foc_dev_s *dev); +static int board_foc_calibration(struct foc_dev_s *dev, bool state); +static int board_foc_fault_clear(struct foc_dev_s *dev); +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state); +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr); #ifdef CONFIG_MOTOR_FOC_TRACE -static int board_foc_trace_init(FAR struct foc_dev_s *dev); -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state); +static int board_foc_trace_init(struct foc_dev_s *dev); +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state); #endif /**************************************************************************** @@ -156,7 +156,7 @@ static struct stm32_foc_board_s g_stm32_foc_board = /* Global pointer to the upper FOC driver */ -static FAR struct foc_dev_s *g_foc_dev = NULL; +static struct foc_dev_s *g_foc_dev = NULL; /**************************************************************************** * Private Functions @@ -166,7 +166,7 @@ static FAR struct foc_dev_s *g_foc_dev = NULL; * Name: board_foc_setup ****************************************************************************/ -static int board_foc_setup(FAR struct foc_dev_s *dev) +static int board_foc_setup(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -187,7 +187,7 @@ static int board_foc_setup(FAR struct foc_dev_s *dev) * Name: board_foc_shutdown ****************************************************************************/ -static int board_foc_shutdown(FAR struct foc_dev_s *dev) +static int board_foc_shutdown(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -200,7 +200,7 @@ static int board_foc_shutdown(FAR struct foc_dev_s *dev) * Name: board_foc_calibration ****************************************************************************/ -static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) +static int board_foc_calibration(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -213,7 +213,7 @@ static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_fault_clear ****************************************************************************/ -static int board_foc_fault_clear(FAR struct foc_dev_s *dev) +static int board_foc_fault_clear(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -226,7 +226,7 @@ static int board_foc_fault_clear(FAR struct foc_dev_s *dev) * Name: board_foc_pwm_start ****************************************************************************/ -static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) +static int board_foc_pwm_start(struct foc_dev_s *dev, bool state) { DEBUGASSERT(dev); @@ -249,9 +249,9 @@ static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state) * Name: board_foc_current_get ****************************************************************************/ -static int board_foc_current_get(FAR struct foc_dev_s *dev, - FAR int16_t *curr_raw, - FAR foc_current_t *curr) +static int board_foc_current_get(struct foc_dev_s *dev, + int16_t *curr_raw, + foc_current_t *curr) { DEBUGASSERT(dev); DEBUGASSERT(curr_raw); @@ -271,7 +271,7 @@ static int board_foc_current_get(FAR struct foc_dev_s *dev, * Name: board_foc_trace_init ****************************************************************************/ -static int board_foc_trace_init(FAR struct foc_dev_s *dev) +static int board_foc_trace_init(struct foc_dev_s *dev) { DEBUGASSERT(dev); @@ -291,7 +291,7 @@ static int board_foc_trace_init(FAR struct foc_dev_s *dev) * Name: board_foc_trace ****************************************************************************/ -static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) +static void board_foc_trace(struct foc_dev_s *dev, int type, bool state) { DEBUGASSERT(dev); @@ -349,10 +349,10 @@ static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state) * Name: board_ihm16m1_initialize ****************************************************************************/ -int board_ihm16m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg) +int board_ihm16m1_initialize(struct stm32_foc_adc_s *adc_cfg) { - FAR struct foc_dev_s *foc = NULL; - int ret = OK; + struct foc_dev_s *foc = NULL; + int ret = OK; DEBUGASSERT(adc_cfg); @@ -405,9 +405,9 @@ errout: int stm32_adc_setup(void) { - FAR struct adc_dev_s *adc = NULL; - int ret = OK; - static bool initialized = false; + struct adc_dev_s *adc = NULL; + int ret = OK; + static bool initialized = false; /* Initialize only once */ diff --git a/boards/arm/stm32/common/src/stm32_ina219.c b/boards/arm/stm32/common/src/stm32_ina219.c index 3b6dd792ed..21251fb7e4 100644 --- a/boards/arm/stm32/common/src/stm32_ina219.c +++ b/boards/arm/stm32/common/src/stm32_ina219.c @@ -76,7 +76,7 @@ int board_ina219_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_l3gd20.c b/boards/arm/stm32/common/src/stm32_l3gd20.c index e32cfb12c5..3747724a90 100644 --- a/boards/arm/stm32/common/src/stm32_l3gd20.c +++ b/boards/arm/stm32/common/src/stm32_l3gd20.c @@ -43,7 +43,7 @@ * Private Function Prototypes ****************************************************************************/ -static int l3gd20_attach(FAR struct l3gd20_config_s * cfg, xcpt_t irq); +static int l3gd20_attach(struct l3gd20_config_s * cfg, xcpt_t irq); /**************************************************************************** * Private Data @@ -69,7 +69,7 @@ static struct l3gd20_config_s g_l3gd20_config = * ****************************************************************************/ -static int l3gd20_attach(FAR struct l3gd20_config_s *cfg, xcpt_t irq) +static int l3gd20_attach(struct l3gd20_config_s *cfg, xcpt_t irq) { return stm32_gpiosetevent(BOARD_L3GD20_GPIO_DREADY, true, false, true, irq, NULL); diff --git a/boards/arm/stm32/common/src/stm32_lcd_backpack.c b/boards/arm/stm32/common/src/stm32_lcd_backpack.c index 662acc6841..d7a75e2fa8 100644 --- a/boards/arm/stm32/common/src/stm32_lcd_backpack.c +++ b/boards/arm/stm32/common/src/stm32_lcd_backpack.c @@ -58,9 +58,9 @@ int board_lcd_backpack_init(int devno, int busno, int rows, int cols) { - FAR struct pcf8574_lcd_backpack_config_s cfg = + struct pcf8574_lcd_backpack_config_s cfg = LCD_I2C_BACKPACK_CFG_SAINSMART; - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_lis3dsh.c b/boards/arm/stm32/common/src/stm32_lis3dsh.c index 3f9c78ab66..b57067ee8d 100644 --- a/boards/arm/stm32/common/src/stm32_lis3dsh.c +++ b/boards/arm/stm32/common/src/stm32_lis3dsh.c @@ -60,7 +60,7 @@ * ****************************************************************************/ -int attach_disc_lis3dsh(FAR struct lis3dsh_config_s *config, +int attach_disc_lis3dsh(struct lis3dsh_config_s *config, xcpt_t interrupt_handler) { return stm32_gpiosetevent(BOARD_LIS3DSH_GPIO_EXT0, true, false, false, diff --git a/boards/arm/stm32/common/src/stm32_lm75.c b/boards/arm/stm32/common/src/stm32_lm75.c index 408bfcdfe3..ee9751ad81 100644 --- a/boards/arm/stm32/common/src/stm32_lm75.c +++ b/boards/arm/stm32/common/src/stm32_lm75.c @@ -78,7 +78,7 @@ int board_lm75_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_max31855.c b/boards/arm/stm32/common/src/stm32_max31855.c index db6f7a0403..9de0424cca 100644 --- a/boards/arm/stm32/common/src/stm32_max31855.c +++ b/boards/arm/stm32/common/src/stm32_max31855.c @@ -56,7 +56,7 @@ int board_max31855_initialize(int devno, int busno) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_max6675.c b/boards/arm/stm32/common/src/stm32_max6675.c index d290d50859..5124b1727c 100644 --- a/boards/arm/stm32/common/src/stm32_max6675.c +++ b/boards/arm/stm32/common/src/stm32_max6675.c @@ -77,7 +77,7 @@ int board_max6675_initialize(int devno, int busno) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_mlx90614.c b/boards/arm/stm32/common/src/stm32_mlx90614.c index 5948d9ad3e..c33cfb2deb 100644 --- a/boards/arm/stm32/common/src/stm32_mlx90614.c +++ b/boards/arm/stm32/common/src/stm32_mlx90614.c @@ -61,7 +61,7 @@ int board_mlx90614_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_mpl115a.c b/boards/arm/stm32/common/src/stm32_mpl115a.c index ef9d23326d..3bf0e89647 100644 --- a/boards/arm/stm32/common/src/stm32_mpl115a.c +++ b/boards/arm/stm32/common/src/stm32_mpl115a.c @@ -59,7 +59,7 @@ int board_mpl115a_initialize(int devno, int busno) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; char devpath[12]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_nrf24l01.c b/boards/arm/stm32/common/src/stm32_nrf24l01.c index 5c52bc0652..a85d5d092f 100644 --- a/boards/arm/stm32/common/src/stm32_nrf24l01.c +++ b/boards/arm/stm32/common/src/stm32_nrf24l01.c @@ -52,21 +52,21 @@ * Private Function Prototypes ****************************************************************************/ -static int nrf24l01_irq_attach(xcpt_t isr, FAR void *arg); +static int nrf24l01_irq_attach(xcpt_t isr, void *arg); static void nrf24l01_chip_enable(bool enable); /**************************************************************************** * Private Data ****************************************************************************/ -static FAR struct nrf24l01_config_s nrf_cfg = +static struct nrf24l01_config_s nrf_cfg = { .irqattach = nrf24l01_irq_attach, .chipenable = nrf24l01_chip_enable, }; static xcpt_t g_isr; -static FAR void *g_arg; +static void *g_arg; /**************************************************************************** * Public Data @@ -76,7 +76,7 @@ static FAR void *g_arg; * Private Functions ****************************************************************************/ -static int nrf24l01_irq_attach(xcpt_t isr, FAR void *arg) +static int nrf24l01_irq_attach(xcpt_t isr, void *arg) { wlinfo("Attach IRQ\n"); g_isr = isr; @@ -112,7 +112,7 @@ static void nrf24l01_chip_enable(bool enable) int board_nrf24l01_initialize(int busno) { - FAR struct spi_dev_s *spidev; + struct spi_dev_s *spidev; int result; /* Setup CE & IRQ line IOs */ diff --git a/boards/arm/stm32/common/src/stm32_nunchuck.c b/boards/arm/stm32/common/src/stm32_nunchuck.c index 29787f2d4e..31259d14d7 100644 --- a/boards/arm/stm32/common/src/stm32_nunchuck.c +++ b/boards/arm/stm32/common/src/stm32_nunchuck.c @@ -82,7 +82,7 @@ int board_nunchuck_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[15]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_ssd1306.c b/boards/arm/stm32/common/src/stm32_ssd1306.c index 2b2ea8af8e..204bda48cd 100644 --- a/boards/arm/stm32/common/src/stm32_ssd1306.c +++ b/boards/arm/stm32/common/src/stm32_ssd1306.c @@ -39,7 +39,7 @@ * Private Data ****************************************************************************/ -static FAR struct lcd_dev_s *g_lcddev; +static struct lcd_dev_s *g_lcddev; /**************************************************************************** * Public Functions @@ -61,7 +61,7 @@ static FAR struct lcd_dev_s *g_lcddev; #ifdef CONFIG_LCD_SSD1306_I2C int board_ssd1306_initialize(int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; const int devno = 0; /* Initialize I2C */ @@ -109,7 +109,7 @@ int board_ssd1306_initialize(int busno) #ifdef CONFIG_LCD_SSD1306_SPI int board_ssd1306_initialize(int busno) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; const int devno = 0; /* Initialize SPI */ @@ -152,7 +152,7 @@ int board_ssd1306_initialize(int busno) * ****************************************************************************/ -FAR struct lcd_dev_s *board_ssd1306_getdev(void) +struct lcd_dev_s *board_ssd1306_getdev(void) { return g_lcddev; } diff --git a/boards/arm/stm32/common/src/stm32_veml6070.c b/boards/arm/stm32/common/src/stm32_veml6070.c index cff493a803..613d6f6d69 100644 --- a/boards/arm/stm32/common/src/stm32_veml6070.c +++ b/boards/arm/stm32/common/src/stm32_veml6070.c @@ -82,7 +82,7 @@ int board_veml6070_initialize(int devno, int busno) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; char devpath[14]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_ws2812.c b/boards/arm/stm32/common/src/stm32_ws2812.c index fcd34144f7..9b5cd5eb78 100644 --- a/boards/arm/stm32/common/src/stm32_ws2812.c +++ b/boards/arm/stm32/common/src/stm32_ws2812.c @@ -82,7 +82,7 @@ int board_ws2812_initialize(int devno, int spino, uint16_t nleds) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; char devpath[13]; int ret; diff --git a/boards/arm/stm32/common/src/stm32_xen1210.c b/boards/arm/stm32/common/src/stm32_xen1210.c index 4eaf24a8dd..86cdb47d6f 100644 --- a/boards/arm/stm32/common/src/stm32_xen1210.c +++ b/boards/arm/stm32/common/src/stm32_xen1210.c @@ -60,9 +60,9 @@ struct stm32_xen1210config_s /* Additional private definitions only known to this driver */ - XEN1210_HANDLE handle; /* The XEN1210 driver handle */ - xen1210_handler_t handler; /* The XEN1210 interrupt handler */ - FAR void *arg; /* Argument to pass to the interrupt handler */ + XEN1210_HANDLE handle; /* The XEN1210 driver handle */ + xen1210_handler_t handler; /* The XEN1210 interrupt handler */ + void *arg; /* Argument to pass to the interrupt handler */ }; /**************************************************************************** @@ -78,10 +78,10 @@ struct stm32_xen1210config_s * clear - Acknowledge/clear any pending GPIO interrupt */ -static int xen1210_attach(FAR struct xen1210_config_s *state, - xen1210_handler_t handler, FAR void *arg); -static void xen1210_enable(FAR struct xen1210_config_s *state, bool enable); -static void xen1210_clear(FAR struct xen1210_config_s *state); +static int xen1210_attach(struct xen1210_config_s *state, + xen1210_handler_t handler, void *arg); +static void xen1210_enable(struct xen1210_config_s *state, bool enable); +static void xen1210_clear(struct xen1210_config_s *state); /**************************************************************************** * Private Data @@ -114,7 +114,7 @@ static struct stm32_xen1210config_s g_xen1210config = /* This is the XEN1210 Interrupt handler */ -static int xen1210_interrupt(int irq, FAR void *context, FAR void *arg) +static int xen1210_interrupt(int irq, void *context, void *arg) { /* Verify that we have a handler attached */ @@ -137,11 +137,11 @@ static int xen1210_interrupt(int irq, FAR void *context, FAR void *arg) * clear - Acknowledge/clear any pending GPIO interrupt */ -static int xen1210_attach(FAR struct xen1210_config_s *state, - xen1210_handler_t handler, FAR void *arg) +static int xen1210_attach(struct xen1210_config_s *state, + xen1210_handler_t handler, void *arg) { - FAR struct stm32_xen1210config_s *priv = - (FAR struct stm32_xen1210config_s *)state; + struct stm32_xen1210config_s *priv = + (struct stm32_xen1210config_s *)state; sninfo("Saving handler %p\n", handler); DEBUGASSERT(priv); @@ -155,7 +155,7 @@ static int xen1210_attach(FAR struct xen1210_config_s *state, return OK; } -static void xen1210_enable(FAR struct xen1210_config_s *state, bool enable) +static void xen1210_enable(struct xen1210_config_s *state, bool enable) { irqstate_t flags; @@ -184,7 +184,7 @@ static void xen1210_enable(FAR struct xen1210_config_s *state, bool enable) leave_critical_section(flags); } -static void xen1210_clear(FAR struct xen1210_config_s *state) +static void xen1210_clear(struct xen1210_config_s *state) { /* Does nothing */ } @@ -257,7 +257,7 @@ static int xen1210_pwm_setup(void) int board_xen1210_initialize(int devno, int busno) { - FAR struct spi_dev_s *dev; + struct spi_dev_s *dev; int ret; /* Check if we are already initialized */ @@ -289,7 +289,7 @@ int board_xen1210_initialize(int devno, int busno) g_xen1210config.handle = xen1210_instantiate(dev, - (FAR struct xen1210_config_s *) + (struct xen1210_config_s *) &g_xen1210config); if (!g_xen1210config.handle) { diff --git a/boards/arm/stm32/common/src/stm32_zerocross.c b/boards/arm/stm32/common/src/stm32_zerocross.c index 59bbe6e223..ea28381d5c 100644 --- a/boards/arm/stm32/common/src/stm32_zerocross.c +++ b/boards/arm/stm32/common/src/stm32_zerocross.c @@ -39,11 +39,11 @@ * Private Function Prototypes ****************************************************************************/ -static void zcross_enable(FAR const struct zc_lowerhalf_s *lower, - zc_interrupt_t handler, FAR void *arg); +static void zcross_enable(const struct zc_lowerhalf_s *lower, + zc_interrupt_t handler, void *arg); static void zcross_disable(void); -static int zcross_interrupt(int irq, FAR void *context, FAR void *arg); +static int zcross_interrupt(int irq, void *context, void *arg); /**************************************************************************** * Private Data @@ -52,7 +52,7 @@ static int zcross_interrupt(int irq, FAR void *context, FAR void *arg); /* Current interrupt handler and argument */ static zc_interrupt_t g_zcrosshandler; -static FAR void *g_zcrossarg; +static void *g_zcrossarg; /* This is the zero cross lower half driver interface */ @@ -74,8 +74,8 @@ static struct zc_lowerhalf_s g_zcrosslower = * ****************************************************************************/ -static void zcross_enable(FAR const struct zc_lowerhalf_s *lower, - zc_interrupt_t handler, FAR void *arg) +static void zcross_enable(const struct zc_lowerhalf_s *lower, + zc_interrupt_t handler, void *arg) { irqstate_t flags; bool rising = false; @@ -134,7 +134,7 @@ static void zcross_disable(void) * ****************************************************************************/ -static int zcross_interrupt(int irq, FAR void *context, FAR void *arg) +static int zcross_interrupt(int irq, void *context, void *arg) { DEBUGASSERT(g_zcrosshandler != NULL); if (g_zcrosshandler) diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c b/boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c index c1f5f8c7d3..3926f1a560 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c @@ -128,7 +128,7 @@ #ifdef HAVE_I2CTOOL static void stm32_i2c_register(int bus) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(bus); diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_buttons.c b/boards/arm/stm32/fire-stm32v2/src/stm32_buttons.c index 2b30f0973f..ff064ec595 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_buttons.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_buttons.c @@ -122,7 +122,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { uint16_t gpio; int ret; diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_enc28j60.c b/boards/arm/stm32/fire-stm32v2/src/stm32_enc28j60.c index cfb8a2bd78..d1bed4a93b 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_enc28j60.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_enc28j60.c @@ -99,17 +99,17 @@ struct stm32_lower_s { const struct enc_lower_s lower; /* Low-level MCU interface */ xcpt_t handler; /* ENC28J60 interrupt handler */ - FAR void *arg; /* Argument that accompanies the interrupt */ + void *arg; /* Argument that accompanies the interrupt */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, - FAR void *arg); -static void up_enable(FAR const struct enc_lower_s *lower); -static void up_disable(FAR const struct enc_lower_s *lower); +static int up_attach(const struct enc_lower_s *lower, xcpt_t handler, + void *arg); +static void up_enable(const struct enc_lower_s *lower); +static void up_disable(const struct enc_lower_s *lower); /**************************************************************************** * Private Data @@ -140,10 +140,10 @@ static struct stm32_lower_s g_enclower = * Name: struct enc_lower_s methods ****************************************************************************/ -static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, - FAR void *arg) +static int up_attach(const struct enc_lower_s *lower, xcpt_t handler, + void *arg) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; /* Just save the handler for use when the interrupt is enabled */ @@ -152,9 +152,9 @@ static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, return OK; } -static void up_enable(FAR const struct enc_lower_s *lower) +static void up_enable(const struct enc_lower_s *lower) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; DEBUGASSERT(priv->handler); stm32_gpiosetevent(GPIO_ENC28J60_INTR, false, true, true, @@ -166,7 +166,7 @@ static void up_enable(FAR const struct enc_lower_s *lower) * lost. */ -static void up_disable(FAR const struct enc_lower_s *lower) +static void up_disable(const struct enc_lower_s *lower) { stm32_gpiosetevent(GPIO_ENC28J60_INTR, false, true, true, NULL, NULL); @@ -182,7 +182,7 @@ static void up_disable(FAR const struct enc_lower_s *lower) void arm_netinitialize(void) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Assumptions: diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_mmcsd.c b/boards/arm/stm32/fire-stm32v2/src/stm32_mmcsd.c index dc2994d84c..c49186e3b2 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_mmcsd.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_mmcsd.c @@ -71,7 +71,7 @@ int stm32_sdinitialize(int minor) { #ifdef HAVE_MMCSD - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; int ret; /* First, get an instance of the SDIO interface */ diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_spi.c b/boards/arm/stm32/fire-stm32v2/src/stm32_spi.c index 79ef0675b5..32c725e904 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_spi.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_spi.c @@ -117,7 +117,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -149,14 +149,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -170,7 +170,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_usbdev.c b/boards/arm/stm32/fire-stm32v2/src/stm32_usbdev.c index d641d24780..dabce175e5 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_usbdev.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_usbdev.c @@ -78,7 +78,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); #if 0 /* REVISIT */ @@ -99,7 +99,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_w25.c b/boards/arm/stm32/fire-stm32v2/src/stm32_w25.c index 5f3105aa4a..da6810905d 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_w25.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_w25.c @@ -79,8 +79,8 @@ int stm32_w25initialize(int minor) { #ifdef HAVE_W25 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; #ifdef CONFIG_FS_NXFFS char devname[12]; #endif diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c b/boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c index f8137ccf29..444bac8cdd 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c @@ -94,7 +94,7 @@ ****************************************************************************/ #ifdef CONFIG_MMCSD -static FAR struct sdio_dev_s *g_sdiodev; +static struct sdio_dev_s *g_sdiodev; #endif /**************************************************************************** @@ -110,7 +110,7 @@ static FAR struct sdio_dev_s *g_sdiodev; ****************************************************************************/ #ifdef NSH_HAVEMMCSD -static int nsh_cdinterrupt(int irq, FAR void *context, FAR void *arg) +static int nsh_cdinterrupt(int irq, void *context, void *arg) { static bool inserted = 0xff; /* Impossible value */ bool present; diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_buttons.c b/boards/arm/stm32/hymini-stm32v/src/stm32_buttons.c index c7103d03e5..4f367bec2c 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_buttons.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_buttons.c @@ -117,7 +117,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { uint32_t pinset = GPIO_BTN_KEYA; int ret = -EINVAL; diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c b/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c index 33fe1ae7ae..1d6e008b52 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c @@ -119,17 +119,17 @@ static void lcd_clear(uint16_t color); /* LCD Data Transfer Methods */ static int lcd_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, size_t npixels); + const uint8_t *buffer, size_t npixels); static int lcd_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, size_t npixels); + uint8_t *buffer, size_t npixels); /* LCD Configuration */ -static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo); -static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, +static int lcd_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo); +static int lcd_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo); + struct lcd_planeinfo_s *pinfo); /* LCD RGB Mapping */ @@ -429,11 +429,11 @@ static void lcd_setcursor(unsigned int x, unsigned int y) ****************************************************************************/ static int lcd_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, + const uint8_t *buffer, size_t npixels) { int i; - FAR const uint16_t *src = (FAR const uint16_t *) buffer; + const uint16_t *src = (const uint16_t *) buffer; /* Buffer must be provided and aligned to a 16-bit address boundary */ @@ -466,10 +466,10 @@ static int lcd_putrun(fb_coord_t row, fb_coord_t col, * ****************************************************************************/ -static int lcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, +static int lcd_getrun(fb_coord_t row, fb_coord_t col, uint8_t *buffer, size_t npixels) { - FAR uint16_t *dest = (FAR uint16_t *) buffer; + uint16_t *dest = (uint16_t *) buffer; int i; /* Buffer must be provided and aligned to a 16-bit address boundary */ @@ -501,8 +501,8 @@ static int lcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, * ****************************************************************************/ -static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo) +static int lcd_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", @@ -521,8 +521,8 @@ static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, * ****************************************************************************/ -static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo) +static int lcd_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, + struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); @@ -915,7 +915,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return &g_lcddev.dev; diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_spi.c b/boards/arm/stm32/hymini-stm32v/src/stm32_spi.c index acaf801fda..a864d88836 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_spi.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_spi.c @@ -95,7 +95,7 @@ void stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -109,35 +109,35 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c b/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c index 6a574b1f32..9ef75ac701 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c @@ -88,14 +88,14 @@ /* Low Level LCD access */ -static void stm32_select(FAR struct ssd1289_lcd_s *dev); -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev); -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index); +static void stm32_select(struct ssd1289_lcd_s *dev); +static void stm32_deselect(struct ssd1289_lcd_s *dev); +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index); #ifndef CONFIG_SSD1289_WRONLY -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev); +static uint16_t stm32_read(struct ssd1289_lcd_s *dev); #endif -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data); -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power); +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data); +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power); static void stm32_extmemgpios(const uint16_t *gpios, int ngpios); @@ -144,7 +144,7 @@ static struct ssd1289_lcd_s g_ssd1289 = /* The saved instance of the LCD driver */ -static FAR struct lcd_dev_s *g_ssd1289drvr; +static struct lcd_dev_s *g_ssd1289drvr; /**************************************************************************** * Private Functions @@ -158,7 +158,7 @@ static FAR struct lcd_dev_s *g_ssd1289drvr; * ****************************************************************************/ -static void stm32_select(FAR struct ssd1289_lcd_s *dev) +static void stm32_select(struct ssd1289_lcd_s *dev) { /* Does not apply to this hardware */ } @@ -171,7 +171,7 @@ static void stm32_select(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) +static void stm32_deselect(struct ssd1289_lcd_s *dev) { /* Does not apply to this hardware */ } @@ -184,7 +184,7 @@ static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index) { putreg16((uint16_t)index, LCD_INDEX); } @@ -198,7 +198,7 @@ static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) ****************************************************************************/ #ifndef CONFIG_SSD1289_WRONLY -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) +static uint16_t stm32_read(struct ssd1289_lcd_s *dev) { return getreg16(LCD_DATA); } @@ -212,7 +212,7 @@ static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data) { putreg16((uint16_t)data, LCD_DATA); } @@ -227,7 +227,7 @@ static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) * ****************************************************************************/ -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power) +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power) { DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); @@ -463,7 +463,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return g_ssd1289drvr; diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_ts.c b/boards/arm/stm32/hymini-stm32v/src/stm32_ts.c index e4f1b6314c..876906719e 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_ts.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_ts.c @@ -48,19 +48,19 @@ * Private Function Prototypes ****************************************************************************/ -static int hymini_ts_irq_attach(FAR struct ads7843e_config_s *state, +static int hymini_ts_irq_attach(struct ads7843e_config_s *state, xcpt_t isr); -static void hymini_ts_irq_enable(FAR struct ads7843e_config_s *state, +static void hymini_ts_irq_enable(struct ads7843e_config_s *state, bool enable); -static void hymini_ts_irq_clear(FAR struct ads7843e_config_s *state); -static bool hymini_ts_busy(FAR struct ads7843e_config_s *state); -static bool hymini_ts_pendown(FAR struct ads7843e_config_s *state); +static void hymini_ts_irq_clear(struct ads7843e_config_s *state); +static bool hymini_ts_busy(struct ads7843e_config_s *state); +static bool hymini_ts_pendown(struct ads7843e_config_s *state); /**************************************************************************** * Private Data ****************************************************************************/ -static FAR struct ads7843e_config_s ts_cfg = +static struct ads7843e_config_s ts_cfg = { .frequency = CONFIG_ADS7843E_FREQUENCY, @@ -79,7 +79,7 @@ static xcpt_t tc_isr; /* Attach the ADS7843E interrupt handler to the GPIO interrupt */ -static int hymini_ts_irq_attach(FAR struct ads7843e_config_s *state, +static int hymini_ts_irq_attach(struct ads7843e_config_s *state, xcpt_t isr) { iinfo("hymini_ts_irq_attach\n"); @@ -91,7 +91,7 @@ static int hymini_ts_irq_attach(FAR struct ads7843e_config_s *state, /* Enable or disable the GPIO interrupt */ -static void hymini_ts_irq_enable(FAR struct ads7843e_config_s *state, +static void hymini_ts_irq_enable(struct ads7843e_config_s *state, bool enable) { iinfo("%d\n", enable); @@ -102,14 +102,14 @@ static void hymini_ts_irq_enable(FAR struct ads7843e_config_s *state, /* Acknowledge/clear any pending GPIO interrupt */ -static void hymini_ts_irq_clear(FAR struct ads7843e_config_s *state) +static void hymini_ts_irq_clear(struct ads7843e_config_s *state) { /* FIXME Nothing to do ? */ } /* As the busy line is not connected, we just wait a little bit here */ -static bool hymini_ts_busy(FAR struct ads7843e_config_s *state) +static bool hymini_ts_busy(struct ads7843e_config_s *state) { up_mdelay(50); return false; @@ -117,7 +117,7 @@ static bool hymini_ts_busy(FAR struct ads7843e_config_s *state) /* Return the state of the pen down GPIO input */ -static bool hymini_ts_pendown(FAR struct ads7843e_config_s *state) +static bool hymini_ts_pendown(struct ads7843e_config_s *state) { bool pin_value = stm32_gpioread(GPIO_TS_IRQ); return !pin_value; @@ -142,7 +142,7 @@ static bool hymini_ts_pendown(FAR struct ads7843e_config_s *state) int stm32_tsc_setup(int minor) { - FAR struct spi_dev_s *dev; + struct spi_dev_s *dev; iinfo("minor %d\n", minor); diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_usbdev.c b/boards/arm/stm32/hymini-stm32v/src/stm32_usbdev.c index ad5bfde417..75a2dd155c 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_usbdev.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_usbdev.c @@ -78,7 +78,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); stm32_gpiowrite(GPIO_USB_PULLUP, !enable); @@ -97,7 +97,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c b/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c index fc5c6d376e..f7a52ecc8e 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c @@ -80,7 +80,7 @@ int board_usbmsc_initialize(int port) */ #ifndef CONFIG_NSH_BUILTIN_APPS - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; int ret; /* First, get an instance of the SDIO interface */ diff --git a/boards/arm/stm32/maple/src/stm32_lcd.c b/boards/arm/stm32/maple/src/stm32_lcd.c index e01a7ae79c..778648b624 100644 --- a/boards/arm/stm32/maple/src/stm32_lcd.c +++ b/boards/arm/stm32/maple/src/stm32_lcd.c @@ -127,7 +127,7 @@ static void up_lcdsetvcomfreq(unsigned int freq) STM32_TIM_SETPERIOD(tim, TIMER_FREQ / freq); } -static FAR struct memlcd_priv_s memlcd_priv = +static struct memlcd_priv_s memlcd_priv = { .attachirq = up_lcdirqattach, .dispcontrol = up_lcddispcontrol, @@ -151,7 +151,7 @@ static FAR struct memlcd_priv_s memlcd_priv = * ****************************************************************************/ -FAR int board_lcd_initialize(void) +int board_lcd_initialize(void) { lcdinfo("Initializing lcd\n"); @@ -189,7 +189,7 @@ FAR int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return l_lcddev; diff --git a/boards/arm/stm32/maple/src/stm32_spi.c b/boards/arm/stm32/maple/src/stm32_spi.c index db99ba87fa..4e2d0ab8c3 100644 --- a/boards/arm/stm32/maple/src/stm32_spi.c +++ b/boards/arm/stm32/maple/src/stm32_spi.c @@ -89,7 +89,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -103,12 +103,12 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, # endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; @@ -116,17 +116,17 @@ int stm32_spi1cmddata(FAR struct spi_dev_s *dev, #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; diff --git a/boards/arm/stm32/maple/src/stm32_usbdev.c b/boards/arm/stm32/maple/src/stm32_usbdev.c index 7650651cca..1256bdd571 100644 --- a/boards/arm/stm32/maple/src/stm32_usbdev.c +++ b/boards/arm/stm32/maple/src/stm32_usbdev.c @@ -77,7 +77,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); stm32_gpiowrite(GPIO_USB_PULLUP, !enable); @@ -95,7 +95,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h b/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h index edecf1ac7c..8dae92c49e 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h +++ b/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h @@ -287,7 +287,7 @@ int stm32_tsc_setup(int minor); ****************************************************************************/ #ifdef CONFIG_AUDIO_VS1053 -void up_vs1053initialize(FAR struct spi_dev_s *spi); +void up_vs1053initialize(struct spi_dev_s *spi); #endif #endif /* __ASSEMBLY__ */ diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c index 3f1aee3718..ef47147d0f 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c @@ -176,8 +176,8 @@ int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_STM32_SPI3 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; #endif int ret = OK; @@ -219,7 +219,7 @@ int board_app_initialize(uintptr_t arg) int partoffset; const char *partstring = CONFIG_MIKROE_FLASH_PART_LIST; const char *ptr; - FAR struct mtd_dev_s *mtd_part; + struct mtd_dev_s *mtd_part; char partname[16]; /* Now create a partition on the FLASH device */ diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt2.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt2.c index 9cc537536e..9b4d1ca94a 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt2.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt2.c @@ -94,7 +94,7 @@ struct stm32f4_dev_s struct mio283qt2_lcd_s dev; /* The externally visible part of the driver */ bool grammode; /* true=Writing to GRAM (16-bit write vs 8-bit) */ bool firstread; /* First GRAM read? */ - FAR struct lcd_dev_s *drvr; /* The saved instance of the LCD driver */ + struct lcd_dev_s *drvr; /* The saved instance of the LCD driver */ }; /**************************************************************************** @@ -103,14 +103,14 @@ struct stm32f4_dev_s /* Low Level LCD access */ -static void stm32_select(FAR struct mio283qt2_lcd_s *dev); -static void stm32_deselect(FAR struct mio283qt2_lcd_s *dev); -static void stm32_index(FAR struct mio283qt2_lcd_s *dev, uint8_t index); +static void stm32_select(struct mio283qt2_lcd_s *dev); +static void stm32_deselect(struct mio283qt2_lcd_s *dev); +static void stm32_index(struct mio283qt2_lcd_s *dev, uint8_t index); #if !defined(CONFIG_MIO283QT2_WRONLY) && !defined(CONFIG_LCD_NOGETRUN) -static uint16_t stm32_read(FAR struct mio283qt2_lcd_s *dev); +static uint16_t stm32_read(struct mio283qt2_lcd_s *dev); #endif -static void stm32_write(FAR struct mio283qt2_lcd_s *dev, uint16_t data); -static void stm32_backlight(FAR struct mio283qt2_lcd_s *dev, int power); +static void stm32_write(struct mio283qt2_lcd_s *dev, uint16_t data); +static void stm32_backlight(struct mio283qt2_lcd_s *dev, int power); /**************************************************************************** * Private Data @@ -196,7 +196,7 @@ static inline void stm32_data(void) * ****************************************************************************/ -static void stm32_select(FAR struct mio283qt2_lcd_s *dev) +static void stm32_select(struct mio283qt2_lcd_s *dev) { /* CS low selects */ @@ -211,7 +211,7 @@ static void stm32_select(FAR struct mio283qt2_lcd_s *dev) * ****************************************************************************/ -static void stm32_deselect(FAR struct mio283qt2_lcd_s *dev) +static void stm32_deselect(struct mio283qt2_lcd_s *dev) { /* CS high de-selects */ @@ -226,9 +226,9 @@ static void stm32_deselect(FAR struct mio283qt2_lcd_s *dev) * ****************************************************************************/ -static void stm32_index(FAR struct mio283qt2_lcd_s *dev, uint8_t index) +static void stm32_index(struct mio283qt2_lcd_s *dev, uint8_t index) { - FAR struct stm32f4_dev_s *priv = (FAR struct stm32f4_dev_s *)dev; + struct stm32f4_dev_s *priv = (struct stm32f4_dev_s *)dev; /* Setup to write in command mode (vs data mode) */ @@ -271,9 +271,9 @@ static void stm32_index(FAR struct mio283qt2_lcd_s *dev, uint8_t index) ****************************************************************************/ #if !defined(CONFIG_MIO283QT2_WRONLY) && !defined(CONFIG_LCD_NOGETRUN) -static uint16_t stm32_read(FAR struct mio283qt2_lcd_s *dev) +static uint16_t stm32_read(struct mio283qt2_lcd_s *dev) { - FAR struct stm32f4_dev_s *priv = (FAR struct stm32f4_dev_s *)dev; + struct stm32f4_dev_s *priv = (struct stm32f4_dev_s *)dev; uint32_t * volatile portsetreset = (uint32_t *) STM32_GPIOE_BSRR; uint32_t * volatile portmode = (uint32_t *) STM32_GPIOE_MODER; uint32_t * volatile portinput = (uint32_t *) STM32_GPIOE_IDR; @@ -347,9 +347,9 @@ static uint16_t stm32_read(FAR struct mio283qt2_lcd_s *dev) * ****************************************************************************/ -static void stm32_write(FAR struct mio283qt2_lcd_s *dev, uint16_t data) +static void stm32_write(struct mio283qt2_lcd_s *dev, uint16_t data) { - FAR struct stm32f4_dev_s *priv = (FAR struct stm32f4_dev_s *)dev; + struct stm32f4_dev_s *priv = (struct stm32f4_dev_s *)dev; /* Write the data register to the 8-bit GPIO pin bus. We are violating the * datasheet here a little by driving the WR pin low at the same time as @@ -386,7 +386,7 @@ static void stm32_write(FAR struct mio283qt2_lcd_s *dev, uint16_t data) * ****************************************************************************/ -static void stm32_backlight(FAR struct mio283qt2_lcd_s *dev, int power) +static void stm32_backlight(struct mio283qt2_lcd_s *dev, int power) { /* For now, we just control the backlight as a discrete. Pulse width * modulation would be required to vary the backlight level. A low value @@ -504,7 +504,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return g_stm32f4_lcd.drvr; diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt9a.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt9a.c index 324f8d37dd..27e3569f1a 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt9a.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_mio283qt9a.c @@ -91,10 +91,10 @@ struct stm32f4_dev_s { - struct mio283qt9a_lcd_s dev; /* The externally visible part of the driver */ - bool grammode; /* true=Writing to GRAM (16-bit write vs 8-bit) */ - bool firstread; /* First GRAM read? */ - FAR struct lcd_dev_s *drvr; /* The saved instance of the LCD driver */ + struct mio283qt9a_lcd_s dev; /* The externally visible part of the driver */ + bool grammode; /* true=Writing to GRAM (16-bit write vs 8-bit) */ + bool firstread; /* First GRAM read? */ + struct lcd_dev_s *drvr; /* The saved instance of the LCD driver */ }; /**************************************************************************** @@ -103,14 +103,14 @@ struct stm32f4_dev_s /* Low Level LCD access */ -static void stm32_select(FAR struct mio283qt9a_lcd_s *dev); -static void stm32_deselect(FAR struct mio283qt9a_lcd_s *dev); -static void stm32_index(FAR struct mio283qt9a_lcd_s *dev, uint8_t index); +static void stm32_select(struct mio283qt9a_lcd_s *dev); +static void stm32_deselect(struct mio283qt9a_lcd_s *dev); +static void stm32_index(struct mio283qt9a_lcd_s *dev, uint8_t index); #if !defined(CONFIG_MIO283QT2_WRONLY) && !defined(CONFIG_LCD_NOGETRUN) -static uint16_t stm32_read(FAR struct mio283qt9a_lcd_s *dev); +static uint16_t stm32_read(struct mio283qt9a_lcd_s *dev); #endif -static void stm32_write(FAR struct mio283qt9a_lcd_s *dev, uint16_t data); -static void stm32_backlight(FAR struct mio283qt9a_lcd_s *dev, int power); +static void stm32_write(struct mio283qt9a_lcd_s *dev, uint16_t data); +static void stm32_backlight(struct mio283qt9a_lcd_s *dev, int power); /**************************************************************************** * Private Data @@ -196,7 +196,7 @@ static inline void stm32_data(void) * ****************************************************************************/ -static void stm32_select(FAR struct mio283qt9a_lcd_s *dev) +static void stm32_select(struct mio283qt9a_lcd_s *dev) { /* CS low selects */ @@ -211,7 +211,7 @@ static void stm32_select(FAR struct mio283qt9a_lcd_s *dev) * ****************************************************************************/ -static void stm32_deselect(FAR struct mio283qt9a_lcd_s *dev) +static void stm32_deselect(struct mio283qt9a_lcd_s *dev) { /* CS high de-selects */ @@ -226,9 +226,9 @@ static void stm32_deselect(FAR struct mio283qt9a_lcd_s *dev) * ****************************************************************************/ -static void stm32_index(FAR struct mio283qt9a_lcd_s *dev, uint8_t index) +static void stm32_index(struct mio283qt9a_lcd_s *dev, uint8_t index) { - FAR struct stm32f4_dev_s *priv = (FAR struct stm32f4_dev_s *)dev; + struct stm32f4_dev_s *priv = (struct stm32f4_dev_s *)dev; /* Setup to write in command mode (vs data mode) */ @@ -271,9 +271,9 @@ static void stm32_index(FAR struct mio283qt9a_lcd_s *dev, uint8_t index) ****************************************************************************/ #if !defined(CONFIG_MIO283QT2_WRONLY) && !defined(CONFIG_LCD_NOGETRUN) -static uint16_t stm32_read(FAR struct mio283qt9a_lcd_s *dev) +static uint16_t stm32_read(struct mio283qt9a_lcd_s *dev) { - FAR struct stm32f4_dev_s *priv = (FAR struct stm32f4_dev_s *)dev; + struct stm32f4_dev_s *priv = (struct stm32f4_dev_s *)dev; uint32_t * volatile portsetreset = (uint32_t *) STM32_GPIOE_BSRR; uint32_t * volatile portmode = (uint32_t *) STM32_GPIOE_MODER; uint32_t * volatile portinput = (uint32_t *) STM32_GPIOE_IDR; @@ -347,9 +347,9 @@ static uint16_t stm32_read(FAR struct mio283qt9a_lcd_s *dev) * ****************************************************************************/ -static void stm32_write(FAR struct mio283qt9a_lcd_s *dev, uint16_t data) +static void stm32_write(struct mio283qt9a_lcd_s *dev, uint16_t data) { - FAR struct stm32f4_dev_s *priv = (FAR struct stm32f4_dev_s *)dev; + struct stm32f4_dev_s *priv = (struct stm32f4_dev_s *)dev; /* Write the data register to the 8-bit GPIO pin bus. We are violating the * datasheet here a little by driving the WR pin low at the same time as @@ -386,7 +386,7 @@ static void stm32_write(FAR struct mio283qt9a_lcd_s *dev, uint16_t data) * ****************************************************************************/ -static void stm32_backlight(FAR struct mio283qt9a_lcd_s *dev, int power) +static void stm32_backlight(struct mio283qt9a_lcd_s *dev, int power) { /* For now, we just control the backlight as a discrete. Pulse width * modulation would be required to vary the backlight level. A low value @@ -503,7 +503,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return g_stm32f4_lcd.drvr; diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_spi.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_spi.c index 7b77cd424c..665c9c4869 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_spi.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_spi.c @@ -105,7 +105,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -147,7 +147,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -168,28 +168,28 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -220,21 +220,21 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c index 04fcce067c..0a52a57fcf 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c @@ -237,20 +237,20 @@ static void tc_y_sample(void); static void tc_x_sample(void); static inline bool tc_valid_sample(uint16_t sample); -static void tc_notify(FAR struct tc_dev_s *priv); -static int tc_sample(FAR struct tc_dev_s *priv, - FAR struct tc_sample_s *sample); -static int tc_waitsample(FAR struct tc_dev_s *priv, - FAR struct tc_sample_s *sample); -static void tc_worker(FAR void *arg); +static void tc_notify(struct tc_dev_s *priv); +static int tc_sample(struct tc_dev_s *priv, + struct tc_sample_s *sample); +static int tc_waitsample(struct tc_dev_s *priv, + struct tc_sample_s *sample); +static void tc_worker(void *arg); /* Character driver methods */ -static int tc_open(FAR struct file *filep); -static int tc_close(FAR struct file *filep); -static ssize_t tc_read(FAR struct file *filep, FAR char *buffer, size_t len); -static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg); -static int tc_poll(FAR struct file *filep, struct pollfd *fds, bool setup); +static int tc_open(struct file *filep); +static int tc_close(struct file *filep); +static ssize_t tc_read(struct file *filep, char *buffer, size_t len); +static int tc_ioctl(struct file *filep, int cmd, unsigned long arg); +static int tc_poll(struct file *filep, struct pollfd *fds, bool setup); /**************************************************************************** * Private Data @@ -573,7 +573,7 @@ static inline bool tc_valid_sample(uint16_t sample) * Name: tc_notify ****************************************************************************/ -static void tc_notify(FAR struct tc_dev_s *priv) +static void tc_notify(struct tc_dev_s *priv) { int i; @@ -627,8 +627,8 @@ static void tc_notify(FAR struct tc_dev_s *priv) * ****************************************************************************/ -static int tc_sample(FAR struct tc_dev_s *priv, - FAR struct tc_sample_s *sample) +static int tc_sample(struct tc_dev_s *priv, + struct tc_sample_s *sample) { int ret = -EAGAIN; @@ -672,8 +672,8 @@ static int tc_sample(FAR struct tc_dev_s *priv, * Name: tc_waitsample ****************************************************************************/ -static int tc_waitsample(FAR struct tc_dev_s *priv, - FAR struct tc_sample_s *sample) +static int tc_waitsample(struct tc_dev_s *priv, + struct tc_sample_s *sample) { int ret; @@ -730,9 +730,9 @@ errout: * Name: tc_worker ****************************************************************************/ -static void tc_worker(FAR void *arg) +static void tc_worker(void *arg) { - FAR struct tc_dev_s *priv = (FAR struct tc_dev_s *)arg; + struct tc_dev_s *priv = (struct tc_dev_s *)arg; uint32_t delay = TC_PENUP_POLL_TICKS; uint16_t value; uint16_t newx = 0; @@ -1097,19 +1097,19 @@ static void tc_worker(FAR void *arg) * Name: tc_open ****************************************************************************/ -static int tc_open(FAR struct file *filep) +static int tc_open(struct file *filep) { #ifdef CONFIG_TOUCHSCREEN_REFCNT - FAR struct inode *inode; - FAR struct tc_dev_s *priv; - uint8_t tmp; - int ret; + struct inode *inode; + struct tc_dev_s *priv; + uint8_t tmp; + int ret; DEBUGASSERT(filep); inode = filep->f_inode; DEBUGASSERT(inode && inode->i_private); - priv = (FAR struct tc_dev_s *)inode->i_private; + priv = (struct tc_dev_s *)inode->i_private; /* Get exclusive access to the driver data structure */ @@ -1150,18 +1150,18 @@ errout_with_sem: * Name: tc_close ****************************************************************************/ -static int tc_close(FAR struct file *filep) +static int tc_close(struct file *filep) { #ifdef CONFIG_TOUCHSCREEN_REFCNT - FAR struct inode *inode; - FAR struct tc_dev_s *priv; - int ret; + struct inode *inode; + struct tc_dev_s *priv; + int ret; DEBUGASSERT(filep); inode = filep->f_inode; DEBUGASSERT(inode && inode->i_private); - priv = (FAR struct tc_dev_s *)inode->i_private; + priv = (struct tc_dev_s *)inode->i_private; /* Get exclusive access to the driver data structure */ @@ -1190,19 +1190,19 @@ static int tc_close(FAR struct file *filep) * Name: tc_read ****************************************************************************/ -static ssize_t tc_read(FAR struct file *filep, FAR char *buffer, size_t len) +static ssize_t tc_read(struct file *filep, char *buffer, size_t len) { - FAR struct inode *inode; - FAR struct tc_dev_s *priv; - FAR struct touch_sample_s *report; + struct inode *inode; + struct tc_dev_s *priv; + struct touch_sample_s *report; struct tc_sample_s sample; - int ret; + int ret; DEBUGASSERT(filep); inode = filep->f_inode; DEBUGASSERT(inode && inode->i_private); - priv = (FAR struct tc_dev_s *)inode->i_private; + priv = (struct tc_dev_s *)inode->i_private; /* Verify that the caller has provided a buffer large enough to receive * the touch data. @@ -1256,7 +1256,7 @@ static ssize_t tc_read(FAR struct file *filep, FAR char *buffer, size_t len) * to the caller. */ - report = (FAR struct touch_sample_s *)buffer; + report = (struct touch_sample_s *)buffer; memset(report, 0, SIZEOF_TOUCH_SAMPLE_S(1)); report->npoints = 1; report->point[0].id = sample.id; @@ -1311,14 +1311,14 @@ errout: * Name: tc_ioctl ****************************************************************************/ -static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +static int tc_ioctl(struct file *filep, int cmd, unsigned long arg) { #if 1 iinfo("cmd: %d arg: %ld\n", cmd, arg); return -ENOTTY; /* None yet supported */ #else - FAR struct inode *inode; - FAR struct tc_dev_s *priv; + struct inode *inode; + struct tc_dev_s *priv; int ret; iinfo("cmd: %d arg: %ld\n", cmd, arg); @@ -1326,7 +1326,7 @@ static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) inode = filep->f_inode; DEBUGASSERT(inode && inode->i_private); - priv = (FAR struct tc_dev_s *)inode->i_private; + priv = (struct tc_dev_s *)inode->i_private; /* Get exclusive access to the driver data structure */ @@ -1356,20 +1356,20 @@ static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) * Name: tc_poll ****************************************************************************/ -static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds, +static int tc_poll(struct file *filep, struct pollfd *fds, bool setup) { - FAR struct inode *inode; - FAR struct tc_dev_s *priv; - int ret; - int i; + struct inode *inode; + struct tc_dev_s *priv; + int ret; + int i; iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; DEBUGASSERT(inode && inode->i_private); - priv = (FAR struct tc_dev_s *)inode->i_private; + priv = (struct tc_dev_s *)inode->i_private; /* Are we setting up the poll? Or tearing it down? */ @@ -1465,7 +1465,7 @@ errout: int stm32_tsc_setup(int minor) { - FAR struct tc_dev_s *priv; + struct tc_dev_s *priv; char devname[DEV_NAMELEN]; #ifdef CONFIG_TOUCHSCREEN_MULTIPLE irqstate_t flags; @@ -1501,7 +1501,7 @@ int stm32_tsc_setup(int minor) #ifndef CONFIG_TOUCHSCREEN_MULTIPLE priv = &g_touchscreen; #else - priv = (FAR struct tc_dev_s *)kmm_malloc(sizeof(struct tc_dev_s)); + priv = (struct tc_dev_s *)kmm_malloc(sizeof(struct tc_dev_s)); if (!priv) { ierr("ERROR: kmm_malloc(%d) failed\n", sizeof(struct tc_dev_s)); diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_usb.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_usb.c index 3271d962b4..f4d41f955a 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_usb.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_usb.c @@ -200,7 +200,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -293,7 +293,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_vs1053.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_vs1053.c index e1fd639400..05ee15bfd9 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_vs1053.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_vs1053.c @@ -64,19 +64,19 @@ struct stm32_lower_s { const struct vs1053_lower_s lower; /* Low-level MCU interface */ xcpt_t handler; /* VS1053 interrupt handler */ - FAR void *arg; /* Interrupt handler argument */ + void *arg; /* Interrupt handler argument */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int up_attach(FAR const struct vs1053_lower_s *lower, xcpt_t handler, - FAR void *arg); -static void up_enable(FAR const struct vs1053_lower_s *lower); -static void up_disable(FAR const struct vs1053_lower_s *lower); -static void up_reset(FAR const struct vs1053_lower_s *lower, bool state); -static int up_read_dreq(FAR const struct vs1053_lower_s *lower); +static int up_attach(const struct vs1053_lower_s *lower, xcpt_t handler, + void *arg); +static void up_enable(const struct vs1053_lower_s *lower); +static void up_disable(const struct vs1053_lower_s *lower); +static void up_reset(const struct vs1053_lower_s *lower, bool state); +static int up_read_dreq(const struct vs1053_lower_s *lower); /**************************************************************************** * Private Data @@ -110,36 +110,36 @@ static struct stm32_lower_s g_vs1053lower = * Name: struct vs1053_lower_s methods ****************************************************************************/ -static int up_attach(FAR const struct vs1053_lower_s *lower, xcpt_t handler, - FAR void *arg) +static int up_attach(const struct vs1053_lower_s *lower, xcpt_t handler, + void *arg) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; priv->handler = handler; /* Save the handler for later */ priv->arg = arg; /* Along with the handler argument */ return 0; } -static void up_enable(FAR const struct vs1053_lower_s *lower) +static void up_enable(const struct vs1053_lower_s *lower) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; DEBUGASSERT(priv->handler); stm32_gpiosetevent(GPIO_VS1053_DREQ, true, false, false, priv->handler, priv->arg); } -static void up_disable(FAR const struct vs1053_lower_s *lower) +static void up_disable(const struct vs1053_lower_s *lower) { stm32_gpiosetevent(GPIO_VS1053_DREQ, false, false, false, NULL, NULL); } -static void up_reset(FAR const struct vs1053_lower_s *lower, bool state) +static void up_reset(const struct vs1053_lower_s *lower, bool state) { stm32_gpiowrite(GPIO_VS1053_RST, state); } -static int up_read_dreq(FAR const struct vs1053_lower_s *lower) +static int up_read_dreq(const struct vs1053_lower_s *lower) { return stm32_gpioread(GPIO_VS1053_DREQ); } @@ -152,11 +152,11 @@ static int up_read_dreq(FAR const struct vs1053_lower_s *lower) * Name: up_vs1053initialize ****************************************************************************/ -void up_vs1053initialize(FAR struct spi_dev_s * spi) +void up_vs1053initialize(struct spi_dev_s * spi) { int ret; char name[16]; - FAR struct audio_lowerhalf_s *PVS1053; + struct audio_lowerhalf_s *PVS1053; /* Assumptions: * 1) SPI pins were configured in up_spi.c early in the boot-up phase. diff --git a/boards/arm/stm32/nucleo-f103rb/src/stm32_adc.c b/boards/arm/stm32/nucleo-f103rb/src/stm32_adc.c index d631375d67..c4909edb8e 100644 --- a/boards/arm/stm32/nucleo-f103rb/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-f103rb/src/stm32_adc.c @@ -166,7 +166,7 @@ static const uint32_t g_pinlist2[3] = int stm32_adc_setup(void) { static bool initialized = false; - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/nucleo-f103rb/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f103rb/src/stm32_buttons.c index 2c863c91aa..2c198de468 100644 --- a/boards/arm/stm32/nucleo-f103rb/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f103rb/src/stm32_buttons.c @@ -94,7 +94,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f207zg/src/stm32_adc.c b/boards/arm/stm32/nucleo-f207zg/src/stm32_adc.c index a145c1b204..e59d353072 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-f207zg/src/stm32_adc.c @@ -168,7 +168,7 @@ static const uint32_t g_pinlist2[3] = int stm32_adc_setup(void) { static bool initialized = false; - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/nucleo-f207zg/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f207zg/src/stm32_buttons.c index a7031ad0b3..1aa330499f 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f207zg/src/stm32_buttons.c @@ -89,7 +89,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f207zg/src/stm32_usb.c b/boards/arm/stm32/nucleo-f207zg/src/stm32_usb.c index 1c431d79bd..4a51c56064 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/stm32_usb.c +++ b/boards/arm/stm32/nucleo-f207zg/src/stm32_usb.c @@ -227,7 +227,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_NUCLEOF207ZG_USBHOST_PRIO, CONFIG_NUCLEOF207ZG_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -311,7 +311,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c index 1bbac73dd1..be0dcc5116 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c @@ -94,7 +94,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c b/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c index a8e4e18291..32d93a5c35 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c +++ b/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c @@ -120,7 +120,7 @@ struct highpri_s { - FAR struct stm32_adc_dev_s *adc1; + struct stm32_adc_dev_s *adc1; #ifdef HIGHPRI_HAVE_TIM1 struct stm32_pwm_dev_s *pwm; #endif @@ -191,7 +191,7 @@ static struct highpri_s g_highpri; #if !defined(CONFIG_STM32_ADC1_DMA) || defined(HIGHPRI_HAVE_INJECTED) void adc12_handler(void) { - FAR struct stm32_adc_dev_s *adc = g_highpri.adc1; + struct stm32_adc_dev_s *adc = g_highpri.adc1; float ref = ADC_REF_VOLTAGE; float bit = ADC_VAL_MAX; uint32_t pending; @@ -329,8 +329,8 @@ int highpri_main(int argc, char *argv[]) #ifdef HIGHPRI_HAVE_TIM1 struct stm32_pwm_dev_s *pwm1; #endif - FAR struct adc_dev_s *adc1; - FAR struct highpri_s *highpri; + struct adc_dev_s *adc1; + struct highpri_s *highpri; int ret; int i; @@ -364,7 +364,7 @@ int highpri_main(int argc, char *argv[]) #ifdef HIGHPRI_HAVE_TIM1 /* Initialize TIM1 */ - pwm1 = (FAR struct stm32_pwm_dev_s *) stm32_pwminitialize(1); + pwm1 = (struct stm32_pwm_dev_s *) stm32_pwminitialize(1); if (pwm1 == NULL) { printf("ERROR: Failed to get PWM1 interface\n"); diff --git a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h b/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h index 91e8558cfb..77a63905fb 100644 --- a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h +++ b/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h @@ -139,7 +139,7 @@ void weak_function stm32_spidev_initialize(void); ****************************************************************************/ #ifdef CONFIG_TIMER -int stm32_timer_driver_setup(FAR const char *devpath, int timer); +int stm32_timer_driver_setup(const char *devpath, int timer); #endif /**************************************************************************** diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_adc.c b/boards/arm/stm32/nucleo-f303re/src/stm32_adc.c index 8fcdbd32ed..885b13ab1b 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-f303re/src/stm32_adc.c @@ -304,7 +304,7 @@ static const uint32_t g_pinlist2[1] = int stm32_adc_setup(void) { - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c index c30fa00211..8a2baa64f0 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c @@ -94,7 +94,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_spi.c b/boards/arm/stm32/nucleo-f303re/src/stm32_spi.c index f2eaa377fa..706e46cf7a 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_spi.c +++ b/boards/arm/stm32/nucleo-f303re/src/stm32_spi.c @@ -86,7 +86,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -100,35 +100,35 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -158,7 +158,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_LCD_SSD1351 @@ -174,7 +174,7 @@ int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; @@ -182,7 +182,7 @@ int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c b/boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c index bd990134fd..f641533b20 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c +++ b/boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c @@ -67,10 +67,10 @@ * ****************************************************************************/ -FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) +struct lcd_dev_s *board_graphics_setup(unsigned int devno) { - FAR struct spi_dev_s *spi; - FAR struct lcd_dev_s *dev; + struct spi_dev_s *spi; + struct lcd_dev_s *dev; /* Configure the OLED GPIOs. This initial configuration is RESET low, * putting the OLED into reset state. diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_timer.c b/boards/arm/stm32/nucleo-f303re/src/stm32_timer.c index cc8b753c9f..60c4cda5d9 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_timer.c +++ b/boards/arm/stm32/nucleo-f303re/src/stm32_timer.c @@ -57,7 +57,7 @@ * ****************************************************************************/ -int stm32_timer_driver_setup(FAR const char *devpath, int timer) +int stm32_timer_driver_setup(const char *devpath, int timer) { return stm32_timer_initialize(devpath, timer); } diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c b/boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c index 5bac287145..f5890dcd73 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c @@ -168,7 +168,7 @@ static const uint32_t g_pinlist2[3] = int stm32_adc_setup(void) { static bool initialized = false; - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c index 9e3ad8822b..ca50b0f688 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c @@ -89,7 +89,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c b/boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c index efe803a78f..2e2f720b18 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c +++ b/boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c @@ -72,7 +72,7 @@ int board_lcd_initialize(void) * Name: board_lcd_getdev ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { return board_ssd1306_getdev(); } diff --git a/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h b/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h index 024b529e6f..3dd8552b0a 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h +++ b/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h @@ -128,7 +128,7 @@ void weak_function stm32_spidev_initialize(void); ****************************************************************************/ #ifdef CONFIG_TIMER -int stm32_timer_driver_setup(FAR const char *devpath, int timer); +int stm32_timer_driver_setup(const char *devpath, int timer); #endif /**************************************************************************** diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c b/boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c index d5ae1cf514..59a5abf8af 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c @@ -166,7 +166,7 @@ static const uint32_t g_pinlist2[3] = int stm32_adc_setup(void) { static bool initialized = false; - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c b/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c index a46742ade5..86b68556ba 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c +++ b/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c @@ -132,12 +132,12 @@ struct highpri_s { - FAR struct stm32_adc_dev_s *adc1; + struct stm32_adc_dev_s *adc1; #ifdef HIGHPRI_HAVE_HRTIM - FAR struct hrtim_dev_s *hrtim; + struct hrtim_dev_s *hrtim; #endif #ifdef HIGHPRI_HAVE_TIM1 - struct stm32_pwm_dev_s *pwm; + struct stm32_pwm_dev_s *pwm; #endif volatile uint32_t cntr1; volatile uint32_t cntr2; @@ -206,7 +206,7 @@ static struct highpri_s g_highpri; #if !defined(CONFIG_STM32_ADC1_DMA) || defined(HIGHPRI_HAVE_INJECTED) void adc12_handler(void) { - FAR struct stm32_adc_dev_s *adc = g_highpri.adc1; + struct stm32_adc_dev_s *adc = g_highpri.adc1; float ref = ADC_REF_VOLTAGE; float bit = ADC_VAL_MAX; uint32_t pending; @@ -342,13 +342,13 @@ irq_out: int highpri_main(int argc, char *argv[]) { #ifdef HIGHPRI_HAVE_HRTIM - FAR struct hrtim_dev_s *hrtim; + struct hrtim_dev_s *hrtim; #endif #ifdef HIGHPRI_HAVE_TIM1 struct stm32_pwm_dev_s *pwm1; #endif - FAR struct adc_dev_s *adc1; - FAR struct highpri_s *highpri; + struct adc_dev_s *adc1; + struct highpri_s *highpri; int ret; int i; @@ -400,7 +400,7 @@ int highpri_main(int argc, char *argv[]) #ifdef HIGHPRI_HAVE_TIM1 /* Initialize TIM1 */ - pwm1 = (FAR struct stm32_pwm_dev_s *) stm32_pwminitialize(1); + pwm1 = (struct stm32_pwm_dev_s *) stm32_pwminitialize(1); if (pwm1 == NULL) { printf("ERROR: Failed to get PWM1 interface\n"); diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c b/boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c index f6711bb35e..451be39721 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c +++ b/boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c @@ -199,9 +199,9 @@ struct spwm_s { - FAR struct pwm_timer_s *pwm; + struct pwm_timer_s *pwm; #ifdef CONFIG_NUCLEOF334R8_SPWM_USE_TIM1 - FAR struct stm32_tim_dev_s *tim; + struct stm32_tim_dev_s *tim; #endif float waveform[SAMPLES_NUM]; /* Waveform samples */ float phase_step; /* Waveform phase step */ @@ -231,27 +231,27 @@ static struct spwm_s g_spwm = ****************************************************************************/ static float waveform_func(float x); -static int waveform_init(FAR struct spwm_s *spwm, float (*f)(float)); -static int spwm_start(FAR struct spwm_s *spwm); -static int spwm_start(FAR struct spwm_s *spwm); -static int spwm_stop(FAR struct spwm_s *spwm); +static int waveform_init(struct spwm_s *spwm, float (*f)(float)); +static int spwm_start(struct spwm_s *spwm); +static int spwm_start(struct spwm_s *spwm); +static int spwm_stop(struct spwm_s *spwm); #ifdef CONFIG_NUCLEOF334R8_SPWM_USE_HRTIM1 -static int master_configure(FAR struct spwm_s *spwm); -static int slaves_configure(FAR struct spwm_s *spwm); +static int master_configure(struct spwm_s *spwm); +static int slaves_configure(struct spwm_s *spwm); static void hrtim_master_handler(void); -static int spwm_hrtim_setup(FAR struct spwm_s *spwm); -static int spwm_hrtim_start(FAR struct spwm_s *spwm); -static int spwm_hrtim_stop(FAR struct spwm_s *spwm); +static int spwm_hrtim_setup(struct spwm_s *spwm); +static int spwm_hrtim_start(struct spwm_s *spwm); +static int spwm_hrtim_stop(struct spwm_s *spwm); #endif /* CONFIG_NUCLEOF334R8_SPWM_USE_HRTIM1 */ #ifdef CONFIG_NUCLEOF334R8_SPWM_USE_TIM1 -static int spwm_tim1_setup(FAR struct spwm_s *spwm); -static int spwm_tim6_setup(FAR struct spwm_s *spwm); -static int spwm_tim1_start(FAR struct spwm_s *spwm); -static int spwm_tim6_start(FAR struct spwm_s *spwm); -static int spwm_tim1_stop(FAR struct spwm_s *spwm); -static int spwm_tim6_stop(FAR struct spwm_s *spwm); +static int spwm_tim1_setup(struct spwm_s *spwm); +static int spwm_tim6_setup(struct spwm_s *spwm); +static int spwm_tim1_start(struct spwm_s *spwm); +static int spwm_tim6_start(struct spwm_s *spwm); +static int spwm_tim1_stop(struct spwm_s *spwm); +static int spwm_tim6_stop(struct spwm_s *spwm); #endif /* CONFIG_NUCLEOF334R8_SPWM_USE_TIM1 */ -static int spwm_setup(FAR struct spwm_s *spwm); +static int spwm_setup(struct spwm_s *spwm); /**************************************************************************** * Private Functions @@ -282,7 +282,7 @@ static float waveform_func(float x) * ****************************************************************************/ -static int waveform_init(FAR struct spwm_s *spwm, float (*f)(float)) +static int waveform_init(struct spwm_s *spwm, float (*f)(float)) { uint16_t i = 0; int ret = 0; @@ -340,7 +340,7 @@ static int waveform_init(FAR struct spwm_s *spwm, float (*f)(float)) * ****************************************************************************/ -static int spwm_start(FAR struct spwm_s *spwm) +static int spwm_start(struct spwm_s *spwm) { #if defined(CONFIG_NUCLEOF334R8_SPWM_USE_HRTIM1) /* Start HRTIM */ @@ -370,7 +370,7 @@ static int spwm_start(FAR struct spwm_s *spwm) * ****************************************************************************/ -static int spwm_stop(FAR struct spwm_s *spwm) +static int spwm_stop(struct spwm_s *spwm) { #if defined(CONFIG_NUCLEOF334R8_SPWM_USE_HRTIM1) /* Stop HRTIM */ @@ -398,9 +398,9 @@ static int spwm_stop(FAR struct spwm_s *spwm) * Name: master_configure ****************************************************************************/ -static int master_configure(FAR struct spwm_s *spwm) +static int master_configure(struct spwm_s *spwm) { - FAR struct hrtim_dev_s *hrtim = spwm->pwm; + struct hrtim_dev_s *hrtim = spwm->pwm; uint64_t per = 0; uint64_t fclk = 0; uint64_t freq = 0; @@ -440,9 +440,9 @@ errout: * Name: slaves_configure ****************************************************************************/ -static int slaves_configure(FAR struct spwm_s *spwm) +static int slaves_configure(struct spwm_s *spwm) { - FAR struct hrtim_dev_s *hrtim = spwm->pwm; + struct hrtim_dev_s *hrtim = spwm->pwm; uint64_t fclk = 0; uint64_t per = 0; uint8_t index = 0; @@ -494,8 +494,8 @@ errout: static void hrtim_master_handler(void) { - FAR struct spwm_s *spwm = &g_spwm; - FAR struct hrtim_dev_s *hrtim = spwm->pwm; + struct spwm_s *spwm = &g_spwm; + struct hrtim_dev_s *hrtim = spwm->pwm; uint32_t pending = 0; uint8_t i = 0; @@ -537,9 +537,9 @@ static void hrtim_master_handler(void) * Name: spwm_hrtim_setup ****************************************************************************/ -static int spwm_hrtim_setup(FAR struct spwm_s *spwm) +static int spwm_hrtim_setup(struct spwm_s *spwm) { - FAR struct hrtim_dev_s *pwm = NULL; + struct hrtim_dev_s *pwm = NULL; int ret = OK; /* Configure HRTIM */ @@ -608,9 +608,9 @@ errout: * Name: spwm_hrtim_start ****************************************************************************/ -static int spwm_hrtim_start(FAR struct spwm_s *spwm) +static int spwm_hrtim_start(struct spwm_s *spwm) { - FAR struct hrtim_dev_s *hrtim = spwm->pwm; + struct hrtim_dev_s *hrtim = spwm->pwm; uint8_t timers = 0; uint16_t outputs = 0; int i = 0; @@ -648,9 +648,9 @@ static int spwm_hrtim_start(FAR struct spwm_s *spwm) * Name: spwm_hrtim_stop ****************************************************************************/ -static int spwm_hrtim_stop(FAR struct spwm_s *spwm) +static int spwm_hrtim_stop(struct spwm_s *spwm) { - FAR struct hrtim_dev_s *hrtim = spwm->pwm; + struct hrtim_dev_s *hrtim = spwm->pwm; uint8_t timers = 0; uint16_t outputs = 0; int i = 0; @@ -694,9 +694,9 @@ static int spwm_hrtim_stop(FAR struct spwm_s *spwm) static void tim6_handler(void) { - FAR struct spwm_s *spwm = &g_spwm; - FAR struct stm32_pwm_dev_s *pwm = spwm->pwm; - FAR struct stm32_tim_dev_s *tim = spwm->tim; + struct spwm_s *spwm = &g_spwm; + struct stm32_pwm_dev_s *pwm = spwm->pwm; + struct stm32_tim_dev_s *tim = spwm->tim; uint8_t i = 0; for (i = 0; i < spwm->phases; i += 1) @@ -724,9 +724,9 @@ static void tim6_handler(void) * Name: spwm_tim6_setup ****************************************************************************/ -static int spwm_tim6_setup(FAR struct spwm_s *spwm) +static int spwm_tim6_setup(struct spwm_s *spwm) { - FAR struct stm32_tim_dev_s *tim = NULL; + struct stm32_tim_dev_s *tim = NULL; uint64_t freq = 0; uint32_t per = 0; int ret = OK; @@ -792,9 +792,9 @@ errout: * Name: spwm_tim6_start ****************************************************************************/ -static int spwm_tim6_start(FAR struct spwm_s *spwm) +static int spwm_tim6_start(struct spwm_s *spwm) { - FAR struct stm32_tim_dev_s *tim = spwm->tim; + struct stm32_tim_dev_s *tim = spwm->tim; /* Enable the timer interrupt at the NVIC and at TIM6 */ @@ -808,9 +808,9 @@ static int spwm_tim6_start(FAR struct spwm_s *spwm) * Name: spwm_tim6_stop ****************************************************************************/ -static int spwm_tim6_stop(FAR struct spwm_s *spwm) +static int spwm_tim6_stop(struct spwm_s *spwm) { - FAR struct stm32_tim_dev_s *tim = spwm->tim; + struct stm32_tim_dev_s *tim = spwm->tim; /* Disable the timer interrupt at the NVIC and at TIM6 */ @@ -824,14 +824,14 @@ static int spwm_tim6_stop(FAR struct spwm_s *spwm) * Name: spwm_tim1_setup ****************************************************************************/ -static int spwm_tim1_setup(FAR struct spwm_s *spwm) +static int spwm_tim1_setup(struct spwm_s *spwm) { - FAR struct stm32_pwm_dev_s *pwm = NULL; + struct stm32_pwm_dev_s *pwm = NULL; int ret = OK; /* Get TIM1 PWM interface */ - pwm = (FAR struct stm32_pwm_dev_s *)stm32_pwminitialize(1); + pwm = (struct stm32_pwm_dev_s *)stm32_pwminitialize(1); if (pwm == NULL) { printf("ERROR: Failed to get TIM1 PWM interface\n"); @@ -875,9 +875,9 @@ errout: * Name: spwm_tim1_start ****************************************************************************/ -static int spwm_tim1_start(FAR struct spwm_s *spwm) +static int spwm_tim1_start(struct spwm_s *spwm) { - FAR struct stm32_pwm_dev_s *pwm = spwm->pwm; + struct stm32_pwm_dev_s *pwm = spwm->pwm; uint16_t outputs = 0; int i = 0; @@ -903,9 +903,9 @@ static int spwm_tim1_start(FAR struct spwm_s *spwm) * Name: spwm_tim1_stop ****************************************************************************/ -static int spwm_tim1_stop(FAR struct spwm_s *spwm) +static int spwm_tim1_stop(struct spwm_s *spwm) { - FAR struct stm32_pwm_dev_s *pwm = spwm->pwm; + struct stm32_pwm_dev_s *pwm = spwm->pwm; uint16_t outputs = 0; int i = 0; @@ -933,7 +933,7 @@ static int spwm_tim1_stop(FAR struct spwm_s *spwm) * Name: spwm_setup ****************************************************************************/ -static int spwm_setup(FAR struct spwm_s *spwm) +static int spwm_setup(struct spwm_s *spwm) { int ret = OK; @@ -985,7 +985,7 @@ errout: int spwm_main(int argc, char *argv[]) { - FAR struct spwm_s *spwm = NULL; + struct spwm_s *spwm = NULL; int ret = OK; int i = 0; diff --git a/boards/arm/stm32/nucleo-f410rb/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f410rb/src/stm32_buttons.c index b60b9ef8f0..b92994e025 100644 --- a/boards/arm/stm32/nucleo-f410rb/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f410rb/src/stm32_buttons.c @@ -97,7 +97,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f412zg/src/stm32_usb.c b/boards/arm/stm32/nucleo-f412zg/src/stm32_usb.c index 46c056c2b0..c418692f4e 100644 --- a/boards/arm/stm32/nucleo-f412zg/src/stm32_usb.c +++ b/boards/arm/stm32/nucleo-f412zg/src/stm32_usb.c @@ -250,7 +250,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32F411DISCO_USBHOST_PRIO, CONFIG_STM32F411DISCO_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -343,7 +343,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c index 15c52e6406..f9cde7c334 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c @@ -277,7 +277,7 @@ static uint8_t g_sdata[STM32F4_BBSRAM_SIZE]; static int hardfault_get_desc(struct bbsramd_s *desc) { - FAR struct file filestruct; + struct file filestruct; int ret; ret = file_open(&filestruct, HARDFAULT_PATH, O_RDONLY); @@ -379,16 +379,16 @@ int stm32_bbsram_int(void) ****************************************************************************/ #if defined(CONFIG_STM32F4_SAVE_CRASHDUMP) -void board_crashdump(uintptr_t currentsp, FAR void *tcb, - FAR const char *filename, int lineno) +void board_crashdump(uintptr_t currentsp, void *tcb, + const char *filename, int lineno) { fullcontext_t *pdump = (fullcontext_t *)&g_sdata; - FAR struct tcb_s *rtcb; + struct tcb_s *rtcb; int rv; enter_critical_section(); - rtcb = (FAR struct tcb_s *)tcb; + rtcb = (struct tcb_s *)tcb; /* Zero out everything */ diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_buttons.c index b2e64623ce..ab17a3746c 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_buttons.c @@ -91,7 +91,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_dma_alloc.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_dma_alloc.c index 4dbdc303d1..9dc1400703 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_dma_alloc.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_dma_alloc.c @@ -97,7 +97,7 @@ void *fat_dma_alloc(size_t size) return gran_alloc(dma_allocator, size); } -void fat_dma_free(FAR void *memory, size_t size) +void fat_dma_free(void *memory, size_t size) { gran_free(dma_allocator, memory, size); } diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_gpio.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_gpio.c index 041d407343..9ed548e27f 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_gpio.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_gpio.c @@ -60,13 +60,13 @@ struct stm32gpint_dev_s * Private Function Prototypes ****************************************************************************/ -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_write(FAR struct gpio_dev_s *dev, bool value); -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpin_read(struct gpio_dev_s *dev, bool *value); +static int gpout_read(struct gpio_dev_s *dev, bool *value); +static int gpout_write(struct gpio_dev_s *dev, bool value); +static int gpint_read(struct gpio_dev_s *dev, bool *value); +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback); -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable); +static int gpint_enable(struct gpio_dev_s *dev, bool enable); /**************************************************************************** * Private Data @@ -135,8 +135,8 @@ static struct stm32gpint_dev_s g_gpint[BOARD_NGPIOINT]; static int stm32gpio_interrupt(int irq, void *context, void *arg) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)arg; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)arg; DEBUGASSERT(stm32gpint != NULL && stm32gpint->callback != NULL); gpioinfo("Interrupt! callback=%p\n", stm32gpint->callback); @@ -146,10 +146,10 @@ static int stm32gpio_interrupt(int irq, void *context, void *arg) return OK; } -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpin_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL && value != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOIN); @@ -159,10 +159,10 @@ static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpout_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL && value != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOOUT); @@ -172,10 +172,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpout_write(FAR struct gpio_dev_s *dev, bool value) +static int gpout_write(struct gpio_dev_s *dev, bool value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOOUT); @@ -185,10 +185,10 @@ static int gpout_write(FAR struct gpio_dev_s *dev, bool value) return OK; } -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpint_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; DEBUGASSERT(stm32gpint != NULL && value != NULL); DEBUGASSERT(stm32gpint->stm32gpio.id < BOARD_NGPIOINT); @@ -198,11 +198,11 @@ static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; gpioinfo("Attaching the callback\n"); @@ -216,10 +216,10 @@ static int gpint_attach(FAR struct gpio_dev_s *dev, return OK; } -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable) +static int gpint_enable(struct gpio_dev_s *dev, bool enable) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; if (enable) { diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_sdio.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_sdio.c index b2005ce7b5..8d078898ac 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_sdio.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_sdio.c @@ -56,7 +56,7 @@ * Private Data ****************************************************************************/ -static FAR struct sdio_dev_s *g_sdio_dev; +static struct sdio_dev_s *g_sdio_dev; #ifdef HAVE_NCD static bool g_sd_inserted = 0xff; /* Impossible value */ #endif @@ -74,7 +74,7 @@ static bool g_sd_inserted = 0xff; /* Impossible value */ ****************************************************************************/ #ifdef HAVE_NCD -static int stm32_ncd_interrupt(int irq, FAR void *context) +static int stm32_ncd_interrupt(int irq, void *context) { bool present; diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_spi.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_spi.c index 5313e595a9..a727551b53 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_spi.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_spi.c @@ -258,7 +258,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32F4_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { uint32_t index = SPIDEVID_INDEX(devid); @@ -272,14 +272,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F4_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { uint32_t index = SPIDEVID_INDEX(devid); @@ -293,14 +293,14 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F4_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { uint32_t index = SPIDEVID_INDEX(devid); @@ -314,49 +314,49 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F4_SPI4 -void stm32_spi4select(FAR struct spi_dev_s *dev, +void stm32_spi4select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi4status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F4_SPI5 -void stm32_spi5select(FAR struct spi_dev_s *dev, +void stm32_spi5select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi5status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F4_SPI6 -void stm32_spi6select(FAR struct spi_dev_s *dev, +void stm32_spi6select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi6status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -387,42 +387,42 @@ uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32F4_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F4_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F4_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F4_SPI4 -int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi4cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F4_SPI5 -int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi5cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F4_SPI6 -int stm32_spi6cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi6cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_usb.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_usb.c index 4de6fb2ce6..581cc87730 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_usb.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_usb.c @@ -226,7 +226,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32F4DISCO_USBHOST_PRIO, CONFIG_STM32F4DISCO_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -311,7 +311,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c b/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c index 261c98a537..d3fd663440 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_ajoystick.c @@ -101,18 +101,18 @@ ****************************************************************************/ static ajoy_buttonset_t -ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower); -static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, - FAR struct ajoy_sample_s *sample); +ajoy_supported(const struct ajoy_lowerhalf_s *lower); +static int ajoy_sample(const struct ajoy_lowerhalf_s *lower, + struct ajoy_sample_s *sample); static ajoy_buttonset_t -ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower); +ajoy_buttons(const struct ajoy_lowerhalf_s *lower); static void -ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, +ajoy_enable(const struct ajoy_lowerhalf_s *lower, ajoy_buttonset_t press, ajoy_buttonset_t release, - ajoy_handler_t handler, FAR void *arg); + ajoy_handler_t handler, void *arg); static void ajoy_disable(void); -static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg); +static int ajoy_interrupt(int irq, void *context, void *arg); /**************************************************************************** * Private Data @@ -154,7 +154,7 @@ static struct file g_adcfile; /* Current interrupt handler and argument */ static ajoy_handler_t g_ajoyhandler; -static FAR void *g_ajoyarg; +static void *g_ajoyarg; /**************************************************************************** * Private Functions @@ -169,7 +169,7 @@ static FAR void *g_ajoyarg; ****************************************************************************/ static ajoy_buttonset_t -ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) +ajoy_supported(const struct ajoy_lowerhalf_s *lower) { iinfo("Supported: %02x\n", AJOY_SUPPORTED); return (ajoy_buttonset_t)AJOY_SUPPORTED; @@ -183,12 +183,12 @@ ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) * ****************************************************************************/ -static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, - FAR struct ajoy_sample_s *sample) +static int ajoy_sample(const struct ajoy_lowerhalf_s *lower, + struct ajoy_sample_s *sample) { #ifndef NO_JOYSTICK_ADC struct adc_msg_s adcmsg[MAX_ADC_CHANNELS]; - FAR struct adc_msg_s *ptr; + struct adc_msg_s *ptr; ssize_t nread; ssize_t offset; int have; @@ -285,7 +285,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, ****************************************************************************/ static ajoy_buttonset_t -ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) +ajoy_buttons(const struct ajoy_lowerhalf_s *lower) { ajoy_buttonset_t ret = 0; int i; @@ -317,9 +317,9 @@ ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) * ****************************************************************************/ -static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, - ajoy_buttonset_t press, ajoy_buttonset_t release, - ajoy_handler_t handler, FAR void *arg) +static void ajoy_enable(const struct ajoy_lowerhalf_s *lower, + ajoy_buttonset_t press, ajoy_buttonset_t release, + ajoy_handler_t handler, void *arg) { irqstate_t flags; ajoy_buttonset_t either = press | release; @@ -414,7 +414,7 @@ static void ajoy_disable(void) * ****************************************************************************/ -static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg) +static int ajoy_interrupt(int irq, void *context, void *arg) { DEBUGASSERT(g_ajoyhandler); diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_boot.c b/boards/arm/stm32/nucleo-f446re/src/stm32_boot.c index 67c07f8d88..417ac318fd 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_boot.c @@ -53,7 +53,7 @@ void stm32_boardinitialize(void) { #ifdef CONFIG_SEGGER_SYSVIEW - up_perf_init((FAR void *)STM32_SYSCLK_FREQUENCY); + up_perf_init((void *)STM32_SYSCLK_FREQUENCY); #endif #ifdef CONFIG_ARCH_LEDS diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f446re/src/stm32_buttons.c index 6c14a84681..73d8740784 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_buttons.c @@ -97,7 +97,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_gpio.c b/boards/arm/stm32/nucleo-f446re/src/stm32_gpio.c index 800ffee061..be505c2d7f 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_gpio.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_gpio.c @@ -61,17 +61,17 @@ struct stm32gpint_dev_s ****************************************************************************/ #if BOARD_NGPIOIN > 0 -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value); +static int gpin_read(struct gpio_dev_s *dev, bool *value); #endif #if BOARD_NGPIOOUT > 0 -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_write(FAR struct gpio_dev_s *dev, bool value); +static int gpout_read(struct gpio_dev_s *dev, bool *value); +static int gpout_write(struct gpio_dev_s *dev, bool value); #endif #if BOARD_NGPIOINT > 0 -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpint_read(struct gpio_dev_s *dev, bool *value); +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback); -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable); +static int gpint_enable(struct gpio_dev_s *dev, bool enable); #endif /**************************************************************************** @@ -148,8 +148,8 @@ static struct stm32gpint_dev_s g_gpint[BOARD_NGPIOINT]; #if BOARD_NGPIOINT > 0 static int stm32gpio_interrupt(int irq, void *context, void *arg) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)arg; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)arg; DEBUGASSERT(stm32gpint != NULL && stm32gpint->callback != NULL); gpioinfo("Interrupt! callback=%p\n", stm32gpint->callback); @@ -161,10 +161,10 @@ static int stm32gpio_interrupt(int irq, void *context, void *arg) #endif #if BOARD_NGPIOIN > 0 -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpin_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL && value != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOIN); @@ -176,10 +176,10 @@ static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) #endif #if BOARD_NGPIOOUT > 0 -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpout_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL && value != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOOUT); @@ -189,10 +189,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpout_write(FAR struct gpio_dev_s *dev, bool value) +static int gpout_write(struct gpio_dev_s *dev, bool value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOOUT); @@ -204,10 +204,10 @@ static int gpout_write(FAR struct gpio_dev_s *dev, bool value) #endif #if BOARD_NGPIOINT > 0 -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpint_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; DEBUGASSERT(stm32gpint != NULL && value != NULL); DEBUGASSERT(stm32gpint->stm32gpio.id < BOARD_NGPIOINT); @@ -217,11 +217,11 @@ static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; gpioinfo("Attaching the callback\n"); @@ -235,10 +235,10 @@ static int gpint_attach(FAR struct gpio_dev_s *dev, return OK; } -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable) +static int gpint_enable(struct gpio_dev_s *dev, bool enable) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; if (enable) { diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_ili9225.c b/boards/arm/stm32/nucleo-f446re/src/stm32_ili9225.c index 0b17ea669c..045711f0a8 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_ili9225.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_ili9225.c @@ -93,7 +93,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { g_lcd = ili9225_lcdinitialize(g_spidev); if (!g_lcd) diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_spi.c b/boards/arm/stm32/nucleo-f446re/src/stm32_spi.c index 924b9966db..d6f4b469c2 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_spi.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_spi.c @@ -132,7 +132,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -146,28 +146,28 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -178,7 +178,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -209,24 +209,24 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { - stm32_gpiowrite(GPIO_LCD_RS, !cmd); - return OK; + stm32_gpiowrite(GPIO_LCD_RS, !cmd); + return OK; } #endif #endif /* CONFIG_SPI_CMDDATA */ diff --git a/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h b/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h index 7c825b9bd1..1c1d3fb5f6 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h +++ b/boards/arm/stm32/nucleo-f4x1re/src/nucleo-f4x1re.h @@ -292,7 +292,7 @@ int board_ajoy_initialize(void); ****************************************************************************/ #ifdef CONFIG_CAN_MCP2515 -int stm32_mcp2515initialize(FAR const char *devpath); +int stm32_mcp2515initialize(const char *devpath); #endif #endif /* __BOARDS_ARM_STM32_NUCLEO_F401RE_SRC_NUCLEO_F401RE_H */ diff --git a/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c b/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c index f1a9258ff9..e98231ab40 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c +++ b/boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c @@ -101,17 +101,17 @@ ****************************************************************************/ static ajoy_buttonset_t -ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower); -static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, - FAR struct ajoy_sample_s *sample); +ajoy_supported(const struct ajoy_lowerhalf_s *lower); +static int ajoy_sample(const struct ajoy_lowerhalf_s *lower, + struct ajoy_sample_s *sample); static ajoy_buttonset_t -ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower); -static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, - ajoy_buttonset_t press, ajoy_buttonset_t release, - ajoy_handler_t handler, FAR void *arg); +ajoy_buttons(const struct ajoy_lowerhalf_s *lower); +static void ajoy_enable(const struct ajoy_lowerhalf_s *lower, + ajoy_buttonset_t press, ajoy_buttonset_t release, + ajoy_handler_t handler, void *arg); static void ajoy_disable(void); -static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg); +static int ajoy_interrupt(int irq, void *context, void *arg); /**************************************************************************** * Private Data @@ -153,7 +153,7 @@ static struct file g_adcfile; /* Current interrupt handler and argument */ static ajoy_handler_t g_ajoyhandler; -static FAR void *g_ajoyarg; +static void *g_ajoyarg; /**************************************************************************** * Private Functions @@ -168,7 +168,7 @@ static FAR void *g_ajoyarg; ****************************************************************************/ static ajoy_buttonset_t -ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) +ajoy_supported(const struct ajoy_lowerhalf_s *lower) { iinfo("Supported: %02x\n", AJOY_SUPPORTED); return (ajoy_buttonset_t)AJOY_SUPPORTED; @@ -182,12 +182,12 @@ ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) * ****************************************************************************/ -static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, - FAR struct ajoy_sample_s *sample) +static int ajoy_sample(const struct ajoy_lowerhalf_s *lower, + struct ajoy_sample_s *sample) { #ifndef NO_JOYSTICK_ADC struct adc_msg_s adcmsg[MAX_ADC_CHANNELS]; - FAR struct adc_msg_s *ptr; + struct adc_msg_s *ptr; ssize_t nread; ssize_t offset; int have; @@ -284,7 +284,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, ****************************************************************************/ static ajoy_buttonset_t -ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) +ajoy_buttons(const struct ajoy_lowerhalf_s *lower) { ajoy_buttonset_t ret = 0; int i; @@ -316,9 +316,9 @@ ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) * ****************************************************************************/ -static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, - ajoy_buttonset_t press, ajoy_buttonset_t release, - ajoy_handler_t handler, FAR void *arg) +static void ajoy_enable(const struct ajoy_lowerhalf_s *lower, + ajoy_buttonset_t press, ajoy_buttonset_t release, + ajoy_handler_t handler, void *arg) { irqstate_t flags; ajoy_buttonset_t either = press | release; @@ -413,7 +413,7 @@ static void ajoy_disable(void) * ****************************************************************************/ -static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg) +static int ajoy_interrupt(int irq, void *context, void *arg) { DEBUGASSERT(g_ajoyhandler); diff --git a/boards/arm/stm32/nucleo-f4x1re/src/stm32_buttons.c b/boards/arm/stm32/nucleo-f4x1re/src/stm32_buttons.c index 9e91a114eb..f6c9fee184 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-f4x1re/src/stm32_buttons.c @@ -99,7 +99,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-f4x1re/src/stm32_mcp2515.c b/boards/arm/stm32/nucleo-f4x1re/src/stm32_mcp2515.c index 51bb9a805c..f3a2c36cd0 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/stm32_mcp2515.c +++ b/boards/arm/stm32/nucleo-f4x1re/src/stm32_mcp2515.c @@ -56,9 +56,9 @@ struct stm32_mcp2515config_s /* Additional private definitions only known to this driver */ - FAR struct mcp2515_can_s *handle; /* The MCP2515 driver handle */ - mcp2515_handler_t handler; /* The MCP2515 interrupt handler */ - FAR void *arg; /* Argument to pass to the interrupt handler */ + struct mcp2515_can_s *handle; /* The MCP2515 driver handle */ + mcp2515_handler_t handler; /* The MCP2515 interrupt handler */ + void *arg; /* Argument to pass to the interrupt handler */ }; /**************************************************************************** @@ -72,8 +72,8 @@ struct stm32_mcp2515config_s * attach - Attach the MCP2515 interrupt handler to the GPIO interrupt */ -static int mcp2515_attach(FAR struct mcp2515_config_s *state, - mcp2515_handler_t handler, FAR void *arg); +static int mcp2515_attach(struct mcp2515_config_s *state, + mcp2515_handler_t handler, void *arg); /**************************************************************************** * Private Data @@ -112,10 +112,10 @@ static struct stm32_mcp2515config_s g_mcp2515config = /* This is the MCP2515 Interrupt handler */ -int mcp2515_interrupt(int irq, FAR void *context, FAR void *arg) +int mcp2515_interrupt(int irq, void *context, void *arg) { - FAR struct stm32_mcp2515config_s *priv = - (FAR struct stm32_mcp2515config_s *)arg; + struct stm32_mcp2515config_s *priv = + (struct stm32_mcp2515config_s *)arg; DEBUGASSERT(priv != NULL); @@ -131,11 +131,11 @@ int mcp2515_interrupt(int irq, FAR void *context, FAR void *arg) return OK; } -static int mcp2515_attach(FAR struct mcp2515_config_s *state, - mcp2515_handler_t handler, FAR void *arg) +static int mcp2515_attach(struct mcp2515_config_s *state, + mcp2515_handler_t handler, void *arg) { - FAR struct stm32_mcp2515config_s *priv = - (FAR struct stm32_mcp2515config_s *)state; + struct stm32_mcp2515config_s *priv = + (struct stm32_mcp2515config_s *)state; irqstate_t flags; caninfo("Saving handler %p\n", handler); @@ -173,11 +173,11 @@ static int mcp2515_attach(FAR struct mcp2515_config_s *state, * ****************************************************************************/ -int stm32_mcp2515initialize(FAR const char *devpath) +int stm32_mcp2515initialize(const char *devpath) { - FAR struct spi_dev_s *spi; - FAR struct can_dev_s *can; - FAR struct mcp2515_can_s *mcp2515; + struct spi_dev_s *spi; + struct can_dev_s *can; + struct mcp2515_can_s *mcp2515; int ret; /* Check if we are already initialized */ diff --git a/boards/arm/stm32/nucleo-f4x1re/src/stm32_spi.c b/boards/arm/stm32/nucleo-f4x1re/src/stm32_spi.c index aa8f104ce9..1c0037982d 100644 --- a/boards/arm/stm32/nucleo-f4x1re/src/stm32_spi.c +++ b/boards/arm/stm32/nucleo-f4x1re/src/stm32_spi.c @@ -122,7 +122,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : @@ -143,35 +143,35 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -202,21 +202,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c b/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c index c6451ea58e..46a1d0420b 100644 --- a/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c +++ b/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c @@ -164,7 +164,7 @@ static const uint32_t g_pinlist2[3] = int stm32_adc_setup(void) { static bool initialized = false; - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/nucleo-g431rb/src/stm32_buttons.c b/boards/arm/stm32/nucleo-g431rb/src/stm32_buttons.c index d1664202e4..1f8488937f 100644 --- a/boards/arm/stm32/nucleo-g431rb/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-g431rb/src/stm32_buttons.c @@ -94,7 +94,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-g431rb/src/stm32_cordic.c b/boards/arm/stm32/nucleo-g431rb/src/stm32_cordic.c index ead99fc7d0..8a401ee50f 100644 --- a/boards/arm/stm32/nucleo-g431rb/src/stm32_cordic.c +++ b/boards/arm/stm32/nucleo-g431rb/src/stm32_cordic.c @@ -48,9 +48,9 @@ int stm32_cordic_setup(void) { - FAR struct cordic_lowerhalf_s *cordic = NULL; - static bool initialized = false; - int ret = OK; + struct cordic_lowerhalf_s *cordic = NULL; + static bool initialized = false; + int ret = OK; /* Have we already initialized? */ diff --git a/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h b/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h index d80b40c6d1..e8b3b9ea7c 100644 --- a/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h +++ b/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h @@ -94,7 +94,7 @@ #define GPIO_LCD_D7 ( GPIO_OUT | GPIO_PORTA | GPIO_PIN8) /* D7 PA8 */ #ifdef CONFIG_LCD_ILI9341 -FAR struct lcd_dev_s *stm32_ili93418b_initialize(void); +struct lcd_dev_s *stm32_ili93418b_initialize(void); #endif /* SPI sd card */ diff --git a/boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.c b/boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.c index 7402edda4b..226974910b 100644 --- a/boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.c +++ b/boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.c @@ -84,10 +84,10 @@ int board_app_initialize(uintptr_t arg) { int ret; #ifdef CONFIG_STM32_I2C1 - FAR struct i2c_master_s *i2c1; + struct i2c_master_s *i2c1; #endif #ifdef CONFIG_STM32_I2C2 - FAR struct i2c_master_s *i2c2; + struct i2c_master_s *i2c2; #endif #ifdef CONFIG_STM32_I2C1 diff --git a/boards/arm/stm32/nucleo-l152re/src/stm32_buttons.c b/boards/arm/stm32/nucleo-l152re/src/stm32_buttons.c index 2bed07f013..0d58d426e4 100644 --- a/boards/arm/stm32/nucleo-l152re/src/stm32_buttons.c +++ b/boards/arm/stm32/nucleo-l152re/src/stm32_buttons.c @@ -94,7 +94,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/nucleo-l152re/src/stm32_ili93418b.c b/boards/arm/stm32/nucleo-l152re/src/stm32_ili93418b.c index 58a626c363..0b5ae9d488 100644 --- a/boards/arm/stm32/nucleo-l152re/src/stm32_ili93418b.c +++ b/boards/arm/stm32/nucleo-l152re/src/stm32_ili93418b.c @@ -154,21 +154,21 @@ static const uint32_t g_lcdpin[] = /* Command and data transmission control */ -static int stm32_ili93418b_recvblock(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_recvblock(struct ili9341_lcd_s *lcd, uint16_t *wd, uint16_t nwords); -static void stm32_ili93418b_deselect(FAR struct ili9341_lcd_s *lcd); -static void stm32_ili93418b_select(FAR struct ili9341_lcd_s *lcd); -static int stm32_ili93418b_sendcmd(FAR struct ili9341_lcd_s *lcd, - const uint8_t cmd); -static int stm32_ili93418b_sendparam(FAR struct ili9341_lcd_s *lcd, +static void stm32_ili93418b_deselect(struct ili9341_lcd_s *lcd); +static void stm32_ili93418b_select(struct ili9341_lcd_s *lcd); +static int stm32_ili93418b_sendcmd(struct ili9341_lcd_s *lcd, + const uint8_t cmd); +static int stm32_ili93418b_sendparam(struct ili9341_lcd_s *lcd, const uint8_t param); -static int stm32_ili93418b_recvparam(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_recvparam(struct ili9341_lcd_s *lcd, uint8_t *param); -static int stm32_ili93418b_backlight(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_backlight(struct ili9341_lcd_s *lcd, int level); -static int stm32_ili93418b_sendgram(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_sendgram(struct ili9341_lcd_s *lcd, const uint16_t *wd, uint32_t nwords); -static int stm32_ili93418b_recvgram(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_recvgram(struct ili9341_lcd_s *lcd, uint16_t *wd, uint32_t nwords); /**************************************************************************** @@ -310,7 +310,7 @@ static inline uint8_t read_byte(void) * ****************************************************************************/ -static int stm32_ili93418b_recvblock(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_recvblock(struct ili9341_lcd_s *lcd, uint16_t *wd, uint16_t nwords) { /** ili9341 uses a 18-bit pixel format packed in a 24-bit stream per pixel. @@ -367,7 +367,7 @@ static int stm32_ili93418b_recvblock(FAR struct ili9341_lcd_s *lcd, * ****************************************************************************/ -static void stm32_ili93418b_select(FAR struct ili9341_lcd_s *lcd) +static void stm32_ili93418b_select(struct ili9341_lcd_s *lcd) { LCD_CS_CLR; } @@ -385,7 +385,7 @@ static void stm32_ili93418b_select(FAR struct ili9341_lcd_s *lcd) * ****************************************************************************/ -static void stm32_ili93418b_deselect(FAR struct ili9341_lcd_s *lcd) +static void stm32_ili93418b_deselect(struct ili9341_lcd_s *lcd) { LCD_CS_SET; } @@ -405,7 +405,7 @@ static void stm32_ili93418b_deselect(FAR struct ili9341_lcd_s *lcd) * ****************************************************************************/ -static int stm32_ili93418b_sendparam(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_sendparam(struct ili9341_lcd_s *lcd, const uint8_t param) { lcdinfo("param=%04x\n", param); @@ -430,7 +430,7 @@ static int stm32_ili93418b_sendparam(FAR struct ili9341_lcd_s *lcd, * ****************************************************************************/ -static int stm32_ili93418b_sendgram(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_sendgram(struct ili9341_lcd_s *lcd, const uint16_t *wd, uint32_t nwords) { lcdinfo("wd=%p , wd=0x%x, nwords=%" PRId32 "\n", wd, *wd, nwords); @@ -467,7 +467,7 @@ static int stm32_ili93418b_sendgram(FAR struct ili9341_lcd_s *lcd, * ****************************************************************************/ -static int stm32_ili93418b_recvparam(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_recvparam(struct ili9341_lcd_s *lcd, uint8_t *param) { LCD_RS_DATA; @@ -492,7 +492,7 @@ static int stm32_ili93418b_recvparam(FAR struct ili9341_lcd_s *lcd, * ****************************************************************************/ -static int stm32_ili93418b_recvgram(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_recvgram(struct ili9341_lcd_s *lcd, uint16_t *wd, uint32_t nwords) { lcdinfo("wd=%p, nwords=%" PRId32 "\n", wd, nwords); @@ -515,7 +515,7 @@ static int stm32_ili93418b_recvgram(FAR struct ili9341_lcd_s *lcd, ****************************************************************************/ static int stm32_ili93418b_sendcmd( - FAR struct ili9341_lcd_s *lcd, const uint8_t cmd) + struct ili9341_lcd_s *lcd, const uint8_t cmd) { lcdinfo("cmd=%04x\n", cmd); LCD_RS_CMD; @@ -538,7 +538,7 @@ static int stm32_ili93418b_sendcmd( * ****************************************************************************/ -static int stm32_ili93418b_backlight(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93418b_backlight(struct ili9341_lcd_s *lcd, int level) { return OK; @@ -580,9 +580,9 @@ static inline void stm32_gpio_initialize(void) ****************************************************************************/ struct lcd_dev_s *g_lcddev; -FAR struct lcd_dev_s *stm32_ili93418b_initialize(void) +struct lcd_dev_s *stm32_ili93418b_initialize(void) { - FAR struct ili9341_lcd_s *lcd = &g_ili9341_lcddev; + struct ili9341_lcd_s *lcd = &g_ili9341_lcddev; lcdinfo("initialize ili9341 8bit parallel subdriver\n"); @@ -705,7 +705,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { if (lcddev == 0) { diff --git a/boards/arm/stm32/nucleo-l152re/src/stm32_spi.c b/boards/arm/stm32/nucleo-l152re/src/stm32_spi.c index 8b5687f889..e3d8fe40f6 100644 --- a/boards/arm/stm32/nucleo-l152re/src/stm32_spi.c +++ b/boards/arm/stm32/nucleo-l152re/src/stm32_spi.c @@ -48,13 +48,13 @@ /* Global driver instances */ #ifdef CONFIG_STM32_SPI1 - FAR struct spi_dev_s *g_spi1; + struct spi_dev_s *g_spi1; #endif #ifdef CONFIG_STM32_SPI2 - FAR struct spi_dev_s *g_spi2; + struct spi_dev_s *g_spi2; #endif #ifdef CONFIG_STM32_SPI3 - FAR struct spi_dev_s *g_spi3; + struct spi_dev_s *g_spi3; #endif /**************************************************************************** @@ -160,7 +160,7 @@ void weak_function stm32_spiinitialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : @@ -174,7 +174,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; #if defined(CONFIG_MMCSD_SPI) @@ -189,28 +189,28 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -242,21 +242,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h index 27a6ef8136..3d648bc1aa 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h +++ b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h @@ -321,7 +321,7 @@ int stm32_dac_setup(void); ****************************************************************************/ #ifdef CONFIG_TIMER -int stm32_timer_driver_setup(FAR const char *devpath, int timer); +int stm32_timer_driver_setup(const char *devpath, int timer); #endif /**************************************************************************** diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c index 68646de44c..74f2808af9 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c @@ -119,7 +119,7 @@ #ifdef HAVE_I2CTOOL static void stm32_i2c_register(int bus) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(bus); diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_buttons.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_buttons.c index ab3d605404..9c171c234e 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_buttons.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_buttons.c @@ -120,7 +120,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_mrf24j40.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_mrf24j40.c index 52fbb5bc43..741165957a 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_mrf24j40.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_mrf24j40.c @@ -55,7 +55,7 @@ struct stm32_priv_s { struct mrf24j40_lower_s dev; xcpt_t handler; - FAR void *arg; + void *arg; uint32_t intcfg; uint8_t spidev; }; @@ -73,11 +73,11 @@ struct stm32_priv_s * irq_enable - Enable or disable the GPIO interrupt */ -static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, - xcpt_t handler, FAR void *arg); -static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, +static int stm32_attach_irq(const struct mrf24j40_lower_s *lower, + xcpt_t handler, void *arg); +static void stm32_enable_irq(const struct mrf24j40_lower_s *lower, bool state); -static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv); +static int stm32_mrf24j40_devsetup(struct stm32_priv_s *priv); /**************************************************************************** * Private Data @@ -118,10 +118,10 @@ static struct stm32_priv_s g_mrf24j40_mb1_priv = * irq_enable - Enable or disable the GPIO interrupt */ -static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, - xcpt_t handler, FAR void *arg) +static int stm32_attach_irq(const struct mrf24j40_lower_s *lower, + xcpt_t handler, void *arg) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; DEBUGASSERT(priv != NULL); @@ -132,10 +132,10 @@ static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, return OK; } -static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, +static void stm32_enable_irq(const struct mrf24j40_lower_s *lower, bool state) { - FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; + struct stm32_priv_s *priv = (struct stm32_priv_s *)lower; /* The caller should not attempt to enable interrupts if the handler * has not yet been 'attached' @@ -171,11 +171,11 @@ static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, * ****************************************************************************/ -static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv) +static int stm32_mrf24j40_devsetup(struct stm32_priv_s *priv) { - FAR struct ieee802154_radio_s *radio; + struct ieee802154_radio_s *radio; MACHANDLE mac; - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Configure the interrupt pin */ diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_spi.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_spi.c index c604e5990c..b3f065586b 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_spi.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_spi.c @@ -127,7 +127,7 @@ void stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { #if defined(CONFIG_CAN_MCP2515) @@ -205,7 +205,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; @@ -228,12 +228,12 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -264,7 +264,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_LCD_ST7567 diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_timer.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_timer.c index 8884a5f1eb..119208a440 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_timer.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_timer.c @@ -53,7 +53,7 @@ * ****************************************************************************/ -int stm32_timer_driver_setup(FAR const char *devpath, int timer) +int stm32_timer_driver_setup(const char *devpath, int timer) { return stm32_timer_initialize(devpath, timer); } diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_usb.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_usb.c index 0971e0113b..205684d95b 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_usb.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_usb.c @@ -225,7 +225,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32F4DISCO_USBHOST_PRIO, CONFIG_STM32F4DISCO_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -318,7 +318,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/olimex-stm32-h405/src/stm32_buttons.c b/boards/arm/stm32/olimex-stm32-h405/src/stm32_buttons.c index b4f2f73f65..435d0d39d6 100644 --- a/boards/arm/stm32/olimex-stm32-h405/src/stm32_buttons.c +++ b/boards/arm/stm32/olimex-stm32-h405/src/stm32_buttons.c @@ -120,7 +120,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/olimex-stm32-h405/src/stm32_usb.c b/boards/arm/stm32/olimex-stm32-h405/src/stm32_usb.c index 3189dc273a..6bacba1068 100644 --- a/boards/arm/stm32/olimex-stm32-h405/src/stm32_usb.c +++ b/boards/arm/stm32/olimex-stm32-h405/src/stm32_usb.c @@ -96,7 +96,7 @@ void stm32_usbinitialize(void) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c index f112680a4a..5b1f8e312e 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c +++ b/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c @@ -78,7 +78,7 @@ int stm32_bringup(void) { #ifdef HAVE_RTC_DRIVER - FAR struct rtc_lowerhalf_s *lower; + struct rtc_lowerhalf_s *lower; #endif int ret; diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_buttons.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_buttons.c index c98c78a84b..bb238c3327 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_buttons.c +++ b/boards/arm/stm32/olimex-stm32-h407/src/stm32_buttons.c @@ -120,7 +120,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_sdio.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_sdio.c index 757705717a..dba5a0f3f3 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_sdio.c +++ b/boards/arm/stm32/olimex-stm32-h407/src/stm32_sdio.c @@ -54,7 +54,7 @@ * Private Data ****************************************************************************/ -static FAR struct sdio_dev_s *g_sdio_dev; +static struct sdio_dev_s *g_sdio_dev; #ifdef HAVE_NCD static bool g_sd_inserted = 0xff; /* Impossible value */ #endif @@ -72,7 +72,7 @@ static bool g_sd_inserted = 0xff; /* Impossible value */ ****************************************************************************/ #ifdef HAVE_NCD -static int stm32_ncd_interrupt(int irq, FAR void *context) +static int stm32_ncd_interrupt(int irq, void *context) { bool present; diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_usb.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_usb.c index d0c459fdb8..6cc9d44759 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_usb.c +++ b/boards/arm/stm32/olimex-stm32-h407/src/stm32_usb.c @@ -207,7 +207,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32H407_USBHOST_PRIO, CONFIG_STM32H407_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -300,7 +300,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/olimex-stm32-p107/src/stm32_encx24j600.c b/boards/arm/stm32/olimex-stm32-p107/src/stm32_encx24j600.c index 81171e270a..50d5b20132 100644 --- a/boards/arm/stm32/olimex-stm32-p107/src/stm32_encx24j600.c +++ b/boards/arm/stm32/olimex-stm32-p107/src/stm32_encx24j600.c @@ -84,17 +84,17 @@ struct stm32_lower_s { const struct enc_lower_s lower; /* Low-level MCU interface */ xcpt_t handler; /* ENCX24J600 interrupt handler */ - FAR void *arg; /* Argument that accompanies the handler */ + void *arg; /* Argument that accompanies the handler */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, - FAR void *arg); -static void up_enable(FAR const struct enc_lower_s *lower); -static void up_disable(FAR const struct enc_lower_s *lower); +static int up_attach(const struct enc_lower_s *lower, xcpt_t handler, + void *arg); +static void up_enable(const struct enc_lower_s *lower); +static void up_disable(const struct enc_lower_s *lower); /**************************************************************************** * Private Data @@ -125,10 +125,10 @@ static struct stm32_lower_s g_enclower = * Name: struct enc_lower_s methods ****************************************************************************/ -static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, - FAR void *arg) +static int up_attach(const struct enc_lower_s *lower, xcpt_t handler, + void *arg) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; /* Just save the handler for use when the interrupt is enabled */ @@ -137,9 +137,9 @@ static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, return OK; } -static void up_enable(FAR const struct enc_lower_s *lower) +static void up_enable(const struct enc_lower_s *lower) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; DEBUGASSERT(priv->handler != NULL); stm32_gpiosetevent(GPIO_ENCX24J600_INTR, false, true, true, @@ -150,7 +150,7 @@ static void up_enable(FAR const struct enc_lower_s *lower) * the occur while "disabled" will be lost. */ -static void up_disable(FAR const struct enc_lower_s *lower) +static void up_disable(const struct enc_lower_s *lower) { stm32_gpiosetevent(GPIO_ENCX24J600_INTR, false, true, true, NULL, NULL); @@ -166,7 +166,7 @@ static void up_disable(FAR const struct enc_lower_s *lower) void arm_netinitialize(void) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Assumptions: diff --git a/boards/arm/stm32/olimex-stm32-p107/src/stm32_spi.c b/boards/arm/stm32/olimex-stm32-p107/src/stm32_spi.c index 62f890ee9c..554cc19d01 100644 --- a/boards/arm/stm32/olimex-stm32-p107/src/stm32_spi.c +++ b/boards/arm/stm32/olimex-stm32-p107/src/stm32_spi.c @@ -95,7 +95,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { @@ -110,7 +110,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/boards/arm/stm32/olimex-stm32-p207/src/stm32_buttons.c b/boards/arm/stm32/olimex-stm32-p207/src/stm32_buttons.c index e545a9689d..81c0b2e517 100644 --- a/boards/arm/stm32/olimex-stm32-p207/src/stm32_buttons.c +++ b/boards/arm/stm32/olimex-stm32-p207/src/stm32_buttons.c @@ -156,7 +156,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/olimex-stm32-p207/src/stm32_usb.c b/boards/arm/stm32/olimex-stm32-p207/src/stm32_usb.c index f646adecbc..dc12d9f096 100644 --- a/boards/arm/stm32/olimex-stm32-p207/src/stm32_usb.c +++ b/boards/arm/stm32/olimex-stm32-p207/src/stm32_usb.c @@ -209,7 +209,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -302,7 +302,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c index 208208fc35..ebac126c40 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c @@ -84,7 +84,7 @@ extern const int MODSYMS_NSYMBOLS_VAR; int stm32_bringup(void) { #ifdef HAVE_MMCSD - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; #endif int ret; diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_buttons.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_buttons.c index 2302c89fac..9e3f49440a 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_buttons.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_buttons.c @@ -168,7 +168,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_cs4344.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_cs4344.c index 854b91461b..d0d16233b4 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_cs4344.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_cs4344.c @@ -85,9 +85,9 @@ int stm32_cs4344_initialize(int minor) { - FAR struct audio_lowerhalf_s *cs4344; - FAR struct audio_lowerhalf_s *pcm; - FAR struct i2s_dev_s *i2s; + struct audio_lowerhalf_s *cs4344; + struct audio_lowerhalf_s *pcm; + struct i2s_dev_s *i2s; static bool initialized = false; char devname[12]; int ret; diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_djoystick.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_djoystick.c index 0a8472cdee..9e433c880e 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_djoystick.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_djoystick.c @@ -59,15 +59,15 @@ ****************************************************************************/ static djoy_buttonset_t - djoy_supported(FAR const struct djoy_lowerhalf_s *lower); + djoy_supported(const struct djoy_lowerhalf_s *lower); static djoy_buttonset_t - djoy_sample(FAR const struct djoy_lowerhalf_s *lower); -static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, + djoy_sample(const struct djoy_lowerhalf_s *lower); +static void djoy_enable(const struct djoy_lowerhalf_s *lower, djoy_buttonset_t press, djoy_buttonset_t release, - djoy_interrupt_t handler, FAR void *arg); + djoy_interrupt_t handler, void *arg); static void djoy_disable(void); -static int djoy_interrupt(int irq, FAR void *context, FAR void *arg); +static int djoy_interrupt(int irq, void *context, void *arg); /**************************************************************************** * Private Data @@ -85,7 +85,7 @@ static const uint16_t g_joygpio[DJOY_NGPIOS] = /* Current interrupt handler and argument */ static djoy_interrupt_t g_djoyhandler; -static FAR void *g_djoyarg; +static void *g_djoyarg; /* This is the discrete joystick lower half driver interface */ @@ -109,7 +109,7 @@ static const struct djoy_lowerhalf_s g_djoylower = ****************************************************************************/ static djoy_buttonset_t - djoy_supported(FAR const struct djoy_lowerhalf_s *lower) + djoy_supported(const struct djoy_lowerhalf_s *lower) { iinfo("Supported: %02x\n", DJOY_SUPPORTED); return (djoy_buttonset_t)DJOY_SUPPORTED; @@ -123,7 +123,7 @@ static djoy_buttonset_t * ****************************************************************************/ -static djoy_buttonset_t djoy_sample(FAR const struct djoy_lowerhalf_s *lower) +static djoy_buttonset_t djoy_sample(const struct djoy_lowerhalf_s *lower) { djoy_buttonset_t ret = 0; int i; @@ -152,9 +152,9 @@ static djoy_buttonset_t djoy_sample(FAR const struct djoy_lowerhalf_s *lower) * ****************************************************************************/ -static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, - djoy_buttonset_t press, djoy_buttonset_t release, - djoy_interrupt_t handler, FAR void *arg) +static void djoy_enable(const struct djoy_lowerhalf_s *lower, + djoy_buttonset_t press, djoy_buttonset_t release, + djoy_interrupt_t handler, void *arg) { irqstate_t flags; djoy_buttonset_t either = press | release; @@ -249,7 +249,7 @@ static void djoy_disable(void) * ****************************************************************************/ -static int djoy_interrupt(int irq, FAR void *context, FAR void *arg) +static int djoy_interrupt(int irq, void *context, void *arg) { DEBUGASSERT(g_djoyhandler); if (g_djoyhandler) diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_spi.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_spi.c index 9d578ec855..1f95503bf9 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_spi.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_spi.c @@ -86,35 +86,35 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -128,7 +128,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -159,21 +159,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { /* This is the Data/Command control pad which determines whether the * data bits are data or a command. diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_st7735.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_st7735.c index 231d49e44b..a475648817 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_st7735.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_st7735.c @@ -98,7 +98,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { return g_lcd; } diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_usb.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_usb.c index 88c208715a..28d5b89bff 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_usb.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_usb.c @@ -226,7 +226,7 @@ int stm32_usbhost_setup(void) ret = kthread_create("usbhost", CONFIG_OLIMEXP407_USBHOST_PRIO, CONFIG_OLIMEXP407_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -319,7 +319,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c b/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c index b7fd62bd86..e9a71e0f87 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c @@ -42,7 +42,7 @@ ****************************************************************************/ #if defined(CONFIG_USBDEV) -static int vbus_handler(int irq, FAR void *context, FAR void *arg) +static int vbus_handler(int irq, void *context, void *arg) { return OK; } diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_buttons.c b/boards/arm/stm32/olimexino-stm32/src/stm32_buttons.c index fb08b84525..3029be78be 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_buttons.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_buttons.c @@ -106,7 +106,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c b/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c index 0412a6d321..280a3c1d5f 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c @@ -72,7 +72,7 @@ ****************************************************************************/ #ifdef CONFIG_USBMSC_COMPOSITE -static FAR void *g_mschandle; +static void *g_mschandle; #endif /**************************************************************************** @@ -104,8 +104,8 @@ static FAR void *g_mschandle; #ifdef CONFIG_USBMSC_COMPOSITE static int board_mscclassobject(int minor, - FAR struct usbdev_devinfo_s *devinfo, - FAR struct usbdevclass_driver_s **classdev) + struct usbdev_devinfo_s *devinfo, + struct usbdevclass_driver_s **classdev) { int ret; @@ -168,7 +168,7 @@ static int board_mscclassobject(int minor, ****************************************************************************/ #ifdef CONFIG_USBMSC_COMPOSITE -static void board_mscuninitialize(FAR struct usbdevclass_driver_s *classdev) +static void board_mscuninitialize(struct usbdevclass_driver_s *classdev) { DEBUGASSERT(g_mschandle != NULL); usbmsc_uninitialize(g_mschandle); @@ -193,7 +193,7 @@ static void board_mscuninitialize(FAR struct usbdevclass_driver_s *classdev) ****************************************************************************/ #ifdef CONFIG_USBMSC_COMPOSITE -static FAR void *board_composite0_connect(int port) +static void *board_composite0_connect(int port) { /* Here we are composing the configuration of the usb composite device. * @@ -293,7 +293,7 @@ static FAR void *board_composite0_connect(int port) * ****************************************************************************/ -static FAR void *board_composite1_connect(int port) +static void *board_composite1_connect(int port) { /* REVISIT: This configuration currently fails. stm32_epallocpma() fails * allocate a buffer for the 6th endpoint. Currently it supports 7x64 byte @@ -367,7 +367,7 @@ int board_composite_initialize(int port) * In this case, there is nothing further to be done here. */ - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* First, get an instance of the SPI interface */ @@ -424,7 +424,7 @@ int board_composite_initialize(int port) * ****************************************************************************/ -FAR void *board_composite_connect(int port, int configid) +void *board_composite_connect(int port, int configid) { if (configid == 0) { diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_spi.c b/boards/arm/stm32/olimexino-stm32/src/stm32_spi.c index fba745b2d0..0917f2a7f6 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_spi.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_spi.c @@ -91,7 +91,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -102,14 +102,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -122,7 +122,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, #endif } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { /* No switch on SD card socket so assume it is here */ @@ -131,14 +131,14 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -169,21 +169,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_usbdev.c b/boards/arm/stm32/olimexino-stm32/src/stm32_usbdev.c index 9d922b6681..c22c826088 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_usbdev.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_usbdev.c @@ -95,7 +95,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); stm32_gpiowrite(GPIO_USB_PULLUPN, !enable); @@ -113,7 +113,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c b/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c index 23f16fcd26..93ef00d6fa 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c @@ -82,7 +82,7 @@ int board_usbmsc_initialize(int port) * In this case, there is nothing further to be done here. */ - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* First, get an instance of the SPI interface */ diff --git a/boards/arm/stm32/omnibusf4/src/omnibusf4.h b/boards/arm/stm32/omnibusf4/src/omnibusf4.h index ab79318651..f2a8fa779a 100644 --- a/boards/arm/stm32/omnibusf4/src/omnibusf4.h +++ b/boards/arm/stm32/omnibusf4/src/omnibusf4.h @@ -189,7 +189,7 @@ int stm32_can_setup(void); ****************************************************************************/ #ifdef CONFIG_TIMER -int stm32_timer_driver_setup(FAR const char *devpath, int timer); +int stm32_timer_driver_setup(const char *devpath, int timer); #endif /**************************************************************************** diff --git a/boards/arm/stm32/omnibusf4/src/stm32_boot.c b/boards/arm/stm32/omnibusf4/src/stm32_boot.c index b5b203d5c6..2e8c0c9b10 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_boot.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_boot.c @@ -54,7 +54,7 @@ void stm32_boardinitialize(void) { #ifdef CONFIG_SCHED_CRITMONITOR - up_perf_init((FAR void *)STM32_SYSCLK_FREQUENCY); + up_perf_init((void *)STM32_SYSCLK_FREQUENCY); #endif #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) diff --git a/boards/arm/stm32/omnibusf4/src/stm32_bringup.c b/boards/arm/stm32/omnibusf4/src/stm32_bringup.c index 5b130a2b62..e39875769e 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_bringup.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_bringup.c @@ -77,7 +77,7 @@ #if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) static void stm32_i2c_register(int bus) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(bus); @@ -136,7 +136,7 @@ static void stm32_i2ctool(void) int stm32_bringup(void) { #ifdef HAVE_RTC_DRIVER - FAR struct rtc_lowerhalf_s *lower; + struct rtc_lowerhalf_s *lower; #endif int ret = OK; diff --git a/boards/arm/stm32/omnibusf4/src/stm32_spi.c b/boards/arm/stm32/omnibusf4/src/stm32_spi.c index f94a7f4527..2233b514ac 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_spi.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_spi.c @@ -95,7 +95,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -106,14 +106,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, stm32_gpiowrite(GPIO_CS_MPU6000, !selected); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -124,7 +124,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, stm32_gpiowrite(GPIO_MMCSD_NSS, selected ? 0 : 1); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { /* Note: SD_DET is pulled high when there's no SD card present. */ @@ -133,7 +133,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d %s\n", @@ -144,7 +144,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, stm32_gpiowrite(GPIO_CS_MAX7456, selected ? 0 : 1); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/boards/arm/stm32/omnibusf4/src/stm32_timer.c b/boards/arm/stm32/omnibusf4/src/stm32_timer.c index fb991e3938..08ddc18036 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_timer.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_timer.c @@ -53,7 +53,7 @@ * ****************************************************************************/ -int stm32_timer_driver_setup(FAR const char *devpath, int timer) +int stm32_timer_driver_setup(const char *devpath, int timer) { return stm32_timer_initialize(devpath, timer); } diff --git a/boards/arm/stm32/omnibusf4/src/stm32_usb.c b/boards/arm/stm32/omnibusf4/src/stm32_usb.c index 2a1febf198..2b34031e2e 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_usb.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_usb.c @@ -234,7 +234,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_OMNIBUSF4_USBHOST_PRIO, CONFIG_OMNIBUSF4_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -327,7 +327,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/photon/src/stm32_buttons.c b/boards/arm/stm32/photon/src/stm32_buttons.c index 30af899bb8..697d941434 100644 --- a/boards/arm/stm32/photon/src/stm32_buttons.c +++ b/boards/arm/stm32/photon/src/stm32_buttons.c @@ -69,7 +69,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { if (id != BOARD_BUTTON1) { diff --git a/boards/arm/stm32/photon/src/stm32_composite.c b/boards/arm/stm32/photon/src/stm32_composite.c index 7594a39aad..1a79696414 100644 --- a/boards/arm/stm32/photon/src/stm32_composite.c +++ b/boards/arm/stm32/photon/src/stm32_composite.c @@ -65,7 +65,7 @@ * ****************************************************************************/ -static FAR void *board_composite0_connect(int port) +static void *board_composite0_connect(int port) { /* Here we are composing the configuration of the usb composite device. * @@ -151,7 +151,7 @@ int board_composite_initialize(int port) * ****************************************************************************/ -FAR void *board_composite_connect(int port, int configid) +void *board_composite_connect(int port, int configid) { if (configid == 0) { diff --git a/boards/arm/stm32/photon/src/stm32_spi.c b/boards/arm/stm32/photon/src/stm32_spi.c index 5ce0ea5a18..5f0a1b67ee 100644 --- a/boards/arm/stm32/photon/src/stm32_spi.c +++ b/boards/arm/stm32/photon/src/stm32_spi.c @@ -84,42 +84,42 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { switch (devid) { @@ -156,14 +156,14 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { /* To be provided */ @@ -172,7 +172,7 @@ int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { /* To be provided */ diff --git a/boards/arm/stm32/photon/src/stm32_usb.c b/boards/arm/stm32/photon/src/stm32_usb.c index 5987028a4d..db1eb3d3e2 100644 --- a/boards/arm/stm32/photon/src/stm32_usb.c +++ b/boards/arm/stm32/photon/src/stm32_usb.c @@ -59,7 +59,7 @@ void stm32_usbinitialize(void) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/photon/src/stm32_wdt.c b/boards/arm/stm32/photon/src/stm32_wdt.c index c1d5fbeccb..64c3e292b8 100644 --- a/boards/arm/stm32/photon/src/stm32_wdt.c +++ b/boards/arm/stm32/photon/src/stm32_wdt.c @@ -50,7 +50,7 @@ static int wdog_daemon(int argc, char *argv[]) { - FAR struct file filestruct; + struct file filestruct; int ret; /* Open watchdog device */ @@ -107,7 +107,7 @@ exit_close_dev: int photon_watchdog_initialize(void) { - FAR struct file filestruct; + struct file filestruct; int ret = 0; /* Open the watchdog device */ @@ -146,7 +146,7 @@ int photon_watchdog_initialize(void) int taskid = kthread_create(CONFIG_PHOTON_WDG_THREAD_NAME, CONFIG_PHOTON_WDG_THREAD_PRIORITY, CONFIG_PHOTON_WDG_THREAD_STACKSIZE, - (main_t)wdog_daemon, (FAR char * const *)NULL); + (main_t)wdog_daemon, (char * const *)NULL); if (taskid <= 0) { diff --git a/boards/arm/stm32/shenzhou/src/stm32_buttons.c b/boards/arm/stm32/shenzhou/src/stm32_buttons.c index 0d6f381bf1..190721492a 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_buttons.c +++ b/boards/arm/stm32/shenzhou/src/stm32_buttons.c @@ -137,7 +137,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/shenzhou/src/stm32_ili93xx.c b/boards/arm/stm32/shenzhou/src/stm32_ili93xx.c index 706e759027..93e4dda2d4 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_ili93xx.c +++ b/boards/arm/stm32/shenzhou/src/stm32_ili93xx.c @@ -396,39 +396,39 @@ struct stm32_dev_s /* Low Level LCD access */ #ifdef CONFIG_LCD_REGDEBUG -static void stm32_lcdshow(FAR struct stm32_lower_s *priv, - FAR const char *msg); +static void stm32_lcdshow(struct stm32_lower_s *priv, + const char *msg); #else # define stm32_lcdshow(p,m) #endif -static void stm32_writereg(FAR struct stm32_dev_s *priv, uint8_t regaddr, +static void stm32_writereg(struct stm32_dev_s *priv, uint8_t regaddr, uint16_t regval); -static uint16_t stm32_readreg(FAR struct stm32_dev_s *priv, uint8_t regaddr); -static void stm32_gramselect(FAR struct stm32_dev_s *priv); -static void stm32_writegram(FAR struct stm32_dev_s *priv, uint16_t rgbval); -static inline uint16_t stm32_readgram(FAR struct stm32_dev_s *priv); -static void stm32_readnosetup(FAR struct stm32_dev_s *priv, - FAR uint16_t *accum); -static uint16_t stm32_readnoshift(FAR struct stm32_dev_s *priv, - FAR uint16_t *accum); -static void stm32_setcursor(FAR struct stm32_dev_s *priv, +static uint16_t stm32_readreg(struct stm32_dev_s *priv, uint8_t regaddr); +static void stm32_gramselect(struct stm32_dev_s *priv); +static void stm32_writegram(struct stm32_dev_s *priv, uint16_t rgbval); +static inline uint16_t stm32_readgram(struct stm32_dev_s *priv); +static void stm32_readnosetup(struct stm32_dev_s *priv, + uint16_t *accum); +static uint16_t stm32_readnoshift(struct stm32_dev_s *priv, + uint16_t *accum); +static void stm32_setcursor(struct stm32_dev_s *priv, uint16_t col, uint16_t row); /* LCD Data Transfer Methods */ static int stm32_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, size_t npixels); + const uint8_t *buffer, size_t npixels); static int stm32_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, size_t npixels); + uint8_t *buffer, size_t npixels); /* LCD Configuration */ -static int stm32_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo); -static int stm32_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm32_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo); +static int stm32_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo); + struct lcd_planeinfo_s *pinfo); /* LCD RGB Mapping */ @@ -451,24 +451,24 @@ static int stm32_setcontrast(struct lcd_dev_s *dev, unsigned int contrast); /* Initialization */ -static void stm32_lcdinput(FAR struct stm32_dev_s *priv); -static void stm32_lcdoutput(FAR struct stm32_dev_s *priv); +static void stm32_lcdinput(struct stm32_dev_s *priv); +static void stm32_lcdoutput(struct stm32_dev_s *priv); #if !defined(CONFIG_STM32_ILI9300_DISABLE) || !defined(CONFIG_STM32_ILI9320_DISABLE) || !defined(CONFIG_STM32_ILI9321_DISABLE) -static void stm32_lcd9300init(FAR struct stm32_dev_s *priv, +static void stm32_lcd9300init(struct stm32_dev_s *priv, enum lcd_type_e lcdtype); #endif #if !defined(CONFIG_STM32_ILI9325_DISABLE) || !defined(CONFIG_STM32_ILI9328_DISABLE) -static void stm32_lcd9325init(FAR struct stm32_dev_s *priv, +static void stm32_lcd9325init(struct stm32_dev_s *priv, enum lcd_type_e lcdtype); #endif #ifndef CONFIG_STM32_ILI9919_DISABLE -static inline void stm32_lcd9919init(FAR struct stm32_dev_s *priv); +static inline void stm32_lcd9919init(struct stm32_dev_s *priv); #endif #ifndef CONFIG_STM32_ILI1505_DISABLE -static inline void stm32_lcd1505init(FAR struct stm32_dev_s *priv); +static inline void stm32_lcd1505init(struct stm32_dev_s *priv); #endif -static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv); +static inline int stm32_lcdinitialize(struct stm32_dev_s *priv); /**************************************************************************** * Private Data @@ -571,8 +571,8 @@ static struct stm32_dev_s g_lcddev = ****************************************************************************/ #ifdef CONFIG_LCD_REGDEBUG -static void stm32_lcdshow(FAR struct stm32_lower_s *priv, - FAR const char *msg) +static void stm32_lcdshow(struct stm32_lower_s *priv, + const char *msg) { _info("%s:\n", msg); _info(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", @@ -598,7 +598,7 @@ static void stm32_lcdshow(FAR struct stm32_lower_s *priv, * ****************************************************************************/ -static void stm32_writereg(FAR struct stm32_dev_s *priv, +static void stm32_writereg(struct stm32_dev_s *priv, uint8_t regaddr, uint16_t regval) { /* Make sure that we are configured for output */ @@ -630,7 +630,7 @@ static void stm32_writereg(FAR struct stm32_dev_s *priv, * ****************************************************************************/ -static uint16_t stm32_readreg(FAR struct stm32_dev_s *priv, +static uint16_t stm32_readreg(struct stm32_dev_s *priv, uint8_t regaddr) { uint16_t regval; @@ -670,7 +670,7 @@ static uint16_t stm32_readreg(FAR struct stm32_dev_s *priv, * ****************************************************************************/ -static void stm32_gramselect(FAR struct stm32_dev_s *priv) +static void stm32_gramselect(struct stm32_dev_s *priv) { /* Make sure that we are configured for output */ @@ -694,7 +694,7 @@ static void stm32_gramselect(FAR struct stm32_dev_s *priv) * ****************************************************************************/ -static inline void stm32_writegram(FAR struct stm32_dev_s *priv, +static inline void stm32_writegram(struct stm32_dev_s *priv, uint16_t rgbval) { /* Make sure that we are configured for output */ @@ -719,7 +719,7 @@ static inline void stm32_writegram(FAR struct stm32_dev_s *priv, * ****************************************************************************/ -static inline uint16_t stm32_readgram(FAR struct stm32_dev_s *priv) +static inline uint16_t stm32_readgram(struct stm32_dev_s *priv) { uint16_t regval; @@ -751,8 +751,8 @@ static inline uint16_t stm32_readgram(FAR struct stm32_dev_s *priv) * ****************************************************************************/ -static void stm32_readnosetup(FAR struct stm32_dev_s *priv, - FAR uint16_t *accum) +static void stm32_readnosetup(struct stm32_dev_s *priv, + uint16_t *accum) { /* Read-ahead one pixel */ @@ -771,8 +771,8 @@ static void stm32_readnosetup(FAR struct stm32_dev_s *priv, * ****************************************************************************/ -static uint16_t stm32_readnoshift(FAR struct stm32_dev_s *priv, - FAR uint16_t *accum) +static uint16_t stm32_readnoshift(struct stm32_dev_s *priv, + uint16_t *accum) { /* Read the value (GRAM register already selected) */ @@ -789,7 +789,7 @@ static uint16_t stm32_readnoshift(FAR struct stm32_dev_s *priv, * ****************************************************************************/ -static void stm32_setcursor(FAR struct stm32_dev_s *priv, +static void stm32_setcursor(struct stm32_dev_s *priv, uint16_t col, uint16_t row) { if (priv->type == LCD_TYPE_ILI9919) @@ -816,8 +816,8 @@ static void stm32_setcursor(FAR struct stm32_dev_s *priv, ****************************************************************************/ #if 0 /* Sometimes useful */ -static void stm32_dumprun(FAR const char *msg, - FAR uint16_t *run, size_t npixels) +static void stm32_dumprun(const char *msg, + uint16_t *run, size_t npixels) { int i; int j; @@ -852,10 +852,10 @@ static void stm32_dumprun(FAR const char *msg, ****************************************************************************/ static int stm32_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, size_t npixels) + const uint8_t *buffer, size_t npixels) { - FAR struct stm32_dev_s *priv = &g_lcddev; - FAR const uint16_t *src = (FAR const uint16_t *)buffer; + struct stm32_dev_s *priv = &g_lcddev; + const uint16_t *src = (const uint16_t *)buffer; int i; /* Buffer must be provided and aligned to a 16-bit address boundary */ @@ -962,12 +962,12 @@ static int stm32_putrun(fb_coord_t row, fb_coord_t col, ****************************************************************************/ static int stm32_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, size_t npixels) + uint8_t *buffer, size_t npixels) { - FAR struct stm32_dev_s *priv = &g_lcddev; - FAR uint16_t *dest = (FAR uint16_t *)buffer; - void (*readsetup)(FAR struct stm32_dev_s *priv, FAR uint16_t *accum); - uint16_t (*readgram)(FAR struct stm32_dev_s *priv, FAR uint16_t *accum); + struct stm32_dev_s *priv = &g_lcddev; + uint16_t *dest = (uint16_t *)buffer; + void (*readsetup)(struct stm32_dev_s *priv, uint16_t *accum); + uint16_t (*readgram)(struct stm32_dev_s *priv, uint16_t *accum); uint16_t accum; int i; @@ -1100,8 +1100,8 @@ static int stm32_getrun(fb_coord_t row, fb_coord_t col, * ****************************************************************************/ -static int stm32_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo) +static int stm32_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", @@ -1119,9 +1119,9 @@ static int stm32_getvideoinfo(FAR struct lcd_dev_s *dev, * ****************************************************************************/ -static int stm32_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm32_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo) + struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); @@ -1141,7 +1141,7 @@ static int stm32_getplaneinfo(FAR struct lcd_dev_s *dev, static int stm32_getpower(struct lcd_dev_s *dev) { - FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev; + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; lcdinfo("power: %d\n", 0); return priv->power; @@ -1157,7 +1157,7 @@ static int stm32_getpower(struct lcd_dev_s *dev) * ****************************************************************************/ -static int stm32_poweroff(FAR struct stm32_dev_s *priv) +static int stm32_poweroff(struct stm32_dev_s *priv) { /* Turn the display off */ @@ -1181,7 +1181,7 @@ static int stm32_poweroff(FAR struct stm32_dev_s *priv) static int stm32_setpower(struct lcd_dev_s *dev, int power) { - FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev; + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); @@ -1309,7 +1309,7 @@ static int stm32_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) * ****************************************************************************/ -static void stm32_lcdinput(FAR struct stm32_dev_s *priv) +static void stm32_lcdinput(struct stm32_dev_s *priv) { #ifndef CONFIG_LCD_FASTCONFIG int i; @@ -1345,7 +1345,7 @@ static void stm32_lcdinput(FAR struct stm32_dev_s *priv) * ****************************************************************************/ -static void stm32_lcdoutput(FAR struct stm32_dev_s *priv) +static void stm32_lcdoutput(struct stm32_dev_s *priv) { #ifndef CONFIG_LCD_FASTCONFIG int i; @@ -1382,7 +1382,7 @@ static void stm32_lcdoutput(FAR struct stm32_dev_s *priv) ****************************************************************************/ #if !defined(CONFIG_STM32_ILI9300_DISABLE) || !defined(CONFIG_STM32_ILI9320_DISABLE) || !defined(CONFIG_STM32_ILI9321_DISABLE) -static void stm32_lcd9300init(FAR struct stm32_dev_s *priv, +static void stm32_lcd9300init(struct stm32_dev_s *priv, enum lcd_type_e lcdtype) { stm32_writereg(priv, LCD_REG_0, 0x0001); /* Start internal OSC */ @@ -1454,7 +1454,7 @@ static void stm32_lcd9300init(FAR struct stm32_dev_s *priv, ****************************************************************************/ #ifndef CONFIG_STM32_ILI9331_DISABLE -static void stm32_lcd9331init(FAR struct stm32_dev_s *priv) +static void stm32_lcd9331init(struct stm32_dev_s *priv) { stm32_writereg(priv, LCD_REG_231, 0x1014); stm32_writereg(priv, LCD_REG_1, 0x0100); /* Set SS and SM bit */ @@ -1535,7 +1535,7 @@ static void stm32_lcd9331init(FAR struct stm32_dev_s *priv) ****************************************************************************/ #if !defined(CONFIG_STM32_ILI9325_DISABLE) || !defined(CONFIG_STM32_ILI9328_DISABLE) -static void stm32_lcd9325init(FAR struct stm32_dev_s *priv, +static void stm32_lcd9325init(struct stm32_dev_s *priv, enum lcd_type_e lcdtype) { stm32_writereg(priv, LCD_REG_227, 0x3008); @@ -1639,7 +1639,7 @@ static void stm32_lcd9325init(FAR struct stm32_dev_s *priv, ****************************************************************************/ #ifndef CONFIG_STM32_ILI9919_DISABLE -static inline void stm32_lcd9919init(FAR struct stm32_dev_s *priv) +static inline void stm32_lcd9919init(struct stm32_dev_s *priv) { /* Power on reset, display off */ @@ -1693,7 +1693,7 @@ static inline void stm32_lcd9919init(FAR struct stm32_dev_s *priv) ****************************************************************************/ #ifndef CONFIG_STM32_ILI1505_DISABLE -static inline void stm32_lcd1505init(FAR struct stm32_dev_s *priv) +static inline void stm32_lcd1505init(struct stm32_dev_s *priv) { stm32_writereg(priv, LCD_REG_7, 0x0000); up_mdelay(5); @@ -1786,7 +1786,7 @@ static inline void stm32_lcd1505init(FAR struct stm32_dev_s *priv) * ****************************************************************************/ -static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv) +static inline int stm32_lcdinitialize(struct stm32_dev_s *priv) { uint16_t id; int ret = OK; @@ -1894,7 +1894,7 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv) int board_lcd_initialize(void) { - FAR struct stm32_dev_s *priv = &g_lcddev; + struct stm32_dev_s *priv = &g_lcddev; int ret; int i; @@ -1940,7 +1940,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return &g_lcddev.dev; @@ -1956,7 +1956,7 @@ FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) void board_lcd_uninitialize(void) { - FAR struct stm32_dev_s *priv = &g_lcddev; + struct stm32_dev_s *priv = &g_lcddev; /* Put the LCD in the lowest possible power state */ @@ -1981,7 +1981,7 @@ void board_lcd_uninitialize(void) void stm32_lcdclear(uint16_t color) { - FAR struct stm32_dev_s *priv = &g_lcddev; + struct stm32_dev_s *priv = &g_lcddev; uint32_t i = 0; stm32_setcursor(priv, 0, 0); diff --git a/boards/arm/stm32/shenzhou/src/stm32_mmcsd.c b/boards/arm/stm32/shenzhou/src/stm32_mmcsd.c index eb061fc8f9..3be1439dc9 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_mmcsd.c +++ b/boards/arm/stm32/shenzhou/src/stm32_mmcsd.c @@ -77,7 +77,7 @@ int stm32_sdinitialize(int minor) { #ifdef HAVE_MMCSD - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Get the SPI port */ diff --git a/boards/arm/stm32/shenzhou/src/stm32_spi.c b/boards/arm/stm32/shenzhou/src/stm32_spi.c index d231d618c3..6c0165ddc1 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_spi.c +++ b/boards/arm/stm32/shenzhou/src/stm32_spi.c @@ -104,7 +104,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -126,7 +126,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { /* The card detect pin is pulled up so that we detect the presence of a * card by see a low value on the input pin. @@ -142,7 +142,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -178,7 +178,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/boards/arm/stm32/shenzhou/src/stm32_ssd1289.c b/boards/arm/stm32/shenzhou/src/stm32_ssd1289.c index d900b65b2b..053c05f2a2 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_ssd1289.c +++ b/boards/arm/stm32/shenzhou/src/stm32_ssd1289.c @@ -63,9 +63,9 @@ struct stm32_lower_s { - struct ssd1289_lcd_s dev; /* This is externally visible the driver state */ - FAR struct lcd_dev_s *drvr; /* The saved instance of the LCD driver */ - bool output; /* True: Configured for output */ + struct ssd1289_lcd_s dev; /* This is externally visible the driver state */ + struct lcd_dev_s *drvr; /* The saved instance of the LCD driver */ + bool output; /* True: Configured for output */ }; /**************************************************************************** @@ -75,34 +75,34 @@ struct stm32_lower_s /* Helpers */ #ifdef CONFIG_LCD_REGDEBUG -static void stm32_lcdshow(FAR struct stm32_lower_s *priv, - FAR const char *msg); +static void stm32_lcdshow(struct stm32_lower_s *priv, + const char *msg); #else # define stm32_lcdshow(p,m) #endif -static void stm32_wrdata(FAR struct stm32_lower_s *priv, uint16_t data); +static void stm32_wrdata(struct stm32_lower_s *priv, uint16_t data); #ifndef CONFIG_LCD_NOGETRUN -static inline uint16_t stm32_rddata(FAR struct stm32_lower_s *priv); +static inline uint16_t stm32_rddata(struct stm32_lower_s *priv); #endif /* Low Level LCD access */ -static void stm32_select(FAR struct ssd1289_lcd_s *dev); -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev); -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index); +static void stm32_select(struct ssd1289_lcd_s *dev); +static void stm32_deselect(struct ssd1289_lcd_s *dev); +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index); #ifndef CONFIG_LCD_NOGETRUN -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev); +static uint16_t stm32_read(struct ssd1289_lcd_s *dev); #endif -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data); -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power); +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data); +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power); /* Initialization */ #ifndef CONFIG_LCD_NOGETRUN -static void stm32_lcdinput(FAR struct stm32_lower_s *priv); +static void stm32_lcdinput(struct stm32_lower_s *priv); #endif -static void stm32_lcdoutput(FAR struct stm32_lower_s *priv); +static void stm32_lcdoutput(struct stm32_lower_s *priv); /**************************************************************************** * Private Data @@ -252,8 +252,8 @@ static struct stm32_lower_s g_lcdlower = ****************************************************************************/ #ifdef CONFIG_LCD_REGDEBUG -static void stm32_lcdshow(FAR struct stm32_lower_s *priv, - FAR const char *msg) +static void stm32_lcdshow(struct stm32_lower_s *priv, + const char *msg) { _info("%s:\n", msg); _info(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", @@ -279,7 +279,7 @@ static void stm32_lcdshow(FAR struct stm32_lower_s *priv, * ****************************************************************************/ -static void stm32_wrdata(FAR struct stm32_lower_s *priv, uint16_t data) +static void stm32_wrdata(struct stm32_lower_s *priv, uint16_t data) { /* Make sure D0-D15 are configured as outputs */ @@ -304,7 +304,7 @@ static void stm32_wrdata(FAR struct stm32_lower_s *priv, uint16_t data) ****************************************************************************/ #ifndef CONFIG_LCD_NOGETRUN -static inline uint16_t stm32_rddata(FAR struct stm32_lower_s *priv) +static inline uint16_t stm32_rddata(struct stm32_lower_s *priv) { uint16_t regval; @@ -335,7 +335,7 @@ static inline uint16_t stm32_rddata(FAR struct stm32_lower_s *priv) * ****************************************************************************/ -static void stm32_select(FAR struct ssd1289_lcd_s *dev) +static void stm32_select(struct ssd1289_lcd_s *dev) { /* Select the LCD by setting the LCD_CS low */ @@ -350,7 +350,7 @@ static void stm32_select(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) +static void stm32_deselect(struct ssd1289_lcd_s *dev) { /* De-select the LCD by setting the LCD_CS high */ @@ -365,9 +365,9 @@ static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)dev; + struct stm32_lower_s *priv = (struct stm32_lower_s *)dev; /* Clear the RS signal to select the index address */ @@ -387,9 +387,9 @@ static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) ****************************************************************************/ #ifndef CONFIG_LCD_NOGETRUN -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) +static uint16_t stm32_read(struct ssd1289_lcd_s *dev) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)dev; + struct stm32_lower_s *priv = (struct stm32_lower_s *)dev; /* Set the RS signal to select the data address */ @@ -409,9 +409,9 @@ static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)dev; + struct stm32_lower_s *priv = (struct stm32_lower_s *)dev; /* Set the RS signal to select the data address */ @@ -430,7 +430,7 @@ static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) * ****************************************************************************/ -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power) +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power) { /* There is no software control over the backlight */ } @@ -444,7 +444,7 @@ static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power) ****************************************************************************/ #ifndef CONFIG_LCD_NOGETRUN -static void stm32_lcdinput(FAR struct stm32_lower_s *priv) +static void stm32_lcdinput(struct stm32_lower_s *priv) { #ifndef CONFIG_LCD_FASTCONFIG int i; @@ -481,7 +481,7 @@ static void stm32_lcdinput(FAR struct stm32_lower_s *priv) * ****************************************************************************/ -static void stm32_lcdoutput(FAR struct stm32_lower_s *priv) +static void stm32_lcdoutput(struct stm32_lower_s *priv) { #ifndef CONFIG_LCD_FASTCONFIG int i; @@ -526,7 +526,7 @@ static void stm32_lcdoutput(FAR struct stm32_lower_s *priv) int board_lcd_initialize(void) { - FAR struct stm32_lower_s *priv = &g_lcdlower; + struct stm32_lower_s *priv = &g_lcdlower; int i; /* Only initialize the driver once */ @@ -568,9 +568,9 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { - FAR struct stm32_lower_s *priv = &g_lcdlower; + struct stm32_lower_s *priv = &g_lcdlower; DEBUGASSERT(lcddev == 0); return priv->drvr; } @@ -585,7 +585,7 @@ FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) void board_lcd_uninitialize(void) { - FAR struct stm32_lower_s *priv = &g_lcdlower; + struct stm32_lower_s *priv = &g_lcdlower; /* Turn the display off */ diff --git a/boards/arm/stm32/shenzhou/src/stm32_touchscreen.c b/boards/arm/stm32/shenzhou/src/stm32_touchscreen.c index 1927e1523d..78409c9c30 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_touchscreen.c +++ b/boards/arm/stm32/shenzhou/src/stm32_touchscreen.c @@ -96,11 +96,11 @@ struct stm32_config_s * pendown - Return the state of the pen down GPIO input */ -static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr); -static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable); -static void tsc_clear(FAR struct ads7843e_config_s *state); -static bool tsc_busy(FAR struct ads7843e_config_s *state); -static bool tsc_pendown(FAR struct ads7843e_config_s *state); +static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr); +static void tsc_enable(struct ads7843e_config_s *state, bool enable); +static void tsc_clear(struct ads7843e_config_s *state); +static bool tsc_busy(struct ads7843e_config_s *state); +static bool tsc_pendown(struct ads7843e_config_s *state); /**************************************************************************** * Private Data @@ -145,9 +145,9 @@ static struct stm32_config_s g_tscinfo = * pendown - Return the state of the pen down GPIO input */ -static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t handler) +static int tsc_attach(struct ads7843e_config_s *state, xcpt_t handler) { - FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state; + struct stm32_config_s *priv = (struct stm32_config_s *)state; /* Just save the handler for use when the interrupt is enabled */ @@ -155,9 +155,9 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t handler) return OK; } -static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) +static void tsc_enable(struct ads7843e_config_s *state, bool enable) { - FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state; + struct stm32_config_s *priv = (struct stm32_config_s *)state; /* The caller should not attempt to enable interrupts if the handler * has not yet been 'attached' @@ -180,12 +180,12 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) } } -static void tsc_clear(FAR struct ads7843e_config_s *state) +static void tsc_clear(struct ads7843e_config_s *state) { /* Does nothing */ } -static bool tsc_busy(FAR struct ads7843e_config_s *state) +static bool tsc_busy(struct ads7843e_config_s *state) { /* Hmmm... The ADS7843E BUSY pin is not brought out on the Shenzhou board. * We will most certainly have to revisit this. There is this cryptic @@ -199,7 +199,7 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state) return false; } -static bool tsc_pendown(FAR struct ads7843e_config_s *state) +static bool tsc_pendown(struct ads7843e_config_s *state) { /* XPT2046 uses an an internal pullup resistor. The PENIRQ output goes low * due to the current path through the touch screen to ground, which @@ -234,7 +234,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) int stm32_tsc_setup(int minor) { - FAR struct spi_dev_s *dev; + struct spi_dev_s *dev; int ret; iinfo("minor %d\n", minor); diff --git a/boards/arm/stm32/shenzhou/src/stm32_usb.c b/boards/arm/stm32/shenzhou/src/stm32_usb.c index 2f73fe24fc..fd31e732fe 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_usb.c +++ b/boards/arm/stm32/shenzhou/src/stm32_usb.c @@ -200,7 +200,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -293,7 +293,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/shenzhou/src/stm32_w25.c b/boards/arm/stm32/shenzhou/src/stm32_w25.c index ba563c4736..c6ffead272 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_w25.c +++ b/boards/arm/stm32/shenzhou/src/stm32_w25.c @@ -80,8 +80,8 @@ int stm32_w25initialize(int minor) { #ifdef HAVE_W25 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; #ifdef CONFIG_FS_NXFFS char devname[12]; #endif diff --git a/boards/arm/stm32/stm3210e-eval/include/board.h b/boards/arm/stm32/stm3210e-eval/include/board.h index c246e5e928..10d4186430 100644 --- a/boards/arm/stm32/stm3210e-eval/include/board.h +++ b/boards/arm/stm32/stm3210e-eval/include/board.h @@ -261,7 +261,7 @@ void stm3210e_lcdclear(uint16_t color); ****************************************************************************/ #if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_STM32_I2C1) -int stm32_lm75initialize(FAR const char *devpath); +int stm32_lm75initialize(const char *devpath); #endif /**************************************************************************** diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c b/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c index 6e0e8a3466..84033a74eb 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c @@ -114,7 +114,7 @@ #ifdef HAVE_I2CTOOL static void stm32_i2c_register(int bus) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(bus); @@ -180,11 +180,11 @@ static void stm32_i2ctool(void) int stm32_bringup(void) { #ifdef CONFIG_STM32_SPI1 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; #endif #ifdef NSH_HAVEMMCSD - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; #endif int ret; diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_buttons.c b/boards/arm/stm32/stm3210e-eval/src/stm32_buttons.c index 4989ca06c8..6a009a6a6f 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_buttons.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_buttons.c @@ -151,7 +151,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c b/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c index 01db1258ff..dd95fc2405 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c @@ -67,7 +67,7 @@ ****************************************************************************/ #ifdef CONFIG_USBMSC_COMPOSITE -static FAR void *g_mschandle; +static void *g_mschandle; #endif /**************************************************************************** @@ -99,8 +99,8 @@ static FAR void *g_mschandle; #ifdef CONFIG_USBMSC_COMPOSITE static int board_mscclassobject(int minor, - FAR struct usbdev_devinfo_s *devinfo, - FAR struct usbdevclass_driver_s **classdev) + struct usbdev_devinfo_s *devinfo, + struct usbdevclass_driver_s **classdev) { int ret; @@ -163,7 +163,7 @@ static int board_mscclassobject(int minor, ****************************************************************************/ #ifdef CONFIG_USBMSC_COMPOSITE -static void board_mscuninitialize(FAR struct usbdevclass_driver_s *classdev) +static void board_mscuninitialize(struct usbdevclass_driver_s *classdev) { DEBUGASSERT(g_mschandle != NULL); usbmsc_uninitialize(g_mschandle); @@ -188,7 +188,7 @@ static void board_mscuninitialize(FAR struct usbdevclass_driver_s *classdev) ****************************************************************************/ #ifdef CONFIG_USBMSC_COMPOSITE -static FAR void *board_composite0_connect(int port) +static void *board_composite0_connect(int port) { /* Here we are composing the configuration of the usb composite device. * @@ -288,7 +288,7 @@ static FAR void *board_composite0_connect(int port) * ****************************************************************************/ -static FAR void *board_composite1_connect(int port) +static void *board_composite1_connect(int port) { /* REVISIT: This configuration currently fails. stm32_epallocpma() fails * allocate a buffer for the 6th endpoint. Currently it supports 7x64 byte @@ -366,7 +366,7 @@ int board_composite_initialize(int port) */ #ifndef CONFIG_NSH_BUILTIN_APPS - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; int ret; /* First, get an instance of the SDIO interface */ @@ -426,7 +426,7 @@ int board_composite_initialize(int port) * ****************************************************************************/ -FAR void *board_composite_connect(int port, int configid) +void *board_composite_connect(int port, int configid) { if (configid == 0) { diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_djoystick.c b/boards/arm/stm32/stm3210e-eval/src/stm32_djoystick.c index 7d8865f834..5f91206773 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_djoystick.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_djoystick.c @@ -59,15 +59,15 @@ ****************************************************************************/ static djoy_buttonset_t -djoy_supported(FAR const struct djoy_lowerhalf_s *lower); +djoy_supported(const struct djoy_lowerhalf_s *lower); static djoy_buttonset_t -djoy_sample(FAR const struct djoy_lowerhalf_s *lower); -static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, - djoy_buttonset_t press, djoy_buttonset_t release, - djoy_interrupt_t handler, FAR void *arg); +djoy_sample(const struct djoy_lowerhalf_s *lower); +static void djoy_enable(const struct djoy_lowerhalf_s *lower, + djoy_buttonset_t press, djoy_buttonset_t release, + djoy_interrupt_t handler, void *arg); static void djoy_disable(void); -static int djoy_interrupt(int irq, FAR void *context, FAR void *arg); +static int djoy_interrupt(int irq, void *context, void *arg); /**************************************************************************** * Private Data @@ -85,7 +85,7 @@ static const uint16_t g_joygpio[DJOY_NGPIOS] = /* Current interrupt handler and argument */ static djoy_interrupt_t g_djoyhandler; -static FAR void *g_djoyarg; +static void *g_djoyarg; /* This is the discrete joystick lower half driver interface */ @@ -109,7 +109,7 @@ static const struct djoy_lowerhalf_s g_djoylower = ****************************************************************************/ static djoy_buttonset_t -djoy_supported(FAR const struct djoy_lowerhalf_s *lower) +djoy_supported(const struct djoy_lowerhalf_s *lower) { iinfo("Supported: %02x\n", DJOY_SUPPORTED); return (djoy_buttonset_t)DJOY_SUPPORTED; @@ -123,7 +123,7 @@ djoy_supported(FAR const struct djoy_lowerhalf_s *lower) * ****************************************************************************/ -static djoy_buttonset_t djoy_sample(FAR const struct djoy_lowerhalf_s *lower) +static djoy_buttonset_t djoy_sample(const struct djoy_lowerhalf_s *lower) { djoy_buttonset_t ret = 0; int i; @@ -152,9 +152,9 @@ static djoy_buttonset_t djoy_sample(FAR const struct djoy_lowerhalf_s *lower) * ****************************************************************************/ -static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, - djoy_buttonset_t press, djoy_buttonset_t release, - djoy_interrupt_t handler, FAR void *arg) +static void djoy_enable(const struct djoy_lowerhalf_s *lower, + djoy_buttonset_t press, djoy_buttonset_t release, + djoy_interrupt_t handler, void *arg) { irqstate_t flags; djoy_buttonset_t either = press | release; @@ -249,7 +249,7 @@ static void djoy_disable(void) * ****************************************************************************/ -static int djoy_interrupt(int irq, FAR void *context, FAR void *arg) +static int djoy_interrupt(int irq, void *context, void *arg) { DEBUGASSERT(g_djoyhandler); if (g_djoyhandler) diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_idle.c b/boards/arm/stm32/stm3210e-eval/src/stm32_idle.c index b114650241..57a9e42f45 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_idle.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_idle.c @@ -145,7 +145,7 @@ static void stm32_alarmcb(void) ****************************************************************************/ #if defined(CONFIG_PM) && defined(CONFIG_RTC_ALARM) -static int stm32_alarm_exti(int irq, FAR void *context, FAR void *arg) +static int stm32_alarm_exti(int irq, void *context, void *arg) { stm32_alarmcb(); return OK; diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c b/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c index 66d60c9953..2cf0feaa81 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c @@ -335,30 +335,30 @@ static void stm3210e_writereg(uint8_t regaddr, uint16_t regval); static uint16_t stm3210e_readreg(uint8_t regaddr); static inline void stm3210e_gramselect(void); static inline void stm3210e_writegram(uint16_t rgbval); -static void stm3210e_readsetup(FAR uint16_t *accum); +static void stm3210e_readsetup(uint16_t *accum); #ifndef CONFIG_STM3210E_AM240320_DISABLE -static void stm3210e_readnosetup(FAR uint16_t *accum); +static void stm3210e_readnosetup(uint16_t *accum); #endif -static uint16_t stm3210e_readshift(FAR uint16_t *accum); -static uint16_t stm3210e_readnoshift(FAR uint16_t *accum); +static uint16_t stm3210e_readshift(uint16_t *accum); +static uint16_t stm3210e_readnoshift(uint16_t *accum); static void stm3210e_setcursor(uint16_t col, uint16_t row); /* LCD Data Transfer Methods */ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, + const uint8_t *buffer, size_t npixels); static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, + uint8_t *buffer, size_t npixels); /* LCD Configuration */ -static int stm3210e_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo); -static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm3210e_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo); +static int stm3210e_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo); + struct lcd_planeinfo_s *pinfo); /* LCD RGB Mapping */ @@ -548,7 +548,7 @@ static inline void stm3210e_writegram(uint16_t rgbval) /* Used for SPFD5408B and R61580 */ #if !defined(CONFIG_STM3210E_SPFD5408B_DISABLE) || !defined(CONFIG_STM3210E_R61580_DISABLE) -static void stm3210e_readsetup(FAR uint16_t *accum) +static void stm3210e_readsetup(uint16_t *accum) { /* Read-ahead one pixel */ @@ -559,7 +559,7 @@ static void stm3210e_readsetup(FAR uint16_t *accum) /* Used only for AM240320 */ #ifndef CONFIG_STM3210E_AM240320_DISABLE -static void stm3210e_readnosetup(FAR uint16_t *accum) +static void stm3210e_readnosetup(uint16_t *accum) { } #endif @@ -584,7 +584,7 @@ static void stm3210e_readnosetup(FAR uint16_t *accum) */ #ifndef CONFIG_STM3210E_SPFD5408B_DISABLE -static uint16_t stm3210e_readshift(FAR uint16_t *accum) +static uint16_t stm3210e_readshift(uint16_t *accum) { uint16_t red; uint16_t green; @@ -642,7 +642,7 @@ static uint16_t stm3210e_readshift(FAR uint16_t *accum) */ #if !defined(CONFIG_STM3210E_R61580_DISABLE) || !defined(CONFIG_STM3210E_AM240320_DISABLE) -static uint16_t stm3210e_readnoshift(FAR uint16_t *accum) +static uint16_t stm3210e_readnoshift(uint16_t *accum) { /* Read the value (GRAM register already selected) */ @@ -677,7 +677,7 @@ static void stm3210e_setcursor(uint16_t col, uint16_t row) ****************************************************************************/ #if 0 /* Sometimes useful */ -static void stm3210e_dumprun(FAR const char *msg, FAR uint16_t *run, +static void stm3210e_dumprun(const char *msg, uint16_t *run, size_t npixels) { int i; @@ -713,10 +713,10 @@ static void stm3210e_dumprun(FAR const char *msg, FAR uint16_t *run, ****************************************************************************/ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, + const uint8_t *buffer, size_t npixels) { - FAR const uint16_t *src = (FAR const uint16_t *)buffer; + const uint16_t *src = (const uint16_t *)buffer; int i; /* Buffer must be provided and aligned to a 16-bit address boundary */ @@ -807,12 +807,12 @@ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, ****************************************************************************/ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, + uint8_t *buffer, size_t npixels) { - FAR uint16_t *dest = (FAR uint16_t *)buffer; - void (*readsetup)(FAR uint16_t *accum); - uint16_t (*readgram)(FAR uint16_t *accum); + uint16_t *dest = (uint16_t *)buffer; + void (*readsetup)(uint16_t *accum); + uint16_t (*readgram)(uint16_t *accum); uint16_t accum; int i; @@ -933,8 +933,8 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, * ****************************************************************************/ -static int stm3210e_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo) +static int stm3210e_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", @@ -952,9 +952,9 @@ static int stm3210e_getvideoinfo(FAR struct lcd_dev_s *dev, * ****************************************************************************/ -static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm3210e_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo) + struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); @@ -1820,7 +1820,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return &g_lcddev.dev; diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_pmbuttons.c b/boards/arm/stm32/stm3210e-eval/src/stm32_pmbuttons.c index d3931c1beb..67b2a8fe20 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_pmbuttons.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_pmbuttons.c @@ -134,7 +134,7 @@ * ****************************************************************************/ -static int button_handler(int irq, FAR void *context, FAR void *arg) +static int button_handler(int irq, void *context, void *arg) { /* At this point the MCU should have already awakened. The state * change will be handled in the IDLE loop when the system is re-awakened diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_spi.c b/boards/arm/stm32/stm3210e-eval/src/stm32_spi.c index 5ab7632944..13639642ba 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_spi.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_spi.c @@ -93,7 +93,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -107,35 +107,35 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_usbdev.c b/boards/arm/stm32/stm3210e-eval/src/stm32_usbdev.c index 88efe434f2..67fa20e3c3 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_usbdev.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_usbdev.c @@ -76,7 +76,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); stm32_gpiowrite(GPIO_USB_PULLUP, !enable); @@ -94,7 +94,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c b/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c index 0b69a85d78..17c8ae3bbe 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c @@ -97,7 +97,7 @@ int board_usbmsc_initialize(int port) */ #ifndef CONFIG_NSH_BUILTIN_APPS - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; int ret; /* First, get an instance of the SDIO interface */ diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c b/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c index 4de80deb86..0dae5476a8 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c +++ b/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c @@ -121,7 +121,7 @@ #ifdef HAVE_I2CTOOL static void stm32_i2c_register(int bus) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(bus); @@ -198,11 +198,11 @@ static void stm32_i2ctool(void) int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_STM32_SPI1 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; #endif #ifdef HAVE_MMCSD - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; #endif int ret; diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_buttons.c b/boards/arm/stm32/stm3220g-eval/src/stm32_buttons.c index d7c58e16c2..1dafc0bfff 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_buttons.c +++ b/boards/arm/stm32/stm3220g-eval/src/stm32_buttons.c @@ -136,7 +136,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_lcd.c b/boards/arm/stm32/stm3220g-eval/src/stm32_lcd.c index 7b2e021a41..fddea94be7 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_lcd.c +++ b/boards/arm/stm32/stm3220g-eval/src/stm32_lcd.c @@ -283,24 +283,24 @@ static void stm3220g_writereg(uint8_t regaddr, uint16_t regval); static uint16_t stm3220g_readreg(uint8_t regaddr); static inline void stm3220g_gramselect(void); static inline void stm3220g_writegram(uint16_t rgbval); -static void stm3220g_readnosetup(FAR uint16_t *accum); -static uint16_t stm3220g_readnoshift(FAR uint16_t *accum); +static void stm3220g_readnosetup(uint16_t *accum); +static uint16_t stm3220g_readnoshift(uint16_t *accum); static void stm3220g_setcursor(uint16_t col, uint16_t row); /* LCD Data Transfer Methods */ static int stm3220g_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, size_t npixels); + const uint8_t *buffer, size_t npixels); static int stm3220g_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, size_t npixels); + uint8_t *buffer, size_t npixels); /* LCD Configuration */ -static int stm3220g_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo); -static int stm3220g_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm3220g_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo); +static int stm3220g_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo); + struct lcd_planeinfo_s *pinfo); /* LCD RGB Mapping */ @@ -463,7 +463,7 @@ static inline void stm3220g_writegram(uint16_t rgbval) * ****************************************************************************/ -static void stm3220g_readnosetup(FAR uint16_t *accum) +static void stm3220g_readnosetup(uint16_t *accum) { /* Read-ahead one pixel */ @@ -482,7 +482,7 @@ static void stm3220g_readnosetup(FAR uint16_t *accum) * ****************************************************************************/ -static uint16_t stm3220g_readnoshift(FAR uint16_t *accum) +static uint16_t stm3220g_readnoshift(uint16_t *accum) { /* Read the value (GRAM register already selected) */ @@ -516,8 +516,8 @@ static void stm3220g_setcursor(uint16_t col, uint16_t row) ****************************************************************************/ #if 0 /* Sometimes useful */ -static void stm3220g_dumprun(FAR const char *msg, - FAR uint16_t *run, size_t npixels) +static void stm3220g_dumprun(const char *msg, + uint16_t *run, size_t npixels) { int i; int j; @@ -553,10 +553,10 @@ static void stm3220g_dumprun(FAR const char *msg, static int stm3220g_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, + const uint8_t *buffer, size_t npixels) { - FAR const uint16_t *src = (FAR const uint16_t *)buffer; + const uint16_t *src = (const uint16_t *)buffer; int i; /* Buffer must be provided and aligned to a 16-bit address boundary */ @@ -674,11 +674,11 @@ static int stm3220g_putrun(fb_coord_t row, ****************************************************************************/ static int stm3220g_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, size_t npixels) + uint8_t *buffer, size_t npixels) { - FAR uint16_t *dest = (FAR uint16_t *)buffer; - void (*readsetup)(FAR uint16_t *accum); - uint16_t (*readgram)(FAR uint16_t *accum); + uint16_t *dest = (uint16_t *)buffer; + void (*readsetup)(uint16_t *accum); + uint16_t (*readgram)(uint16_t *accum); uint16_t accum; int i; @@ -812,8 +812,8 @@ static int stm3220g_getrun(fb_coord_t row, fb_coord_t col, * ****************************************************************************/ -static int stm3220g_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo) +static int stm3220g_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", @@ -831,9 +831,9 @@ static int stm3220g_getvideoinfo(FAR struct lcd_dev_s *dev, * ****************************************************************************/ -static int stm3220g_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm3220g_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo) + struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); @@ -1165,7 +1165,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return &g_lcddev.dev; diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_spi.c b/boards/arm/stm32/stm3220g-eval/src/stm32_spi.c index f4155ae931..6a368cdc28 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_spi.c +++ b/boards/arm/stm32/stm3220g-eval/src/stm32_spi.c @@ -84,42 +84,42 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_stmpe811.c b/boards/arm/stm32/stm3220g-eval/src/stm32_stmpe811.c index 8be1876d29..2400b8c7d3 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_stmpe811.c +++ b/boards/arm/stm32/stm3220g-eval/src/stm32_stmpe811.c @@ -142,11 +142,11 @@ struct stm32_stmpe811config_s * clear - Acknowledge/clear any pending GPIO interrupt */ -static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, - FAR void *arg); -static void stmpe811_enable(FAR struct stmpe811_config_s *state, +static int stmpe811_attach(struct stmpe811_config_s *state, xcpt_t isr, + void *arg); +static void stmpe811_enable(struct stmpe811_config_s *state, bool enable); -static void stmpe811_clear(FAR struct stmpe811_config_s *state); +static void stmpe811_clear(struct stmpe811_config_s *state); /**************************************************************************** * Private Data @@ -200,11 +200,11 @@ static struct stm32_stmpe811config_s g_stmpe811config = * clear - Acknowledge/clear any pending GPIO interrupt */ -static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, - FAR void *arg) +static int stmpe811_attach(struct stmpe811_config_s *state, xcpt_t isr, + void *arg) { - FAR struct stm32_stmpe811config_s *priv = - (FAR struct stm32_stmpe811config_s *)state; + struct stm32_stmpe811config_s *priv = + (struct stm32_stmpe811config_s *)state; iinfo("Saving handler %p\n", isr); DEBUGASSERT(priv); @@ -216,10 +216,10 @@ static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, return OK; } -static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable) +static void stmpe811_enable(struct stmpe811_config_s *state, bool enable) { - FAR struct stm32_stmpe811config_s *priv = - (FAR struct stm32_stmpe811config_s *)state; + struct stm32_stmpe811config_s *priv = + (struct stm32_stmpe811config_s *)state; irqstate_t flags; /* Attach and enable, or detach and disable. Enabling and disabling GPIO @@ -246,7 +246,7 @@ static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable) leave_critical_section(flags); } -static void stmpe811_clear(FAR struct stmpe811_config_s *state) +static void stmpe811_clear(struct stmpe811_config_s *state) { /* Does nothing */ } @@ -275,7 +275,7 @@ static void stmpe811_clear(FAR struct stmpe811_config_s *state) int stm32_tsc_setup(int minor) { #ifndef CONFIG_STMPE811_TSC_DISABLE - FAR struct i2c_master_s *dev; + struct i2c_master_s *dev; int ret; iinfo("minor %d\n", minor); @@ -305,7 +305,7 @@ int stm32_tsc_setup(int minor) g_stmpe811config.handle = stmpe811_instantiate(dev, - (FAR struct stmpe811_config_s *)&g_stmpe811config); + (struct stmpe811_config_s *)&g_stmpe811config); if (!g_stmpe811config.handle) { ierr("ERROR: Failed to instantiate the STMPE811 driver\n"); diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_usb.c b/boards/arm/stm32/stm3220g-eval/src/stm32_usb.c index a6e88886e5..a960e621b0 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_usb.c +++ b/boards/arm/stm32/stm3220g-eval/src/stm32_usb.c @@ -200,7 +200,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -293,7 +293,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c b/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c index 6ab613debd..323476a266 100644 --- a/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c +++ b/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c @@ -148,7 +148,7 @@ #ifdef HAVE_I2CTOOL static void stm32_i2c_register(int bus) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(bus); @@ -214,14 +214,14 @@ static void stm32_i2ctool(void) int stm32_bringup(void) { #ifdef HAVE_RTC_DRIVER - FAR struct rtc_lowerhalf_s *lower; + struct rtc_lowerhalf_s *lower; #endif #ifdef CONFIG_STM32_SPI1 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; #endif #ifdef HAVE_MMCSD - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; #endif int ret; diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_buttons.c b/boards/arm/stm32/stm3240g-eval/src/stm32_buttons.c index 06c991d228..009a6f4ce5 100644 --- a/boards/arm/stm32/stm3240g-eval/src/stm32_buttons.c +++ b/boards/arm/stm32/stm3240g-eval/src/stm32_buttons.c @@ -144,7 +144,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_lcd.c b/boards/arm/stm32/stm3240g-eval/src/stm32_lcd.c index 0dcf590d16..4fdea30831 100644 --- a/boards/arm/stm32/stm3240g-eval/src/stm32_lcd.c +++ b/boards/arm/stm32/stm3240g-eval/src/stm32_lcd.c @@ -283,24 +283,24 @@ static void stm3240g_writereg(uint8_t regaddr, uint16_t regval); static uint16_t stm3240g_readreg(uint8_t regaddr); static inline void stm3240g_gramselect(void); static inline void stm3240g_writegram(uint16_t rgbval); -static void stm3240g_readnosetup(FAR uint16_t *accum); -static uint16_t stm3240g_readnoshift(FAR uint16_t *accum); +static void stm3240g_readnosetup(uint16_t *accum); +static uint16_t stm3240g_readnoshift(uint16_t *accum); static void stm3240g_setcursor(uint16_t col, uint16_t row); /* LCD Data Transfer Methods */ static int stm3240g_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, size_t npixels); + const uint8_t *buffer, size_t npixels); static int stm3240g_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, size_t npixels); + uint8_t *buffer, size_t npixels); /* LCD Configuration */ -static int stm3240g_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo); -static int stm3240g_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm3240g_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo); +static int stm3240g_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo); + struct lcd_planeinfo_s *pinfo); /* LCD RGB Mapping */ @@ -463,7 +463,7 @@ static inline void stm3240g_writegram(uint16_t rgbval) * ****************************************************************************/ -static void stm3240g_readnosetup(FAR uint16_t *accum) +static void stm3240g_readnosetup(uint16_t *accum) { /* Read-ahead one pixel */ @@ -481,7 +481,7 @@ static void stm3240g_readnosetup(FAR uint16_t *accum) * ****************************************************************************/ -static uint16_t stm3240g_readnoshift(FAR uint16_t *accum) +static uint16_t stm3240g_readnoshift(uint16_t *accum) { /* Read the value (GRAM register already selected) */ @@ -515,8 +515,8 @@ static void stm3240g_setcursor(uint16_t col, uint16_t row) ****************************************************************************/ #if 0 /* Sometimes useful */ -static void stm3240g_dumprun(FAR const char *msg, - FAR uint16_t *run, size_t npixels) +static void stm3240g_dumprun(const char *msg, + uint16_t *run, size_t npixels) { int i; int j; @@ -551,10 +551,10 @@ static void stm3240g_dumprun(FAR const char *msg, ****************************************************************************/ static int stm3240g_putrun(fb_coord_t row, fb_coord_t col, - FAR const uint8_t *buffer, + const uint8_t *buffer, size_t npixels) { - FAR const uint16_t *src = (FAR const uint16_t *)buffer; + const uint16_t *src = (const uint16_t *)buffer; int i; /* Buffer must be provided and aligned to a 16-bit address boundary */ @@ -674,11 +674,11 @@ static int stm3240g_putrun(fb_coord_t row, fb_coord_t col, ****************************************************************************/ static int stm3240g_getrun(fb_coord_t row, fb_coord_t col, - FAR uint8_t *buffer, size_t npixels) + uint8_t *buffer, size_t npixels) { - FAR uint16_t *dest = (FAR uint16_t *)buffer; - void (*readsetup)(FAR uint16_t *accum); - uint16_t (*readgram)(FAR uint16_t *accum); + uint16_t *dest = (uint16_t *)buffer; + void (*readsetup)(uint16_t *accum); + uint16_t (*readgram)(uint16_t *accum); uint16_t accum; int i; @@ -812,8 +812,8 @@ static int stm3240g_getrun(fb_coord_t row, fb_coord_t col, * ****************************************************************************/ -static int stm3240g_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo) +static int stm3240g_getvideoinfo(struct lcd_dev_s *dev, + struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", @@ -831,9 +831,9 @@ static int stm3240g_getvideoinfo(FAR struct lcd_dev_s *dev, * ****************************************************************************/ -static int stm3240g_getplaneinfo(FAR struct lcd_dev_s *dev, +static int stm3240g_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo) + struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); @@ -1166,7 +1166,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return &g_lcddev.dev; diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_spi.c b/boards/arm/stm32/stm3240g-eval/src/stm32_spi.c index b67b65b58c..836acb5eaf 100644 --- a/boards/arm/stm32/stm3240g-eval/src/stm32_spi.c +++ b/boards/arm/stm32/stm3240g-eval/src/stm32_spi.c @@ -83,42 +83,42 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_stmpe811.c b/boards/arm/stm32/stm3240g-eval/src/stm32_stmpe811.c index 4cfe65980f..e4591d600f 100644 --- a/boards/arm/stm32/stm3240g-eval/src/stm32_stmpe811.c +++ b/boards/arm/stm32/stm3240g-eval/src/stm32_stmpe811.c @@ -124,9 +124,9 @@ struct stm32_stmpe811config_s /* Additional private definitions only known to this driver */ - STMPE811_HANDLE handle; /* The STMPE811 driver handle */ - xcpt_t handler; /* The STMPE811 interrupt handler */ - FAR void *arg; /* Interrupt handler argument */ + STMPE811_HANDLE handle; /* The STMPE811 driver handle */ + xcpt_t handler; /* The STMPE811 interrupt handler */ + void *arg; /* Interrupt handler argument */ }; /**************************************************************************** @@ -143,11 +143,11 @@ struct stm32_stmpe811config_s * clear - Acknowledge/clear any pending GPIO interrupt */ -static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, - FAR void *arg); -static void stmpe811_enable(FAR struct stmpe811_config_s *state, +static int stmpe811_attach(struct stmpe811_config_s *state, xcpt_t isr, + void *arg); +static void stmpe811_enable(struct stmpe811_config_s *state, bool enable); -static void stmpe811_clear(FAR struct stmpe811_config_s *state); +static void stmpe811_clear(struct stmpe811_config_s *state); /**************************************************************************** * Private Data @@ -201,11 +201,11 @@ static struct stm32_stmpe811config_s g_stmpe811config = * clear - Acknowledge/clear any pending GPIO interrupt */ -static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, - FAR void *arg) +static int stmpe811_attach(struct stmpe811_config_s *state, xcpt_t isr, + void *arg) { - FAR struct stm32_stmpe811config_s *priv = - (FAR struct stm32_stmpe811config_s *)state; + struct stm32_stmpe811config_s *priv = + (struct stm32_stmpe811config_s *)state; iinfo("Saving handler %p\n", isr); DEBUGASSERT(priv); @@ -219,10 +219,10 @@ static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, return OK; } -static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable) +static void stmpe811_enable(struct stmpe811_config_s *state, bool enable) { - FAR struct stm32_stmpe811config_s *priv = - (FAR struct stm32_stmpe811config_s *)state; + struct stm32_stmpe811config_s *priv = + (struct stm32_stmpe811config_s *)state; irqstate_t flags; /* Attach and enable, or detach and disable. Enabling and disabling GPIO @@ -249,7 +249,7 @@ static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable) leave_critical_section(flags); } -static void stmpe811_clear(FAR struct stmpe811_config_s *state) +static void stmpe811_clear(struct stmpe811_config_s *state) { /* Does nothing */ } @@ -278,7 +278,7 @@ static void stmpe811_clear(FAR struct stmpe811_config_s *state) int stm32_tsc_setup(int minor) { #ifndef CONFIG_STMPE811_TSC_DISABLE - FAR struct i2c_master_s *dev; + struct i2c_master_s *dev; int ret; iinfo("minor %d\n", minor); @@ -308,7 +308,7 @@ int stm32_tsc_setup(int minor) g_stmpe811config.handle = stmpe811_instantiate(dev, - (FAR struct stmpe811_config_s *)&g_stmpe811config); + (struct stmpe811_config_s *)&g_stmpe811config); if (!g_stmpe811config.handle) { ierr("ERROR: Failed to instantiate the STMPE811 driver\n"); diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_usb.c b/boards/arm/stm32/stm3240g-eval/src/stm32_usb.c index 7676255073..8bca690e8f 100644 --- a/boards/arm/stm32/stm3240g-eval/src/stm32_usb.c +++ b/boards/arm/stm32/stm3240g-eval/src/stm32_usb.c @@ -200,7 +200,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -293,7 +293,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32_tiny/src/stm32_spi.c b/boards/arm/stm32/stm32_tiny/src/stm32_spi.c index 9492cfc56f..57bb0550c2 100644 --- a/boards/arm/stm32/stm32_tiny/src/stm32_spi.c +++ b/boards/arm/stm32/stm32_tiny/src/stm32_spi.c @@ -96,19 +96,19 @@ void stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { switch (devid) @@ -127,7 +127,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; switch (devid) diff --git a/boards/arm/stm32/stm32_tiny/src/stm32_usbdev.c b/boards/arm/stm32/stm32_tiny/src/stm32_usbdev.c index 70bc4148be..ca535bf143 100644 --- a/boards/arm/stm32/stm32_tiny/src/stm32_usbdev.c +++ b/boards/arm/stm32/stm32_tiny/src/stm32_usbdev.c @@ -79,7 +79,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); stm32_gpiowrite(GPIO_USB_PULLUP, !enable); @@ -98,7 +98,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_at24.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_at24.c index e7f3d442d3..d7d6774ca3 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_at24.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_at24.c @@ -57,8 +57,8 @@ int stm32_at24_automount(int minor) { - FAR struct i2c_master_s *i2c; - FAR struct mtd_dev_s *mtd; + struct i2c_master_s *i2c; + struct mtd_dev_s *mtd; static bool initialized = false; int ret; diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c index a0149acc5d..3354557649 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c @@ -139,7 +139,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_ds18b20.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_ds18b20.c index 36e70ad9be..88849ae174 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_ds18b20.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_ds18b20.c @@ -80,9 +80,9 @@ struct ds18b20_device_s ****************************************************************************/ static void stm32_ds18b20_cb_search(int family, uint64_t romcode, - FAR void *arg) + void *arg) { - FAR struct ds18b20_device_s *priv = (FAR struct ds18b20_device_s *)arg; + struct ds18b20_device_s *priv = (struct ds18b20_device_s *)arg; if (priv->discovered < priv->ndevices - 1) { @@ -107,7 +107,7 @@ static void stm32_ds18b20_cb_search(int family, uint64_t romcode, * ****************************************************************************/ -static int stm32_ds18b20register(FAR struct onewire_master_s *onewire, +static int stm32_ds18b20register(struct onewire_master_s *onewire, int maxslaves, int devno) { int n; @@ -165,8 +165,8 @@ static int stm32_ds18b20register(FAR struct onewire_master_s *onewire, int stm32_ds18b20initialize(int devno) { - FAR struct onewire_dev_s *dev; - FAR struct onewire_master_s *onewire; + struct onewire_dev_s *dev; + struct onewire_master_s *onewire; dev = stm32_1wireinitialize(BOARD_DS18B20_NBUS); if (!dev) diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_gpio.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_gpio.c index b448ce5d1c..00899d85ca 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_gpio.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_gpio.c @@ -60,13 +60,13 @@ struct stm32gpint_dev_s * Private Function Prototypes ****************************************************************************/ -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_write(FAR struct gpio_dev_s *dev, bool value); -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpin_read(struct gpio_dev_s *dev, bool *value); +static int gpout_read(struct gpio_dev_s *dev, bool *value); +static int gpout_write(struct gpio_dev_s *dev, bool value); +static int gpint_read(struct gpio_dev_s *dev, bool *value); +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback); -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable); +static int gpint_enable(struct gpio_dev_s *dev, bool enable); /**************************************************************************** * Private Data @@ -135,8 +135,8 @@ static struct stm32gpint_dev_s g_gpint[BOARD_NGPIOINT]; static int stm32gpio_interrupt(int irq, void *context, void *arg) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)arg; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)arg; DEBUGASSERT(stm32gpint != NULL && stm32gpint->callback != NULL); gpioinfo("Interrupt! callback=%p\n", stm32gpint->callback); @@ -146,10 +146,10 @@ static int stm32gpio_interrupt(int irq, void *context, void *arg) return OK; } -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpin_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL && value != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOIN); @@ -159,10 +159,10 @@ static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpout_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL && value != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOOUT); @@ -172,10 +172,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpout_write(FAR struct gpio_dev_s *dev, bool value) +static int gpout_write(struct gpio_dev_s *dev, bool value) { - FAR struct stm32gpio_dev_s *stm32gpio = - (FAR struct stm32gpio_dev_s *)dev; + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; DEBUGASSERT(stm32gpio != NULL); DEBUGASSERT(stm32gpio->id < BOARD_NGPIOOUT); @@ -185,10 +185,10 @@ static int gpout_write(FAR struct gpio_dev_s *dev, bool value) return OK; } -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpint_read(struct gpio_dev_s *dev, bool *value) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; DEBUGASSERT(stm32gpint != NULL && value != NULL); DEBUGASSERT(stm32gpint->stm32gpio.id < BOARD_NGPIOINT); @@ -198,11 +198,11 @@ static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) return OK; } -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; gpioinfo("Attaching the callback\n"); @@ -216,10 +216,10 @@ static int gpint_attach(FAR struct gpio_dev_s *dev, return OK; } -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable) +static int gpint_enable(struct gpio_dev_s *dev, bool enable) { - FAR struct stm32gpint_dev_s *stm32gpint = - (FAR struct stm32gpint_dev_s *)dev; + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; if (enable) { diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_hyt271.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_hyt271.c index 9f404cdfb7..2ad0d52612 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_hyt271.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_hyt271.c @@ -71,7 +71,7 @@ struct stm32_i2c_bus_s * Private Function Prototypes ****************************************************************************/ -static int stm32_i2c_power_reset(FAR struct hyt271_bus_s *bus); +static int stm32_i2c_power_reset(struct hyt271_bus_s *bus); /**************************************************************************** * Private Data @@ -99,10 +99,10 @@ static struct stm32_i2c_bus_s g_bus = * Name: stm32_i2c_power_reset ****************************************************************************/ -static int stm32_i2c_power_reset(FAR struct hyt271_bus_s *bus) +static int stm32_i2c_power_reset(struct hyt271_bus_s *bus) { volatile int n; - FAR struct stm32_i2c_bus_s *priv = (FAR struct stm32_i2c_bus_s *)bus; + struct stm32_i2c_bus_s *priv = (struct stm32_i2c_bus_s *)bus; if (priv->busnr != BOARD_HYT271_NBUS) { @@ -155,7 +155,7 @@ int stm32_hyt271initialize(int devno) int n; int ret; int ndevices = 0; - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; iinfo("Setup gpios for bus power handling on I2C%d\n", BOARD_HYT271_NBUS); stm32_configgpio(BOARD_HYT271_POWIN); diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_ssd1306.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_ssd1306.c index e6bfbef513..0be1b46c2e 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_ssd1306.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_ssd1306.c @@ -71,7 +71,7 @@ int board_lcd_initialize(void) * Name: board_lcd_getdev ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { return board_ssd1306_getdev(); } diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_st7567.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_st7567.c index 37a71001be..7bde4a633c 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_st7567.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_lcd_st7567.c @@ -56,8 +56,8 @@ * Private Data ****************************************************************************/ -FAR struct spi_dev_s *g_spidev; -FAR struct lcd_dev_s *g_lcddev; +struct spi_dev_s *g_spidev; +struct lcd_dev_s *g_lcddev; /**************************************************************************** * Public Functions @@ -92,7 +92,7 @@ int board_lcd_initialize(void) * Name: board_lcd_getdev ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { g_lcddev = st7567_initialize(g_spidev, lcddev); if (!g_lcddev) diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_max7219.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_max7219.c index ebe0846982..4acfdd950a 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_max7219.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_max7219.c @@ -55,8 +55,8 @@ * Private Data ****************************************************************************/ -FAR struct spi_dev_s *g_spidev; -FAR struct lcd_dev_s *g_lcddev; +struct spi_dev_s *g_spidev; +struct lcd_dev_s *g_lcddev; /**************************************************************************** * Public Functions @@ -83,7 +83,7 @@ int board_lcd_initialize(void) * Name: board_lcd_getdev ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { g_lcddev = max7219_initialize(g_spidev, lcddev); if (!g_lcddev) diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_mcp2515.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_mcp2515.c index dfdbe7f2ab..9752559ae1 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_mcp2515.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_mcp2515.c @@ -56,9 +56,9 @@ struct stm32_mcp2515config_s /* Additional private definitions only known to this driver */ - FAR struct mcp2515_can_s *handle; /* The MCP2515 driver handle */ - mcp2515_handler_t handler; /* The MCP2515 interrupt handler */ - FAR void *arg; /* Argument to pass to the interrupt handler */ + struct mcp2515_can_s *handle; /* The MCP2515 driver handle */ + mcp2515_handler_t handler; /* The MCP2515 interrupt handler */ + void *arg; /* Argument to pass to the interrupt handler */ }; /**************************************************************************** @@ -72,8 +72,8 @@ struct stm32_mcp2515config_s * attach - Attach the MCP2515 interrupt handler to the GPIO interrupt */ -static int mcp2515_attach(FAR struct mcp2515_config_s *state, - mcp2515_handler_t handler, FAR void *arg); +static int mcp2515_attach(struct mcp2515_config_s *state, + mcp2515_handler_t handler, void *arg); /**************************************************************************** * Private Data @@ -112,10 +112,10 @@ static struct stm32_mcp2515config_s g_mcp2515config = /* This is the MCP2515 Interrupt handler */ -int mcp2515_interrupt(int irq, FAR void *context, FAR void *arg) +int mcp2515_interrupt(int irq, void *context, void *arg) { - FAR struct stm32_mcp2515config_s *priv = - (FAR struct stm32_mcp2515config_s *)arg; + struct stm32_mcp2515config_s *priv = + (struct stm32_mcp2515config_s *)arg; DEBUGASSERT(priv != NULL); @@ -131,11 +131,11 @@ int mcp2515_interrupt(int irq, FAR void *context, FAR void *arg) return OK; } -static int mcp2515_attach(FAR struct mcp2515_config_s *state, - mcp2515_handler_t handler, FAR void *arg) +static int mcp2515_attach(struct mcp2515_config_s *state, + mcp2515_handler_t handler, void *arg) { - FAR struct stm32_mcp2515config_s *priv = - (FAR struct stm32_mcp2515config_s *)state; + struct stm32_mcp2515config_s *priv = + (struct stm32_mcp2515config_s *)state; irqstate_t flags; caninfo("Saving handler %p\n", handler); @@ -173,11 +173,11 @@ static int mcp2515_attach(FAR struct mcp2515_config_s *state, * ****************************************************************************/ -int stm32_mcp2515initialize(FAR const char *devpath) +int stm32_mcp2515initialize(const char *devpath) { - FAR struct spi_dev_s *spi; - FAR struct can_dev_s *can; - FAR struct mcp2515_can_s *mcp2515; + struct spi_dev_s *spi; + struct can_dev_s *can; + struct mcp2515_can_s *mcp2515; int ret; /* Check if we are already initialized */ diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_mfrc522.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_mfrc522.c index 810259ff8a..cb20cf6155 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_mfrc522.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_mfrc522.c @@ -60,9 +60,9 @@ * ****************************************************************************/ -int stm32_mfrc522initialize(FAR const char *devpath) +int stm32_mfrc522initialize(const char *devpath) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; spi = stm32_spibus_initialize(MFRC522_SPI_PORTNO); diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_pcd8544.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_pcd8544.c index 6c1838d4d4..01f2e0e1a1 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_pcd8544.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_pcd8544.c @@ -55,8 +55,8 @@ * Private Data ****************************************************************************/ -FAR struct spi_dev_s *g_spidev; -FAR struct lcd_dev_s *g_lcddev; +struct spi_dev_s *g_spidev; +struct lcd_dev_s *g_lcddev; /**************************************************************************** * Public Functions @@ -93,7 +93,7 @@ int board_lcd_initialize(void) * Name: board_lcd_getdev ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { g_lcddev = pcd8544_initialize(g_spidev, lcddev); if (!g_lcddev) diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_spi.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_spi.c index b79b5cb409..1e62684f8f 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_spi.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_spi.c @@ -123,7 +123,7 @@ void stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { #if defined(CONFIG_CAN_MCP2515) @@ -187,7 +187,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; @@ -210,12 +210,12 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -246,7 +246,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_LCD_ST7567 diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_usbdev.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_usbdev.c index 61dec75999..5f2e35aade 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_usbdev.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_usbdev.c @@ -67,7 +67,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); stm32_gpiowrite(GPIO_USB_PULLUP, enable); @@ -85,7 +85,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_w25.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_w25.c index c9d2b02da0..99010ceb98 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_w25.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_w25.c @@ -90,11 +90,11 @@ int stm32_w25initialize(int minor) { int ret; #ifdef HAVE_W25 - FAR struct spi_dev_s *spi; - FAR struct mtd_dev_s *mtd; - FAR struct mtd_geometry_s geo; + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; + struct mtd_geometry_s geo; #if defined(CONFIG_MTD_PARTITION_NAMES) - FAR const char *partname = CONFIG_STM32F103MINIMUM_FLASH_PART_NAMES; + const char *partname = CONFIG_STM32F103MINIMUM_FLASH_PART_NAMES; #endif /* Get the SPI port */ @@ -147,7 +147,7 @@ int stm32_w25initialize(int minor) int erasesize; const char *partstring = CONFIG_STM32F103MINIMUM_FLASH_PART_LIST; const char *ptr; - FAR struct mtd_dev_s *mtd_part; + struct mtd_dev_s *mtd_part; char partref[16]; /* Now create a partition on the FLASH device */ diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h b/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h index ba05cbdbc6..44929f9453 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h @@ -311,7 +311,7 @@ int stm32_rgbled_setup(void); ****************************************************************************/ #ifdef CONFIG_CAN_MCP2515 -int stm32_mcp2515initialize(FAR const char *devpath); +int stm32_mcp2515initialize(const char *devpath); #endif /**************************************************************************** @@ -381,7 +381,7 @@ int stm32_ds18b20initialize(int devno); ****************************************************************************/ #ifdef CONFIG_CL_MFRC522 -int stm32_mfrc522initialize(FAR const char *devpath); +int stm32_mfrc522initialize(const char *devpath); #endif #endif /* __ASSEMBLY__ */ diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_adc.c b/boards/arm/stm32/stm32f334-disco/src/stm32_adc.c index ecc49cb08b..ff5ee70a5a 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_adc.c +++ b/boards/arm/stm32/stm32f334-disco/src/stm32_adc.c @@ -166,7 +166,7 @@ static const uint32_t g_pinlist2[3] = int stm32_adc_setup(void) { static bool initialized = false; - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c b/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c index 41103cc07a..91644dc093 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c +++ b/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c @@ -123,23 +123,23 @@ struct powerled_priv_s * Private Function Protototypes ****************************************************************************/ -static int powerled_setup(FAR struct powerled_dev_s *dev); -static int powerled_shutdown(FAR struct powerled_dev_s *dev); -static int powerled_start(FAR struct powerled_dev_s *dev); -static int powerled_stop(FAR struct powerled_dev_s *dev); -static int powerled_params_set(FAR struct powerled_dev_s *dev, - FAR struct powerled_params_s *param); -static int powerled_mode_set(FAR struct powerled_dev_s *dev, uint8_t mode); -static int powerled_limits_set(FAR struct powerled_dev_s *dev, - FAR struct powerled_limits_s *limits); -static int powerled_state_get(FAR struct powerled_dev_s *dev, - FAR struct powerled_state_s *state); -static int powerled_fault_set(FAR struct powerled_dev_s *dev, uint8_t fault); -static int powerled_fault_get(FAR struct powerled_dev_s *dev, - FAR uint8_t *fault); -static int powerled_fault_clean(FAR struct powerled_dev_s *dev, +static int powerled_setup(struct powerled_dev_s *dev); +static int powerled_shutdown(struct powerled_dev_s *dev); +static int powerled_start(struct powerled_dev_s *dev); +static int powerled_stop(struct powerled_dev_s *dev); +static int powerled_params_set(struct powerled_dev_s *dev, + struct powerled_params_s *param); +static int powerled_mode_set(struct powerled_dev_s *dev, uint8_t mode); +static int powerled_limits_set(struct powerled_dev_s *dev, + struct powerled_limits_s *limits); +static int powerled_state_get(struct powerled_dev_s *dev, + struct powerled_state_s *state); +static int powerled_fault_set(struct powerled_dev_s *dev, uint8_t fault); +static int powerled_fault_get(struct powerled_dev_s *dev, + uint8_t *fault); +static int powerled_fault_clean(struct powerled_dev_s *dev, uint8_t fault); -static int powerled_ioctl(FAR struct powerled_dev_s *dev, int cmd, +static int powerled_ioctl(struct powerled_dev_s *dev, int cmd, unsigned long arg); /**************************************************************************** @@ -193,10 +193,10 @@ struct powerled_lower_dev_s g_powerled_lower; * Private Functions ****************************************************************************/ -static int powerled_shutdown(FAR struct powerled_dev_s *dev) +static int powerled_shutdown(struct powerled_dev_s *dev) { - FAR struct powerled_s *powerled = (FAR struct powerled_s *)dev->priv; - FAR struct powerled_priv_s *priv = + struct powerled_s *powerled = (struct powerled_s *)dev->priv; + struct powerled_priv_s *priv = (struct powerled_priv_s *)powerled->priv; /* Stop powerled if running */ @@ -224,13 +224,13 @@ static int powerled_shutdown(FAR struct powerled_dev_s *dev) * ****************************************************************************/ -static int powerled_setup(FAR struct powerled_dev_s *dev) +static int powerled_setup(struct powerled_dev_s *dev) { - FAR struct powerled_lower_dev_s *lower = dev->lower; - FAR struct powerled_s *powerled = (FAR struct powerled_s *)dev->priv; - FAR struct hrtim_dev_s *hrtim = NULL; - FAR struct comp_dev_s *comp = NULL; - FAR struct dac_dev_s *dac = NULL; + struct powerled_lower_dev_s *lower = dev->lower; + struct powerled_s *powerled = (struct powerled_s *)dev->priv; + struct hrtim_dev_s *hrtim = NULL; + struct comp_dev_s *comp = NULL; + struct dac_dev_s *dac = NULL; /* Initialize powerled structure */ @@ -263,14 +263,14 @@ static int powerled_setup(FAR struct powerled_dev_s *dev) return OK; } -static int powerled_start(FAR struct powerled_dev_s *dev) +static int powerled_start(struct powerled_dev_s *dev) { - FAR struct powerled_lower_dev_s *lower = dev->lower; - FAR struct powerled_s *powerled = - (FAR struct powerled_s *)dev->priv; - FAR struct hrtim_dev_s *hrtim = lower->hrtim; - FAR struct dac_dev_s *dac = lower->dac; - FAR struct powerled_priv_s *priv = + struct powerled_lower_dev_s *lower = dev->lower; + struct powerled_s *powerled = + (struct powerled_s *)dev->priv; + struct hrtim_dev_s *hrtim = lower->hrtim; + struct dac_dev_s *dac = lower->dac; + struct powerled_priv_s *priv = (struct powerled_priv_s *)powerled->priv; uint16_t burst_cmp = 0; uint16_t burst_per = 0; @@ -400,13 +400,13 @@ static int powerled_start(FAR struct powerled_dev_s *dev) return OK; } -static int powerled_stop(FAR struct powerled_dev_s *dev) +static int powerled_stop(struct powerled_dev_s *dev) { - FAR struct powerled_lower_dev_s *lower = dev->lower; - FAR struct hrtim_dev_s *hrtim = lower->hrtim; - FAR struct powerled_s *powerled = - (FAR struct powerled_s *)dev->priv; - FAR struct powerled_priv_s *priv = + struct powerled_lower_dev_s *lower = dev->lower; + struct hrtim_dev_s *hrtim = lower->hrtim; + struct powerled_s *powerled = + (struct powerled_s *)dev->priv; + struct powerled_priv_s *priv = (struct powerled_priv_s *)powerled->priv; /* Disable output */ @@ -420,10 +420,10 @@ static int powerled_stop(FAR struct powerled_dev_s *dev) return OK; } -static int powerled_params_set(FAR struct powerled_dev_s *dev, - FAR struct powerled_params_s *param) +static int powerled_params_set(struct powerled_dev_s *dev, + struct powerled_params_s *param) { - FAR struct powerled_s *powerled = (FAR struct powerled_s *)dev->priv; + struct powerled_s *powerled = (struct powerled_s *)dev->priv; int ret = OK; /* Store params in pirvate struct. */ @@ -435,9 +435,9 @@ static int powerled_params_set(FAR struct powerled_dev_s *dev, return ret; } -static int powerled_mode_set(FAR struct powerled_dev_s *dev, uint8_t mode) +static int powerled_mode_set(struct powerled_dev_s *dev, uint8_t mode) { - FAR struct powerled_s *powerled = (FAR struct powerled_s *)dev->priv; + struct powerled_s *powerled = (struct powerled_s *)dev->priv; int ret = OK; switch (mode) @@ -466,10 +466,10 @@ errout: return ret; } -static int powerled_limits_set(FAR struct powerled_dev_s *dev, - FAR struct powerled_limits_s *limits) +static int powerled_limits_set(struct powerled_dev_s *dev, + struct powerled_limits_s *limits) { - FAR struct powerled_s *powerled = (FAR struct powerled_s *)dev->priv; + struct powerled_s *powerled = (struct powerled_s *)dev->priv; int ret = OK; /* Some assertions */ @@ -502,32 +502,32 @@ errout: return ret; } -static int powerled_state_get(FAR struct powerled_dev_s *dev, - FAR struct powerled_state_s *state) +static int powerled_state_get(struct powerled_dev_s *dev, + struct powerled_state_s *state) { - FAR struct powerled_s *powerled = (FAR struct powerled_s *)dev->priv; + struct powerled_s *powerled = (struct powerled_s *)dev->priv; memcpy(state, &powerled->state, sizeof(struct powerled_state_s)); return OK; } -static int powerled_fault_set(FAR struct powerled_dev_s *dev, uint8_t fault) +static int powerled_fault_set(struct powerled_dev_s *dev, uint8_t fault) { /* Do nothing */ return -1; } -static int powerled_fault_get(FAR struct powerled_dev_s *dev, - FAR uint8_t *fault) +static int powerled_fault_get(struct powerled_dev_s *dev, + uint8_t *fault) { /* Do nothing */ return -1; } -static int powerled_fault_clean(FAR struct powerled_dev_s *dev, +static int powerled_fault_clean(struct powerled_dev_s *dev, uint8_t fault) { /* Do nothing */ @@ -535,7 +535,7 @@ static int powerled_fault_clean(FAR struct powerled_dev_s *dev, return -1; } -static int powerled_ioctl(FAR struct powerled_dev_s *dev, int cmd, +static int powerled_ioctl(struct powerled_dev_s *dev, int cmd, unsigned long arg) { /* Do nothing */ @@ -562,13 +562,13 @@ static int powerled_ioctl(FAR struct powerled_dev_s *dev, int cmd, int stm32_powerled_setup(void) { - FAR struct powerled_lower_dev_s *lower = &g_powerled_lower; - FAR struct powerled_dev_s *powerled = &g_powerled_dev; - FAR struct hrtim_dev_s *hrtim = NULL; - FAR struct comp_dev_s *comp = NULL; - FAR struct dac_dev_s *dac = NULL; - static bool initialized = false; - int ret = OK; + struct powerled_lower_dev_s *lower = &g_powerled_lower; + struct powerled_dev_s *powerled = &g_powerled_dev; + struct hrtim_dev_s *hrtim = NULL; + struct comp_dev_s *comp = NULL; + struct dac_dev_s *dac = NULL; + static bool initialized = false; + int ret = OK; /* Initialize only once */ diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c b/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c index 3b93af56f6..8f8cc78b8e 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c +++ b/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c @@ -194,11 +194,11 @@ enum converter_mode_e struct smps_lower_dev_s { - FAR struct hrtim_dev_s *hrtim; /* PWM generation */ - FAR struct stm32_adc_dev_s *adc; /* input and output voltage sense */ - FAR struct comp_dev_s *comp; /* not used in this demo - only as reference */ - FAR struct dac_dev_s *dac; /* not used in this demo - only as reference */ - FAR struct opamp_dev_s *opamp; /* not used in this demo - only as reference */ + struct hrtim_dev_s *hrtim; /* PWM generation */ + struct stm32_adc_dev_s *adc; /* input and output voltage sense */ + struct comp_dev_s *comp; /* not used in this demo - only as reference */ + struct dac_dev_s *dac; /* not used in this demo - only as reference */ + struct opamp_dev_s *opamp; /* not used in this demo - only as reference */ }; /* Private data for smps */ @@ -219,24 +219,24 @@ struct smps_priv_s * Private Function Protototypes ****************************************************************************/ -static int smps_setup(FAR struct smps_dev_s *dev); -static int smps_shutdown(FAR struct smps_dev_s *dev); -static int smps_start(FAR struct smps_dev_s *dev); -static int smps_stop(FAR struct smps_dev_s *dev); -static int smps_params_set(FAR struct smps_dev_s *dev, - FAR struct smps_params_s *param); -static int smps_mode_set(FAR struct smps_dev_s *dev, uint8_t mode); -static int smps_limits_set(FAR struct smps_dev_s *dev, - FAR struct smps_limits_s *limits); -static int smps_state_get(FAR struct smps_dev_s *dev, - FAR struct smps_state_s *state); -static int smps_fault_set(FAR struct smps_dev_s *dev, uint8_t fault); -static int smps_fault_get(FAR struct smps_dev_s *dev, - FAR uint8_t *fault); -static int smps_fault_clean(FAR struct smps_dev_s *dev, - uint8_t fault); -static int smps_ioctl(FAR struct smps_dev_s *dev, int cmd, - unsigned long arg); +static int smps_setup(struct smps_dev_s *dev); +static int smps_shutdown(struct smps_dev_s *dev); +static int smps_start(struct smps_dev_s *dev); +static int smps_stop(struct smps_dev_s *dev); +static int smps_params_set(struct smps_dev_s *dev, + struct smps_params_s *param); +static int smps_mode_set(struct smps_dev_s *dev, uint8_t mode); +static int smps_limits_set(struct smps_dev_s *dev, + struct smps_limits_s *limits); +static int smps_state_get(struct smps_dev_s *dev, + struct smps_state_s *state); +static int smps_fault_set(struct smps_dev_s *dev, uint8_t fault); +static int smps_fault_get(struct smps_dev_s *dev, + uint8_t *fault); +static int smps_fault_clean(struct smps_dev_s *dev, + uint8_t fault); +static int smps_ioctl(struct smps_dev_s *dev, int cmd, + unsigned long arg); /**************************************************************************** * Private Data @@ -315,10 +315,10 @@ static const uint32_t g_adc1pins[ADC1_NCHANNELS] = * Private Functions ****************************************************************************/ -static int smps_shutdown(FAR struct smps_dev_s *dev) +static int smps_shutdown(struct smps_dev_s *dev) { - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; - FAR struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; + struct smps_s *smps = (struct smps_s *)dev->priv; + struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; /* Stop smps if running */ @@ -344,15 +344,15 @@ static int smps_shutdown(FAR struct smps_dev_s *dev) * ****************************************************************************/ -static int smps_setup(FAR struct smps_dev_s *dev) +static int smps_setup(struct smps_dev_s *dev) { - FAR struct smps_lower_dev_s *lower = dev->lower; - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; - FAR struct hrtim_dev_s *hrtim = NULL; - FAR struct stm32_adc_dev_s *adc = NULL; - FAR struct smps_priv_s *priv; - struct adc_channel_s channels[ADC1_NCHANNELS]; - struct adc_sample_time_s stime; + struct smps_lower_dev_s *lower = dev->lower; + struct smps_s *smps = (struct smps_s *)dev->priv; + struct hrtim_dev_s *hrtim = NULL; + struct stm32_adc_dev_s *adc = NULL; + struct smps_priv_s *priv; + struct adc_channel_s channels[ADC1_NCHANNELS]; + struct adc_sample_time_s stime; int ret = OK; int i = 0; @@ -404,13 +404,13 @@ errout: return ret; } -static int smps_start(FAR struct smps_dev_s *dev) +static int smps_start(struct smps_dev_s *dev) { - FAR struct smps_lower_dev_s *lower = dev->lower; - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; - FAR struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; - FAR struct hrtim_dev_s *hrtim = lower->hrtim; - FAR struct stm32_adc_dev_s *adc = lower->adc; + struct smps_lower_dev_s *lower = dev->lower; + struct smps_s *smps = (struct smps_s *)dev->priv; + struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; + struct hrtim_dev_s *hrtim = lower->hrtim; + struct stm32_adc_dev_s *adc = lower->adc; volatile uint64_t per = 0; uint64_t fclk = 0; int ret = OK; @@ -522,13 +522,13 @@ errout: return ret; } -static int smps_stop(FAR struct smps_dev_s *dev) +static int smps_stop(struct smps_dev_s *dev) { - FAR struct smps_lower_dev_s *lower = dev->lower; - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; - FAR struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; - FAR struct hrtim_dev_s *hrtim = lower->hrtim; - FAR struct stm32_adc_dev_s *adc = lower->adc; + struct smps_lower_dev_s *lower = dev->lower; + struct smps_s *smps = (struct smps_s *)dev->priv; + struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; + struct hrtim_dev_s *hrtim = lower->hrtim; + struct stm32_adc_dev_s *adc = lower->adc; /* Disable HRTIM outputs */ @@ -553,10 +553,10 @@ static int smps_stop(FAR struct smps_dev_s *dev) return OK; } -static int smps_params_set(FAR struct smps_dev_s *dev, - FAR struct smps_params_s *param) +static int smps_params_set(struct smps_dev_s *dev, + struct smps_params_s *param) { - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; + struct smps_s *smps = (struct smps_s *)dev->priv; int ret = OK; /* Only output voltage */ @@ -578,9 +578,9 @@ static int smps_params_set(FAR struct smps_dev_s *dev, return ret; } -static int smps_mode_set(FAR struct smps_dev_s *dev, uint8_t mode) +static int smps_mode_set(struct smps_dev_s *dev, uint8_t mode) { - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; + struct smps_s *smps = (struct smps_s *)dev->priv; int ret = OK; /* Only constant voltage mode supported */ @@ -600,10 +600,10 @@ errout: return ret; } -static int smps_limits_set(FAR struct smps_dev_s *dev, - FAR struct smps_limits_s *limits) +static int smps_limits_set(struct smps_dev_s *dev, + struct smps_limits_s *limits) { - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; + struct smps_s *smps = (struct smps_s *)dev->priv; int ret = OK; /* Some assertions */ @@ -676,10 +676,10 @@ errout: return ret; } -static int smps_state_get(FAR struct smps_dev_s *dev, - FAR struct smps_state_s *state) +static int smps_state_get(struct smps_dev_s *dev, + struct smps_state_s *state) { - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; + struct smps_s *smps = (struct smps_s *)dev->priv; /* Copy localy stored feedbacks data to status structure */ @@ -693,22 +693,22 @@ static int smps_state_get(FAR struct smps_dev_s *dev, return OK; } -static int smps_fault_set(FAR struct smps_dev_s *dev, uint8_t fault) +static int smps_fault_set(struct smps_dev_s *dev, uint8_t fault) { return OK; } -static int smps_fault_get(FAR struct smps_dev_s *dev, FAR uint8_t *fault) +static int smps_fault_get(struct smps_dev_s *dev, uint8_t *fault) { return OK; } -static int smps_fault_clean(FAR struct smps_dev_s *dev, uint8_t fault) +static int smps_fault_clean(struct smps_dev_s *dev, uint8_t fault) { return OK; } -static int smps_ioctl(FAR struct smps_dev_s *dev, int cmd, unsigned long arg) +static int smps_ioctl(struct smps_dev_s *dev, int cmd, unsigned long arg) { return OK; } @@ -717,7 +717,7 @@ static int smps_ioctl(FAR struct smps_dev_s *dev, int cmd, unsigned long arg) * Name: smps_controller ****************************************************************************/ -static float smps_controller(FAR struct smps_priv_s *priv, float err) +static float smps_controller(struct smps_priv_s *priv, float err) { float out = 0.0; @@ -738,7 +738,7 @@ static void smps_duty_set(struct smps_priv_s *priv, struct smps_lower_dev_s *lower, float out) { - FAR struct hrtim_dev_s *hrtim = lower->hrtim; + struct hrtim_dev_s *hrtim = lower->hrtim; uint8_t mode = priv->conv_mode; uint16_t cmp = 0; float duty = 0.0; @@ -842,7 +842,7 @@ static void smps_conv_mode_set(struct smps_priv_s *priv, struct smps_lower_dev_s *lower, uint8_t mode) { - FAR struct hrtim_dev_s *hrtim = lower->hrtim; + struct hrtim_dev_s *hrtim = lower->hrtim; /* Disable all outputs */ @@ -948,11 +948,11 @@ static void smps_conv_mode_set(struct smps_priv_s *priv, static void adc12_handler(void) { - FAR struct smps_dev_s *dev = &g_smps_dev; - FAR struct smps_s *smps = (FAR struct smps_s *)dev->priv; - FAR struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; - FAR struct smps_lower_dev_s *lower = dev->lower; - FAR struct stm32_adc_dev_s *adc = lower->adc; + struct smps_dev_s *dev = &g_smps_dev; + struct smps_s *smps = (struct smps_s *)dev->priv; + struct smps_priv_s *priv = (struct smps_priv_s *)smps->priv; + struct smps_lower_dev_s *lower = dev->lower; + struct stm32_adc_dev_s *adc = lower->adc; uint32_t pending; float ref = ADC_REF_VOLTAGE; float bit = ADC_VAL_MAX; @@ -1052,12 +1052,12 @@ static void adc12_handler(void) int stm32_smps_setup(void) { - FAR struct smps_lower_dev_s *lower = &g_smps_lower; - FAR struct smps_dev_s *smps = &g_smps_dev; - FAR struct hrtim_dev_s *hrtim = NULL; - FAR struct adc_dev_s *adc = NULL; - static bool initialized = false; - int ret = OK; + struct smps_lower_dev_s *lower = &g_smps_lower; + struct smps_dev_s *smps = &g_smps_dev; + struct hrtim_dev_s *hrtim = NULL; + struct adc_dev_s *adc = NULL; + static bool initialized = false; + int ret = OK; int i; /* Initialize only once */ diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h b/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h index 62b05c710a..bdb009d94c 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h +++ b/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h @@ -107,7 +107,7 @@ void weak_function stm32_spidev_initialize(void); ****************************************************************************/ #ifdef CONFIG_TIMER -int stm32_timer_driver_setup(FAR const char *devpath, int timer); +int stm32_timer_driver_setup(const char *devpath, int timer); #endif /**************************************************************************** diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c b/boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c index e4a540c564..ffbd27fc18 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c +++ b/boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c @@ -130,7 +130,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_spi.c b/boards/arm/stm32/stm32f3discovery/src/stm32_spi.c index e32e1d6cb3..d0172659b8 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_spi.c +++ b/boards/arm/stm32/stm32f3discovery/src/stm32_spi.c @@ -88,7 +88,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -97,35 +97,35 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, stm32_gpiowrite(GPIO_MEMS_CS, !selected); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -156,21 +156,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_usb.c b/boards/arm/stm32/stm32f3discovery/src/stm32_usb.c index 8cf7715347..f92fe2801a 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_usb.c +++ b/boards/arm/stm32/stm32f3discovery/src/stm32_usb.c @@ -89,7 +89,7 @@ void stm32_usbinitialize(void) * ****************************************************************************/ -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); return OK; @@ -106,7 +106,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("Resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c b/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c index 0de05c34f8..0583cfb69f 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c @@ -232,7 +232,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32F411MINIMUM_USBHOST_PRIO, CONFIG_STM32F411MINIMUM_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -326,7 +326,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32f411e-disco/src/stm32_usb.c b/boards/arm/stm32/stm32f411e-disco/src/stm32_usb.c index be38985a24..8a6f7e899a 100644 --- a/boards/arm/stm32/stm32f411e-disco/src/stm32_usb.c +++ b/boards/arm/stm32/stm32f411e-disco/src/stm32_usb.c @@ -251,7 +251,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32F411DISCO_USBHOST_PRIO, CONFIG_STM32F411DISCO_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -344,7 +344,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_adc.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_adc.c index afa55e9441..ed92d41f0c 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_adc.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_adc.c @@ -162,7 +162,7 @@ static const uint32_t g_pinlist2[3] = int stm32_adc_setup(void) { static bool initialized = false; - FAR struct adc_dev_s *adc; + struct adc_dev_s *adc; int ret; int i; diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_bringup.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_bringup.c index ce0df6490f..5208cd8e4a 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_bringup.c @@ -91,14 +91,14 @@ int stm32_bringup(void) { #if defined(CONFIG_STM32_SPI4) - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; #endif #if defined(CONFIG_MTD) - FAR struct mtd_dev_s *mtd; - FAR struct mtd_geometry_s geo; + struct mtd_dev_s *mtd; + struct mtd_geometry_s geo; #endif #if defined(CONFIG_MTD_PARTITION_NAMES) - FAR const char *partname = CONFIG_STM32F429I_DISCO_FLASH_PART_NAMES; + const char *partname = CONFIG_STM32F429I_DISCO_FLASH_PART_NAMES; #endif int ret; @@ -168,7 +168,7 @@ int stm32_bringup(void) int erasesize; const char *partstring = CONFIG_STM32F429I_DISCO_FLASH_PART_LIST; const char *ptr; - FAR struct mtd_dev_s *mtd_part; + struct mtd_dev_s *mtd_part; char partref[16]; /* Now create a partition on the FLASH device */ diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_buttons.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_buttons.c index 19e1ecaaa7..5008d3bf29 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_buttons.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_buttons.c @@ -130,7 +130,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c index 3c7444e2d0..35cc82add8 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c @@ -119,7 +119,7 @@ struct highpri_s { - FAR struct stm32_adc_dev_s *adc1; + struct stm32_adc_dev_s *adc1; #ifdef HIGHPRI_HAVE_TIM1 struct stm32_pwm_dev_s *pwm; #endif @@ -176,7 +176,7 @@ static struct highpri_s g_highpri; #if !defined(CONFIG_STM32_ADC1_DMA) || defined(HIGHPRI_HAVE_INJECTED) void adc_handler(void) { - FAR struct stm32_adc_dev_s *adc = g_highpri.adc1; + struct stm32_adc_dev_s *adc = g_highpri.adc1; float ref = ADC_REF_VOLTAGE; float bit = ADC_VAL_MAX; uint32_t pending; @@ -314,8 +314,8 @@ int highpri_main(int argc, char *argv[]) #ifdef HIGHPRI_HAVE_TIM1 struct stm32_pwm_dev_s *pwm1; #endif - FAR struct adc_dev_s *adc1; - FAR struct highpri_s *highpri; + struct adc_dev_s *adc1; + struct highpri_s *highpri; int ret; int i; @@ -349,7 +349,7 @@ int highpri_main(int argc, char *argv[]) #ifdef HIGHPRI_HAVE_TIM1 /* Initialize TIM1 */ - pwm1 = (FAR struct stm32_pwm_dev_s *) stm32_pwminitialize(1); + pwm1 = (struct stm32_pwm_dev_s *) stm32_pwminitialize(1); if (pwm1 == NULL) { printf("ERROR: Failed to get PWM1 interface\n"); diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c index 5df5596c52..bc389e80d8 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c @@ -133,7 +133,7 @@ struct ili93414ws_lcd_s #ifdef ILI93414WS_SPI /* Reference to spi device structure */ - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; /* Backup cr1 register at selection */ @@ -173,24 +173,24 @@ static void stm32_ili93414ws_spienable(void); static void stm32_ili93414ws_spidisable(void); static inline void stm32_ili93414ws_set8bitmode( - FAR struct ili93414ws_lcd_s *dev); + struct ili93414ws_lcd_s *dev); static inline void stm32_ili93414ws_set16bitmode( - FAR struct ili93414ws_lcd_s *dev); + struct ili93414ws_lcd_s *dev); /* Command and data transmission control */ static void stm32_ili93414ws_sndword(uint16_t wd); -static int stm32_ili93414ws_sendblock(FAR struct ili93414ws_lcd_s *lcd, +static int stm32_ili93414ws_sendblock(struct ili93414ws_lcd_s *lcd, const uint16_t *wd, uint16_t nwords); static uint16_t stm32_ili93414ws_recvword(void); -static int stm32_ili93414ws_recvblock(FAR struct ili93414ws_lcd_s *lcd, +static int stm32_ili93414ws_recvblock(struct ili93414ws_lcd_s *lcd, uint16_t *wd, uint16_t nwords); static inline void stm32_ili93414ws_cmddata( - FAR struct ili9341_lcd_s *lcd, bool cmd); + struct ili9341_lcd_s *lcd, bool cmd); /* Initializing / Configuration */ -static void stm32_ili93414ws_spiconfig(FAR struct ili9341_lcd_s *lcd); +static void stm32_ili93414ws_spiconfig(struct ili9341_lcd_s *lcd); /**************************************************************************** * Private Data @@ -412,7 +412,7 @@ static void stm32_ili93414ws_sndword(uint16_t wd) * ****************************************************************************/ -static int stm32_ili93414ws_sendblock(FAR struct ili93414ws_lcd_s *lcd, +static int stm32_ili93414ws_sendblock(struct ili93414ws_lcd_s *lcd, const uint16_t *wd, uint16_t nwords) { /* Set to bidirectional transmit mode and enable spi */ @@ -588,7 +588,7 @@ static uint16_t stm32_ili93414ws_recvword(void) * ****************************************************************************/ -static int stm32_ili93414ws_recvblock(FAR struct ili93414ws_lcd_s *lcd, +static int stm32_ili93414ws_recvblock(struct ili93414ws_lcd_s *lcd, uint16_t *wd, uint16_t nwords) { /* ili9341 uses a 18-bit pixel format packed in a 24-bit stream per pixel. @@ -727,7 +727,7 @@ static int stm32_ili93414ws_recvblock(FAR struct ili93414ws_lcd_s *lcd, ****************************************************************************/ static inline void stm32_ili93414ws_set8bitmode( - FAR struct ili93414ws_lcd_s *dev) + struct ili93414ws_lcd_s *dev) { stm32_ili93414ws_modifycr1(0, SPI_CR1_DFF); #ifndef CONFIG_STM32F429I_DISCO_ILI9341_SPIBITS16 @@ -751,14 +751,14 @@ static inline void stm32_ili93414ws_set8bitmode( ****************************************************************************/ static inline void stm32_ili93414ws_set16bitmode( - FAR struct ili93414ws_lcd_s *dev) + struct ili93414ws_lcd_s *dev) { stm32_ili93414ws_modifycr1(SPI_CR1_DFF, 0); } #else static inline void stm32_ili93414ws_set16bitmode( - FAR struct ili93414ws_lcd_s *dev) + struct ili93414ws_lcd_s *dev) { dev->gmode = 16; } @@ -778,9 +778,9 @@ static inline void stm32_ili93414ws_set16bitmode( * ****************************************************************************/ -static void stm32_ili93414ws_spiconfig(FAR struct ili9341_lcd_s *lcd) +static void stm32_ili93414ws_spiconfig(struct ili9341_lcd_s *lcd) { - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; irqstate_t flags; uint16_t clrbitscr1 = SPI_CR1_CPHA | SPI_CR1_CPOL | SPI_CR1_BR_MASK | @@ -844,15 +844,15 @@ static void stm32_ili93414ws_spiconfig(FAR struct ili9341_lcd_s *lcd) #ifdef ILI93414WS_SPI static inline void stm32_ili93414ws_cmddata( - FAR struct ili9341_lcd_s *lcd, bool cmd) + struct ili9341_lcd_s *lcd, bool cmd) { - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; SPI_CMDDATA(priv->spi, SPIDEV_DISPLAY(0), cmd); } #else static inline void stm32_ili93414ws_cmddata( - FAR struct ili9341_lcd_s *lcd, bool cmd) + struct ili9341_lcd_s *lcd, bool cmd) { stm32_gpiowrite(GPIO_LCD_DC, !cmd); } @@ -877,7 +877,7 @@ static inline void stm32_ili93414ws_cmddata( * ****************************************************************************/ -static int stm32_ili93414ws_backlight(FAR struct ili9341_lcd_s *lcd, +static int stm32_ili93414ws_backlight(struct ili9341_lcd_s *lcd, int level) { return OK; @@ -897,9 +897,9 @@ static int stm32_ili93414ws_backlight(FAR struct ili9341_lcd_s *lcd, ****************************************************************************/ #ifdef ILI93414WS_SPI -static void stm32_ili93414ws_select(FAR struct ili9341_lcd_s *lcd) +static void stm32_ili93414ws_select(struct ili9341_lcd_s *lcd) { - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; /* Select ili9341 (locking the SPI bus in case there are multiple * devices competing for the SPI bus @@ -913,7 +913,7 @@ static void stm32_ili93414ws_select(FAR struct ili9341_lcd_s *lcd) stm32_ili93414ws_spiconfig(lcd); } #else -static void stm32_ili93414ws_select(FAR struct ili9341_lcd_s *lcd) +static void stm32_ili93414ws_select(struct ili9341_lcd_s *lcd) { /* We own the spi bus, so just select the chip */ @@ -939,10 +939,10 @@ static void stm32_ili93414ws_select(FAR struct ili9341_lcd_s *lcd) ****************************************************************************/ #ifdef ILI93414WS_SPI -static void stm32_ili93414ws_deselect(FAR struct ili9341_lcd_s *lcd) +static void stm32_ili93414ws_deselect(struct ili9341_lcd_s *lcd) { irqstate_t flags; - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; flags = enter_critical_section(); @@ -969,7 +969,7 @@ static void stm32_ili93414ws_deselect(FAR struct ili9341_lcd_s *lcd) SPI_LOCK(priv->spi, false); } #else -static void stm32_ili93414ws_deselect(FAR struct ili9341_lcd_s *lcd) +static void stm32_ili93414ws_deselect(struct ili9341_lcd_s *lcd) { stm32_gpiowrite(GPIO_CS_LCD, true); } @@ -991,11 +991,11 @@ static void stm32_ili93414ws_deselect(FAR struct ili9341_lcd_s *lcd) ****************************************************************************/ static int stm32_ili93414ws_sendcmd( - FAR struct ili9341_lcd_s *lcd, const uint8_t cmd) + struct ili9341_lcd_s *lcd, const uint8_t cmd) { int ret; const uint16_t bw = (const uint16_t)cmd; - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; /* Set to 8-bit mode in disabled state, spi device is in disabled state */ @@ -1024,10 +1024,10 @@ static int stm32_ili93414ws_sendcmd( * ****************************************************************************/ -static int stm32_ili93414ws_sendparam(FAR struct ili9341_lcd_s *lcd, - const uint8_t param) +static int stm32_ili93414ws_sendparam(struct ili9341_lcd_s *lcd, + const uint8_t param) { - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; const uint16_t bw = (const uint16_t)param; /* Set to 8-bit mode in disabled state, spi device is in disabled state */ @@ -1054,10 +1054,10 @@ static int stm32_ili93414ws_sendparam(FAR struct ili9341_lcd_s *lcd, * ****************************************************************************/ -static int stm32_ili93414ws_sendgram(FAR struct ili9341_lcd_s *lcd, - const uint16_t *wd, uint32_t nwords) +static int stm32_ili93414ws_sendgram(struct ili9341_lcd_s *lcd, + const uint16_t *wd, uint32_t nwords) { - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; lcdinfo("wd=%p, nwords=%" PRId32 "\n", wd, nwords); @@ -1083,10 +1083,10 @@ static int stm32_ili93414ws_sendgram(FAR struct ili9341_lcd_s *lcd, * ****************************************************************************/ -static int stm32_ili93414ws_recvparam(FAR struct ili9341_lcd_s *lcd, - uint8_t *param) +static int stm32_ili93414ws_recvparam(struct ili9341_lcd_s *lcd, + uint8_t *param) { - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; #ifdef CONFIG_STM32F429I_DISCO_ILI9341_SPIBITS16 /* Set to 8-bit mode in disabled state, spi device is in disabled state. */ @@ -1114,10 +1114,10 @@ static int stm32_ili93414ws_recvparam(FAR struct ili9341_lcd_s *lcd, * ****************************************************************************/ -static int stm32_ili93414ws_recvgram(FAR struct ili9341_lcd_s *lcd, - uint16_t *wd, uint32_t nwords) +static int stm32_ili93414ws_recvgram(struct ili9341_lcd_s *lcd, + uint16_t *wd, uint32_t nwords) { - FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; + struct ili93414ws_lcd_s *priv = (struct ili93414ws_lcd_s *)lcd; lcdinfo("wd=%p, nwords=%" PRId32 "\n", wd, nwords); @@ -1144,10 +1144,10 @@ static int stm32_ili93414ws_recvgram(FAR struct ili9341_lcd_s *lcd, ****************************************************************************/ #ifdef ILI93414WS_SPI -FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) +struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) { - FAR struct spi_dev_s *spi; - FAR struct ili93414ws_lcd_s *priv = &g_lcddev; + struct spi_dev_s *spi; + struct ili93414ws_lcd_s *priv = &g_lcddev; lcdinfo("initialize ili9341 4-wire serial subdriver\n"); @@ -1176,10 +1176,10 @@ FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) #else -FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) +struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) { uint32_t regval; - FAR struct ili93414ws_lcd_s *priv = &g_lcddev; + struct ili93414ws_lcd_s *priv = &g_lcddev; lcdinfo("initialize ili9341 4-wire serial subdriver\n"); diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_lcd.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_lcd.c index d67a39a775..d84882b089 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_lcd.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_lcd.c @@ -265,11 +265,11 @@ ****************************************************************************/ #ifdef CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE -FAR struct lcd_dev_s *g_lcd = NULL; +struct lcd_dev_s *g_lcd = NULL; #endif #ifdef CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE -FAR struct ili9341_lcd_s *g_ltdc = NULL; +struct ili9341_lcd_s *g_ltdc = NULL; #endif /**************************************************************************** @@ -287,7 +287,7 @@ FAR struct ili9341_lcd_s *g_ltdc = NULL; static int stm32_ili9341_initialize(void) { - FAR struct ili9341_lcd_s *lcd = g_ltdc; + struct ili9341_lcd_s *lcd = g_ltdc; lcd = stm32_ili93414ws_initialize(); @@ -433,7 +433,7 @@ void board_lcd_uninitialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { if (lcddev == ILI9341_LCD_DEVICE) { @@ -467,7 +467,7 @@ int board_lcd_initialize(void) { /* Initialize the sub driver structure */ - FAR struct ili9341_lcd_s *dev = stm32_ili93414ws_initialize(); + struct ili9341_lcd_s *dev = stm32_ili93414ws_initialize(); /* Initialize public lcd driver structure */ @@ -556,7 +556,7 @@ int up_fbinitialize(int display) * ****************************************************************************/ -FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane) +struct fb_vtable_s *up_fbgetvplane(int display, int vplane) { return stm32_ltdcgetvplane(vplane); } diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_spi.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_spi.c index 5d927acaf3..d85ba12842 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_spi.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_spi.c @@ -45,7 +45,7 @@ ****************************************************************************/ #ifdef CONFIG_STM32_SPI5 -FAR struct spi_dev_s *g_spidev5 = NULL; +struct spi_dev_s *g_spidev5 = NULL; #endif /**************************************************************************** @@ -101,7 +101,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { @@ -109,14 +109,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { @@ -124,28 +124,28 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI4 -void stm32_spi4select(FAR struct spi_dev_s *dev, +void stm32_spi4select(struct spi_dev_s *dev, uint32_t devid, bool selected) { #if defined(CONFIG_MTD_SST25XX) @@ -156,14 +156,14 @@ void stm32_spi4select(FAR struct spi_dev_s *dev, #endif } -uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi4status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI5 -void stm32_spi5select(FAR struct spi_dev_s *dev, +void stm32_spi5select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -182,7 +182,7 @@ void stm32_spi5select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi5status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -213,35 +213,35 @@ uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI4 -int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi4cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI5 -int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi5cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { #if defined(CONFIG_STM32F429I_DISCO_ILI9341) if (devid == SPIDEV_DISPLAY(0)) @@ -284,7 +284,7 @@ int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) ****************************************************************************/ #ifdef CONFIG_STM32_SPI5 -FAR struct spi_dev_s *stm32_spi5initialize(void) +struct spi_dev_s *stm32_spi5initialize(void) { if (!g_spidev5) { diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_stmpe811.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_stmpe811.c index bf14961273..b7c0c53801 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_stmpe811.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_stmpe811.c @@ -125,7 +125,7 @@ struct stm32_stmpe811config_s STMPE811_HANDLE handle; /* The STMPE811 driver handle */ xcpt_t handler; /* The STMPE811 interrupt handler */ - FAR void *arg; /* Interrupt handler argument */ + void *arg; /* Interrupt handler argument */ }; /**************************************************************************** @@ -142,11 +142,11 @@ struct stm32_stmpe811config_s * clear - Acknowledge/clear any pending GPIO interrupt */ -static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, - FAR void *arg); -static void stmpe811_enable(FAR struct stmpe811_config_s *state, +static int stmpe811_attach(struct stmpe811_config_s *state, xcpt_t isr, + void *arg); +static void stmpe811_enable(struct stmpe811_config_s *state, bool enable); -static void stmpe811_clear(FAR struct stmpe811_config_s *state); +static void stmpe811_clear(struct stmpe811_config_s *state); /**************************************************************************** * Private Data @@ -200,11 +200,11 @@ static struct stm32_stmpe811config_s g_stmpe811config = * clear - Acknowledge/clear any pending GPIO interrupt */ -static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, - FAR void *arg) +static int stmpe811_attach(struct stmpe811_config_s *state, xcpt_t isr, + void *arg) { - FAR struct stm32_stmpe811config_s *priv = - (FAR struct stm32_stmpe811config_s *)state; + struct stm32_stmpe811config_s *priv = + (struct stm32_stmpe811config_s *)state; iinfo("Saving handler %p\n", isr); DEBUGASSERT(priv); @@ -216,10 +216,10 @@ static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr, return OK; } -static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable) +static void stmpe811_enable(struct stmpe811_config_s *state, bool enable) { - FAR struct stm32_stmpe811config_s *priv = - (FAR struct stm32_stmpe811config_s *)state; + struct stm32_stmpe811config_s *priv = + (struct stm32_stmpe811config_s *)state; irqstate_t flags; /* Attach and enable, or detach and disable. Enabling and disabling GPIO @@ -246,7 +246,7 @@ static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable) leave_critical_section(flags); } -static void stmpe811_clear(FAR struct stmpe811_config_s *state) +static void stmpe811_clear(struct stmpe811_config_s *state) { /* Does nothing */ } @@ -275,7 +275,7 @@ static void stmpe811_clear(FAR struct stmpe811_config_s *state) int stm32_tsc_setup(int minor) { #ifndef CONFIG_STMPE811_TSC_DISABLE - FAR struct i2c_master_s *dev; + struct i2c_master_s *dev; int ret; iinfo("minor %d\n", minor); @@ -305,7 +305,7 @@ int stm32_tsc_setup(int minor) g_stmpe811config.handle = stmpe811_instantiate(dev, - (FAR struct stmpe811_config_s *)&g_stmpe811config); + (struct stmpe811_config_s *)&g_stmpe811config); if (!g_stmpe811config.handle) { ierr("ERROR: Failed to instantiate the STMPE811 driver\n"); diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_usb.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_usb.c index 74a998b2a2..5f82cbea41 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_usb.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_usb.c @@ -206,7 +206,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32F429IDISCO_USBHOST_PRIO, CONFIG_STM32F429IDISCO_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -299,7 +299,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h b/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h index ec23729c22..fe4aab9c3d 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h @@ -317,7 +317,7 @@ void stm32_pmbuttons(void); ****************************************************************************/ #ifdef CONFIG_STM32F429I_DISCO_ILI9341 -FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void); +struct ili9341_lcd_s *stm32_ili93414ws_initialize(void); #endif /**************************************************************************** @@ -343,7 +343,7 @@ FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void); ****************************************************************************/ #ifdef CONFIG_STM32_SPI5 -FAR struct spi_dev_s *stm32_spi5initialize(void); +struct spi_dev_s *stm32_spi5initialize(void); #endif /**************************************************************************** @@ -361,7 +361,7 @@ FAR struct spi_dev_s *stm32_spi5initialize(void); ****************************************************************************/ #if defined(CONFIG_SPI) & defined(CONFIG_SENSORS_L3GD20) -int stm32_l3gd20initialize(FAR const char *devpath); +int stm32_l3gd20initialize(const char *devpath); #endif /**************************************************************************** diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_boot.c b/boards/arm/stm32/stm32f4discovery/src/stm32_boot.c index 0ebd3a25ac..31228991c6 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_boot.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_boot.c @@ -54,7 +54,7 @@ void stm32_boardinitialize(void) { #ifdef CONFIG_SCHED_CRITMONITOR - up_perf_init((FAR void *)STM32_SYSCLK_FREQUENCY); + up_perf_init((void *)STM32_SYSCLK_FREQUENCY); #endif #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c index 5a2fcb6a5f..17f0e51383 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c @@ -135,7 +135,7 @@ #if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) static void stm32_i2c_register(int bus) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(bus); @@ -194,7 +194,7 @@ static void stm32_i2ctool(void) int stm32_bringup(void) { #ifdef HAVE_RTC_DRIVER - FAR struct rtc_lowerhalf_s *lower; + struct rtc_lowerhalf_s *lower; #endif int ret = OK; diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_buttons.c b/boards/arm/stm32/stm32f4discovery/src/stm32_buttons.c index 44e7d980ae..11219ea68c 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_buttons.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_buttons.c @@ -131,7 +131,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c b/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c index 5f0fa4f799..6c835b5329 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c @@ -60,7 +60,7 @@ struct stm32_mwinfo_s /* Extensions for the stm32f4discovery board */ cs43l22_handler_t handler; - FAR void *arg; + void *arg; }; /**************************************************************************** @@ -77,11 +77,11 @@ struct stm32_mwinfo_s * enable - Enable or disable the PIO interrupt */ -static int cs43l22_attach(FAR const struct cs43l22_lower_s *lower, - cs43l22_handler_t isr, FAR void *arg); -static bool cs43l22_enable(FAR const struct cs43l22_lower_s *lower, +static int cs43l22_attach(const struct cs43l22_lower_s *lower, + cs43l22_handler_t isr, void *arg); +static bool cs43l22_enable(const struct cs43l22_lower_s *lower, bool enable); -static void cs43l22_hw_reset(FAR const struct cs43l22_lower_s *lower); +static void cs43l22_hw_reset(const struct cs43l22_lower_s *lower); /**************************************************************************** * Private Data @@ -132,8 +132,8 @@ static struct stm32_mwinfo_s g_cs43l22info = * ****************************************************************************/ -static int cs43l22_attach(FAR const struct cs43l22_lower_s *lower, - cs43l22_handler_t isr, FAR void *arg) +static int cs43l22_attach(const struct cs43l22_lower_s *lower, + cs43l22_handler_t isr, void *arg) { if (isr) { @@ -157,7 +157,7 @@ static int cs43l22_attach(FAR const struct cs43l22_lower_s *lower, return OK; } -static bool cs43l22_enable(FAR const struct cs43l22_lower_s *lower, +static bool cs43l22_enable(const struct cs43l22_lower_s *lower, bool enable) { static bool enabled; @@ -195,7 +195,7 @@ static bool cs43l22_enable(FAR const struct cs43l22_lower_s *lower, } #if 0 -static int cs43l22_interrupt(int irq, FAR void *context) +static int cs43l22_interrupt(int irq, void *context) { /* Just forward the interrupt to the CS43L22 driver */ @@ -215,7 +215,7 @@ static int cs43l22_interrupt(int irq, FAR void *context) } #endif -static void cs43l22_hw_reset(FAR const struct cs43l22_lower_s *lower) +static void cs43l22_hw_reset(const struct cs43l22_lower_s *lower) { int i; @@ -253,10 +253,10 @@ static void cs43l22_hw_reset(FAR const struct cs43l22_lower_s *lower) int stm32_cs43l22_initialize(int minor) { - FAR struct audio_lowerhalf_s *cs43l22; - FAR struct audio_lowerhalf_s *pcm; - FAR struct i2c_master_s *i2c; - FAR struct i2s_dev_s *i2s; + struct audio_lowerhalf_s *cs43l22; + struct audio_lowerhalf_s *pcm; + struct i2c_master_s *i2c; + struct i2s_dev_s *i2s; static bool initialized = false; char devname[12]; int ret; diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c index c8fa448e97..713823208a 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c @@ -58,7 +58,7 @@ int stm32_ds1307_init(void) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; static bool initialized = false; int ret; diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_enc28j60.c b/boards/arm/stm32/stm32f4discovery/src/stm32_enc28j60.c index 9252100420..68cd9f71a6 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_enc28j60.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_enc28j60.c @@ -97,17 +97,17 @@ struct stm32_lower_s { const struct enc_lower_s lower; /* Low-level MCU interface */ xcpt_t handler; /* ENC28J60 interrupt handler */ - FAR void *arg; /* Argument that accompanies the interrupt */ + void *arg; /* Argument that accompanies the interrupt */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, - FAR void *arg); -static void up_enable(FAR const struct enc_lower_s *lower); -static void up_disable(FAR const struct enc_lower_s *lower); +static int up_attach(const struct enc_lower_s *lower, xcpt_t handler, + void *arg); +static void up_enable(const struct enc_lower_s *lower); +static void up_disable(const struct enc_lower_s *lower); /**************************************************************************** * Private Data @@ -138,10 +138,10 @@ static struct stm32_lower_s g_enclower = * Name: struct enc_lower_s methods ****************************************************************************/ -static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, - FAR void *arg) +static int up_attach(const struct enc_lower_s *lower, xcpt_t handler, + void *arg) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; /* Just save the handler for use when the interrupt is enabled */ @@ -150,9 +150,9 @@ static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler, return OK; } -static void up_enable(FAR const struct enc_lower_s *lower) +static void up_enable(const struct enc_lower_s *lower) { - FAR struct stm32_lower_s *priv = (FAR struct stm32_lower_s *)lower; + struct stm32_lower_s *priv = (struct stm32_lower_s *)lower; DEBUGASSERT(priv->handler); stm32_gpiosetevent(GPIO_ENC28J60_INTR, false, true, true, @@ -164,7 +164,7 @@ static void up_enable(FAR const struct enc_lower_s *lower) * lost. */ -static void up_disable(FAR const struct enc_lower_s *lower) +static void up_disable(const struct enc_lower_s *lower) { stm32_gpiosetevent(GPIO_ENC28J60_INTR, false, true, true, NULL, NULL); @@ -180,7 +180,7 @@ static void up_disable(FAR const struct enc_lower_s *lower) void arm_netinitialize(void) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Assumptions: diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c index d4e00dd6fb..ed2b0aefcd 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c @@ -201,7 +201,7 @@ void weak_function stm32_netinitialize(void) ****************************************************************************/ #ifdef HAVE_NETMONITOR -int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg, +int arch_phy_irq(const char *intf, xcpt_t handler, void *arg, phy_enable_t *enable) { phy_enable_t enabler; diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c b/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c index 27b0a330d3..1b4eecca54 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c @@ -55,7 +55,7 @@ * Private Function Prototypes ****************************************************************************/ -static int gs2200m_irq_attach(xcpt_t, FAR void *); +static int gs2200m_irq_attach(xcpt_t, void *); static void gs2200m_irq_enable(void); static void gs2200m_irq_disable(void); static uint32_t gs2200m_dready(int *); @@ -74,12 +74,12 @@ static const struct gs2200m_lower_s g_wifi_lower = .reset = gs2200m_reset }; -static FAR void *g_devhandle = NULL; +static void *g_devhandle = NULL; static volatile int32_t _enable_count = 0; static volatile uint32_t _n_called; -static xcpt_t g_irq_handler = NULL; -static FAR void *g_irq_arg = NULL; +static xcpt_t g_irq_handler = NULL; +static void *g_irq_arg = NULL; /**************************************************************************** * Private Functions @@ -89,7 +89,7 @@ static FAR void *g_irq_arg = NULL; * Name: gs2200m_irq_attach ****************************************************************************/ -static int gs2200m_irq_attach(xcpt_t handler, FAR void *arg) +static int gs2200m_irq_attach(xcpt_t handler, void *arg) { /* NOTE: Just save the handler and arg here */ @@ -213,9 +213,9 @@ static void _config_pin(void) * Name: stm32_gs2200m_initialize ****************************************************************************/ -int stm32_gs2200m_initialize(FAR const char *devpath, int bus) +int stm32_gs2200m_initialize(const char *devpath, int bus) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; wlinfo("Initializing GS2200M..\n"); diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_max7219.c b/boards/arm/stm32/stm32f4discovery/src/stm32_max7219.c index cfb0bc64d0..4c647a4110 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_max7219.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_max7219.c @@ -55,8 +55,8 @@ * Private Data ****************************************************************************/ -FAR struct spi_dev_s *g_spidev; -FAR struct lcd_dev_s *g_lcddev; +struct spi_dev_s *g_spidev; +struct lcd_dev_s *g_lcddev; /**************************************************************************** * Public Functions @@ -83,7 +83,7 @@ int board_lcd_initialize(void) * Name: board_lcd_getdev ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { g_lcddev = max7219_initialize(g_spidev, lcddev); if (!g_lcddev) diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_max7219_leds.c b/boards/arm/stm32/stm32f4discovery/src/stm32_max7219_leds.c index 1424012cca..ac51331e00 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_max7219_leds.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_max7219_leds.c @@ -61,9 +61,9 @@ * ****************************************************************************/ -int stm32_max7219init(FAR const char *devpath) +int stm32_max7219init(const char *devpath) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; spi = stm32_spibus_initialize(MAX7219_SPI_PORTNO); diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_pca9635.c b/boards/arm/stm32/stm32f4discovery/src/stm32_pca9635.c index f6f16416a6..d6fd285b90 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_pca9635.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_pca9635.c @@ -62,7 +62,7 @@ int stm32_pca9635_initialize(void) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; /* Get the I2C driver that interfaces with the pca9635 diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_pmbuttons.c b/boards/arm/stm32/stm32f4discovery/src/stm32_pmbuttons.c index 50cf23afdd..a2704903a6 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_pmbuttons.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_pmbuttons.c @@ -65,7 +65,7 @@ ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -static int button_handler(int irq, FAR void *context, FAR void *arg); +static int button_handler(int irq, void *context, void *arg); #endif /* CONFIG_ARCH_IRQBUTTONS */ /**************************************************************************** @@ -81,7 +81,7 @@ static int button_handler(int irq, FAR void *context, FAR void *arg); ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -static int button_handler(int irq, FAR void *context, FAR void *arg) +static int button_handler(int irq, void *context, void *arg) { /* At this point the MCU should have already awakened. The state * change will be handled in the IDLE loop when the system is re-awakened diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_sdio.c b/boards/arm/stm32/stm32f4discovery/src/stm32_sdio.c index 09dc57006e..81f55ecdb5 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_sdio.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_sdio.c @@ -54,7 +54,7 @@ * Private Data ****************************************************************************/ -static FAR struct sdio_dev_s *g_sdio_dev; +static struct sdio_dev_s *g_sdio_dev; #ifdef HAVE_NCD static bool g_sd_inserted = 0xff; /* Impossible value */ #endif @@ -72,7 +72,7 @@ static bool g_sd_inserted = 0xff; /* Impossible value */ ****************************************************************************/ #ifdef HAVE_NCD -static int stm32_ncd_interrupt(int irq, FAR void *context, FAR void *arg) +static int stm32_ncd_interrupt(int irq, void *context, void *arg) { bool present; diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_spi.c b/boards/arm/stm32/stm32f4discovery/src/stm32_spi.c index 4ce87df04b..6e58e48435 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_spi.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_spi.c @@ -119,7 +119,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : @@ -168,7 +168,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; @@ -184,7 +184,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : @@ -212,7 +212,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; #if defined(CONFIG_MMCSD_SPI) @@ -229,7 +229,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : @@ -243,7 +243,7 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, #endif } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -274,7 +274,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { #if defined(CONFIG_LCD_ST7567) || defined(CONFIG_LCD_ST7789) if (devid == SPIDEV_DISPLAY(0)) @@ -316,14 +316,14 @@ int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1289.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1289.c index 5a7ca310bf..c436e24183 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1289.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1289.c @@ -84,14 +84,14 @@ /* Low Level LCD access */ -static void stm32_select(FAR struct ssd1289_lcd_s *dev); -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev); -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index); +static void stm32_select(struct ssd1289_lcd_s *dev); +static void stm32_deselect(struct ssd1289_lcd_s *dev); +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index); #ifndef CONFIG_SSD1289_WRONLY -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev); +static uint16_t stm32_read(struct ssd1289_lcd_s *dev); #endif -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data); -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power); +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data); +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power); /**************************************************************************** * Private Data @@ -166,7 +166,7 @@ static struct ssd1289_lcd_s g_ssd1289 = /* The saved instance of the LCD driver */ -static FAR struct lcd_dev_s *g_ssd1289drvr; +static struct lcd_dev_s *g_ssd1289drvr; /**************************************************************************** * Private Functions @@ -180,7 +180,7 @@ static FAR struct lcd_dev_s *g_ssd1289drvr; * ****************************************************************************/ -static void stm32_select(FAR struct ssd1289_lcd_s *dev) +static void stm32_select(struct ssd1289_lcd_s *dev) { /* Does not apply to this hardware */ } @@ -193,7 +193,7 @@ static void stm32_select(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) +static void stm32_deselect(struct ssd1289_lcd_s *dev) { /* Does not apply to this hardware */ } @@ -206,7 +206,7 @@ static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index) { putreg16((uint16_t)index, LCD_INDEX); } @@ -220,7 +220,7 @@ static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) ****************************************************************************/ #ifndef CONFIG_SSD1289_WRONLY -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) +static uint16_t stm32_read(struct ssd1289_lcd_s *dev) { return getreg16(LCD_DATA); } @@ -234,7 +234,7 @@ static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data) { putreg16((uint16_t)data, LCD_DATA); } @@ -247,7 +247,7 @@ static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) * ****************************************************************************/ -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power) +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power) { #warning "Missing logic" } @@ -364,7 +364,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return g_ssd1289drvr; diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1351.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1351.c index dc8b43fc53..8b7d4c77af 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1351.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ssd1351.c @@ -67,10 +67,10 @@ * ****************************************************************************/ -FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) +struct lcd_dev_s *board_graphics_setup(unsigned int devno) { - FAR struct spi_dev_s *spi; - FAR struct lcd_dev_s *dev; + struct spi_dev_s *spi; + struct lcd_dev_s *dev; /* Configure the OLED GPIOs. This initial configuration is RESET low, * putting the OLED into reset state. diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_st7032.c b/boards/arm/stm32/stm32f4discovery/src/stm32_st7032.c index be665e1af8..abe9005a5f 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_st7032.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_st7032.c @@ -60,9 +60,9 @@ * ****************************************************************************/ -int stm32_st7032init(FAR const char *devpath) +int stm32_st7032init(const char *devpath) { - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; int ret; i2c = stm32_i2cbus_initialize(ST7032_I2C_PORTNO); diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_st7567.c b/boards/arm/stm32/stm32f4discovery/src/stm32_st7567.c index 976c021325..3fddc55d62 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_st7567.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_st7567.c @@ -56,8 +56,8 @@ * Private Data ****************************************************************************/ -FAR struct spi_dev_s *g_spidev; -FAR struct lcd_dev_s *g_lcddev; +struct spi_dev_s *g_spidev; +struct lcd_dev_s *g_lcddev; /**************************************************************************** * Public Functions @@ -92,7 +92,7 @@ int board_lcd_initialize(void) * Name: board_lcd_getdev ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { g_lcddev = st7567_initialize(g_spidev, lcddev); if (!g_lcddev) diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_st7789.c b/boards/arm/stm32/stm32f4discovery/src/stm32_st7789.c index 68b03a5a37..e45890fee3 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_st7789.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_st7789.c @@ -96,7 +96,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { g_lcd = st7789_lcdinitialize(g_spidev); if (!g_lcd) diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_sx127x.c b/boards/arm/stm32/stm32f4discovery/src/stm32_sx127x.c index 8509d17ebd..89db7df8c0 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_sx127x.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_sx127x.c @@ -57,7 +57,7 @@ static void sx127x_chip_reset(void); static int sx127x_opmode_change(int opmode); static int sx127x_freq_select(uint32_t freq); static int sx127x_pa_select(bool enable); -static int sx127x_irq0_attach(xcpt_t isr, FAR void *arg); +static int sx127x_irq0_attach(xcpt_t isr, void *arg); /**************************************************************************** * Private Data @@ -83,7 +83,7 @@ static bool g_high_power_output = false; * Name: sx127x_irq0_attach ****************************************************************************/ -static int sx127x_irq0_attach(xcpt_t isr, FAR void *arg) +static int sx127x_irq0_attach(xcpt_t isr, void *arg) { wlinfo("Attach DIO0 IRQ\n"); @@ -168,7 +168,7 @@ static int sx127x_pa_select(bool enable) int stm32_lpwaninitialize(void) { - FAR struct spi_dev_s *spidev; + struct spi_dev_s *spidev; int ret = OK; wlinfo("Register the sx127x module\n"); diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_timer.c b/boards/arm/stm32/stm32f4discovery/src/stm32_timer.c index 236fe64b2b..b9abcab901 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_timer.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_timer.c @@ -57,7 +57,7 @@ * ****************************************************************************/ -int stm32_timer_driver_setup(FAR const char *devpath, int timer) +int stm32_timer_driver_setup(const char *devpath, int timer) { return stm32_timer_initialize(devpath, timer); } diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864ambag01.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864ambag01.c index e45f403c26..e0ace3b80b 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864ambag01.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864ambag01.c @@ -93,10 +93,10 @@ * ****************************************************************************/ -FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) +struct lcd_dev_s *board_graphics_setup(unsigned int devno) { - FAR struct spi_dev_s *spi; - FAR struct lcd_dev_s *dev; + struct spi_dev_s *spi; + struct lcd_dev_s *dev; /* Configure the OLED GPIOs. This initial configuration is RESET low, * putting the OLED into reset state. diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864hsweg01.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864hsweg01.c index 1a21cddff3..6c872a7fa7 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864hsweg01.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ug2864hsweg01.c @@ -93,10 +93,10 @@ * ****************************************************************************/ -FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) +struct lcd_dev_s *board_graphics_setup(unsigned int devno) { - FAR struct spi_dev_s *spi; - FAR struct lcd_dev_s *dev; + struct spi_dev_s *spi; + struct lcd_dev_s *dev; /* Configure the OLED GPIOs. This initial configuration is RESET low, * putting the OLED into reset state. diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_usb.c b/boards/arm/stm32/stm32f4discovery/src/stm32_usb.c index bbc036fc85..7b8c718060 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_usb.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_usb.c @@ -236,7 +236,7 @@ int stm32_usbhost_initialize(void) ret = kthread_create("usbhost", CONFIG_STM32F4DISCO_USBHOST_PRIO, CONFIG_STM32F4DISCO_USBHOST_STACKSIZE, - (main_t)usbhost_waiter, (FAR char * const *)NULL); + (main_t)usbhost_waiter, (char * const *)NULL); return ret < 0 ? -ENOEXEC : OK; } @@ -329,7 +329,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg) ****************************************************************************/ #ifdef CONFIG_USBDEV -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h index 09df7909ef..8b8e8d308e 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h +++ b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h @@ -444,7 +444,7 @@ void weak_function stm32_i2sdev_initialize(void); ****************************************************************************/ #ifdef CONFIG_SENSORS_BH1750FVI -int stm32_bh1750initialize(FAR const char *devpath); +int stm32_bh1750initialize(const char *devpath); #endif /**************************************************************************** @@ -479,7 +479,7 @@ int stm32_mmcsd_initialize(int port, int minor); ****************************************************************************/ #ifdef CONFIG_INPUT_NUNCHUCK -int nunchuck_initialize(FAR char *devname); +int nunchuck_initialize(char *devname); #endif /**************************************************************************** @@ -491,7 +491,7 @@ int nunchuck_initialize(FAR char *devname); ****************************************************************************/ #ifdef CONFIG_LEDS_MAX7219 -int stm32_max7219init(FAR const char *devpath); +int stm32_max7219init(const char *devpath); #endif /**************************************************************************** @@ -514,7 +514,7 @@ int stm32_ds1307_init(void); * ****************************************************************************/ -int stm32_st7032init(FAR const char *devpath); +int stm32_st7032init(const char *devpath); /**************************************************************************** * Name: stm32_usbinitialize @@ -683,7 +683,7 @@ int stm32_zerocross_initialize(void); ****************************************************************************/ #ifdef CONFIG_SENSORS_MAX31855 -int stm32_max31855initialize(FAR const char *devpath, int bus, +int stm32_max31855initialize(const char *devpath, int bus, uint16_t devid); #endif @@ -697,7 +697,7 @@ int stm32_max31855initialize(FAR const char *devpath, int bus, ****************************************************************************/ #ifdef CONFIG_SENSORS_MLX90614 -int stm32_mlx90614init(FAR const char *devpath); +int stm32_mlx90614init(const char *devpath); #endif /**************************************************************************** @@ -709,7 +709,7 @@ int stm32_mlx90614init(FAR const char *devpath); ****************************************************************************/ #ifdef CONFIG_SENSORS_MAX6675 -int stm32_max6675initialize(FAR const char *devpath); +int stm32_max6675initialize(const char *devpath); #endif /**************************************************************************** @@ -792,7 +792,7 @@ int stm32_rgbled_setup(void); ****************************************************************************/ #ifdef CONFIG_TIMER -int stm32_timer_driver_setup(FAR const char *devpath, int timer); +int stm32_timer_driver_setup(const char *devpath, int timer); #endif /**************************************************************************** @@ -854,7 +854,7 @@ int hciuart_dev_initialize(void); ****************************************************************************/ #ifdef CONFIG_WL_GS2200M -int stm32_gs2200m_initialize(FAR const char *devpath, int bus); +int stm32_gs2200m_initialize(const char *devpath, int bus); #endif #endif /* __ASSEMBLY__ */ diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_buttons.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_buttons.c index 0e18f41140..125f681395 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_buttons.c +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_buttons.c @@ -131,7 +131,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c index 5c30c0252d..38ed31f696 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c @@ -290,7 +290,7 @@ struct slcd_instream_s { struct lib_instream_s stream; - FAR const char *buffer; + const char *buffer; ssize_t nbytes; }; @@ -312,8 +312,8 @@ struct stm32_slcdstate_s /* Debug */ #ifdef CONFIG_DEBUG_LCD_INFO -static void slcd_dumpstate(FAR const char *msg); -static void slcd_dumpslcd(FAR const char *msg); +static void slcd_dumpstate(const char *msg); +static void slcd_dumpslcd(const char *msg); #else # define slcd_dumpstate(msg) # define slcd_dumpslcd(msg) @@ -322,7 +322,7 @@ static void slcd_dumpslcd(FAR const char *msg); /* Internal utilities */ static void slcd_clear(void); -static int slcd_getstream(FAR struct lib_instream_s *instream); +static int slcd_getstream(struct lib_instream_s *instream); static uint8_t slcd_getcontrast(void); static int slcd_setcontrast(uint8_t contrast); static void slcd_writebar(void); @@ -334,10 +334,10 @@ static void slcd_action(enum slcdcode_e code, uint8_t count); /* Character driver methods */ -static ssize_t slcd_read(FAR struct file *, FAR char *, size_t); -static ssize_t slcd_write(FAR struct file *, FAR const char *, size_t); -static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg); -static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds, +static ssize_t slcd_read(struct file *, char *, size_t); +static ssize_t slcd_write(struct file *, const char *, size_t); +static int slcd_ioctl(struct file *filep, int cmd, unsigned long arg); +static int slcd_poll(struct file *filep, struct pollfd *fds, bool setup); /**************************************************************************** @@ -458,7 +458,7 @@ static uint32_t g_slcdgpio[BOARD_SLCD_NGPIOS] = ****************************************************************************/ #ifdef CONFIG_DEBUG_LCD_INFO -static void slcd_dumpstate(FAR const char *msg) +static void slcd_dumpstate(const char *msg) { lcdinfo("%s:\n", msg); lcdinfo(" curpos: %d\n", @@ -481,7 +481,7 @@ static void slcd_dumpstate(FAR const char *msg) ****************************************************************************/ #ifdef CONFIG_DEBUG_LCD_INFO -static void slcd_dumpslcd(FAR const char *msg) +static void slcd_dumpslcd(const char *msg) { lcdinfo("%s:\n", msg); lcdinfo(" CR: %08x FCR: %08x SR: %08x CLR: %08x\n", @@ -538,9 +538,9 @@ static void slcd_clear(void) * ****************************************************************************/ -static int slcd_getstream(FAR struct lib_instream_s *instream) +static int slcd_getstream(struct lib_instream_s *instream) { - FAR struct slcd_instream_s *slcdstream = (FAR struct slcd_instream_s *) + struct slcd_instream_s *slcdstream = (struct slcd_instream_s *) instream; DEBUGASSERT(slcdstream && slcdstream->buffer); @@ -1117,7 +1117,7 @@ static void slcd_action(enum slcdcode_e code, uint8_t count) * Name: slcd_read ****************************************************************************/ -static ssize_t slcd_read(FAR struct file *filep, FAR char *buffer, +static ssize_t slcd_read(struct file *filep, char *buffer, size_t len) { int ret = 0; @@ -1162,8 +1162,8 @@ static ssize_t slcd_read(FAR struct file *filep, FAR char *buffer, * Name: slcd_write ****************************************************************************/ -static ssize_t slcd_write(FAR struct file *filep, - FAR const char *buffer, size_t len) +static ssize_t slcd_write(struct file *filep, + const char *buffer, size_t len) { struct slcd_instream_s instream; struct slcdstate_s state; @@ -1352,7 +1352,7 @@ static ssize_t slcd_write(FAR struct file *filep, * Name: slcd_poll ****************************************************************************/ -static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +static int slcd_ioctl(struct file *filep, int cmd, unsigned long arg) { switch (cmd) { @@ -1364,8 +1364,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_GETATTRIBUTES: { - FAR struct slcd_attributes_s *attr = - (FAR struct slcd_attributes_s *)((uintptr_t)arg); + struct slcd_attributes_s *attr = + (struct slcd_attributes_s *)((uintptr_t)arg); lcdinfo("SLCDIOC_GETATTRIBUTES:\n"); @@ -1390,8 +1390,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_CURPOS: { - FAR struct slcd_curpos_s *curpos = - (FAR struct slcd_curpos_s *)((uintptr_t)arg); + struct slcd_curpos_s *curpos = + (struct slcd_curpos_s *)((uintptr_t)arg); lcdinfo("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos); @@ -1453,7 +1453,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_GETCONTRAST: { - FAR int *contrast = (FAR int *)((uintptr_t)arg); + int *contrast = (int *)((uintptr_t)arg); if (!contrast) { return -EINVAL; @@ -1495,8 +1495,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) * Name: slcd_poll ****************************************************************************/ -static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds, - bool setup) +static int slcd_poll(struct file *filep, struct pollfd *fds, + bool setup) { if (setup) { diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_spi.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_spi.c index 79df0eb72e..c9cc3701e9 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_spi.c +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_spi.c @@ -88,7 +88,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -97,35 +97,35 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, stm32_gpiowrite(GPIO_MEMS_CS, !selected); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -156,21 +156,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int stm32_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/boards/arm/stm32/stm32vldiscovery/src/stm32_buttons.c b/boards/arm/stm32/stm32vldiscovery/src/stm32_buttons.c index 1c0ed02dbf..2ec2e54508 100644 --- a/boards/arm/stm32/stm32vldiscovery/src/stm32_buttons.c +++ b/boards/arm/stm32/stm32vldiscovery/src/stm32_buttons.c @@ -93,7 +93,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ads7843e.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ads7843e.c index a21dda6e5a..97bf000379 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ads7843e.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ads7843e.c @@ -97,11 +97,11 @@ struct viewtool_tscinfo_s * pendown - Return the state of the pen down GPIO input */ -static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr); -static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable); -static void tsc_clear(FAR struct ads7843e_config_s *state); -static bool tsc_busy(FAR struct ads7843e_config_s *state); -static bool tsc_pendown(FAR struct ads7843e_config_s *state); +static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr); +static void tsc_enable(struct ads7843e_config_s *state, bool enable); +static void tsc_clear(struct ads7843e_config_s *state); +static bool tsc_busy(struct ads7843e_config_s *state); +static bool tsc_pendown(struct ads7843e_config_s *state); /**************************************************************************** * Private Data @@ -149,10 +149,10 @@ static struct viewtool_tscinfo_s g_tscinfo = * ****************************************************************************/ -static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) +static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr) { - FAR struct viewtool_tscinfo_s *priv = - (FAR struct viewtool_tscinfo_s *)state; + struct viewtool_tscinfo_s *priv = + (struct viewtool_tscinfo_s *)state; if (isr) { @@ -173,10 +173,10 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) return OK; } -static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) +static void tsc_enable(struct ads7843e_config_s *state, bool enable) { - FAR struct viewtool_tscinfo_s *priv = - (FAR struct viewtool_tscinfo_s *)state; + struct viewtool_tscinfo_s *priv = + (struct viewtool_tscinfo_s *)state; irqstate_t flags; /* Attach and enable, or detach and disable. Enabling and disabling GPIO @@ -207,17 +207,17 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) leave_critical_section(flags); } -static void tsc_clear(FAR struct ads7843e_config_s *state) +static void tsc_clear(struct ads7843e_config_s *state) { /* Does nothing */ } -static bool tsc_busy(FAR struct ads7843e_config_s *state) +static bool tsc_busy(struct ads7843e_config_s *state) { return false; /* The BUSY signal is not connected */ } -static bool tsc_pendown(FAR struct ads7843e_config_s *state) +static bool tsc_pendown(struct ads7843e_config_s *state) { /* The /PENIRQ value is active low */ @@ -249,7 +249,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) int stm32_tsc_setup(int minor) { - FAR struct spi_dev_s *dev; + struct spi_dev_s *dev; int ret; iinfo("minor %d\n", minor); diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c index 2d6f620840..3f57ec1db6 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c @@ -77,7 +77,7 @@ #ifdef HAVE_RTC_DRIVER static int rtc_driver_initialize(void) { - FAR struct rtc_lowerhalf_s *lower; + struct rtc_lowerhalf_s *lower; int ret; /* Instantiate the STM32 lower-half RTC driver */ diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_buttons.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_buttons.c index fbba172ecd..f6d69aa2b6 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_buttons.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_buttons.c @@ -133,7 +133,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ft80x.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ft80x.c index c8060728b0..4ac28f5cbb 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ft80x.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ft80x.c @@ -56,7 +56,7 @@ struct viewtool_ft80xlower_s /* Extensions for the viewtool board */ xcpt_t handler; - FAR void *arg; + void *arg; }; /**************************************************************************** @@ -79,19 +79,19 @@ struct viewtool_ft80xlower_s * destroy - The driver has been unlinked. Cleanup as necessary. */ -static int ft80x_attach(FAR const struct ft80x_config_s *lower, xcpt_t isr, - FAR void *arg); -static void ft80x_enable(FAR const struct ft80x_config_s *lower, +static int ft80x_attach(const struct ft80x_config_s *lower, xcpt_t isr, + void *arg); +static void ft80x_enable(const struct ft80x_config_s *lower, bool enable); -static void ft80x_clear(FAR const struct ft80x_config_s *lower); +static void ft80x_clear(const struct ft80x_config_s *lower); -static void ft80x_pwrdown(FAR const struct ft80x_config_s *lower, +static void ft80x_pwrdown(const struct ft80x_config_s *lower, bool pwrdown); #ifdef CONFIG_LCD_FT80X_AUDIO_MCUSHUTDOWN -static void ft80x_audio(FAR const struct ft80x_config_s *lower, bool enable); +static void ft80x_audio(const struct ft80x_config_s *lower, bool enable); #endif #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS -static void ft80x_destroy(FAR const struct ft80x_config_s *lower); +static void ft80x_destroy(const struct ft80x_config_s *lower); #endif /**************************************************************************** @@ -150,11 +150,11 @@ static struct viewtool_ft80xlower_s g_ft80xlower = * ****************************************************************************/ -static int ft80x_attach(FAR const struct ft80x_config_s *lower, xcpt_t isr, - FAR void *arg) +static int ft80x_attach(const struct ft80x_config_s *lower, xcpt_t isr, + void *arg) { - FAR struct viewtool_ft80xlower_s *priv = - (FAR struct viewtool_ft80xlower_s *)lower; + struct viewtool_ft80xlower_s *priv = + (struct viewtool_ft80xlower_s *)lower; if (isr) { @@ -177,11 +177,11 @@ static int ft80x_attach(FAR const struct ft80x_config_s *lower, xcpt_t isr, return OK; } -static void ft80x_enable(FAR const struct ft80x_config_s *lower, +static void ft80x_enable(const struct ft80x_config_s *lower, bool enable) { - FAR struct viewtool_ft80xlower_s *priv = - (FAR struct viewtool_ft80xlower_s *)lower; + struct viewtool_ft80xlower_s *priv = + (struct viewtool_ft80xlower_s *)lower; irqstate_t flags; /* Attach and enable, or detach and disable. Enabling and disabling GPIO @@ -212,12 +212,12 @@ static void ft80x_enable(FAR const struct ft80x_config_s *lower, leave_critical_section(flags); } -static void ft80x_clear(FAR const struct ft80x_config_s *lower) +static void ft80x_clear(const struct ft80x_config_s *lower) { /* Does nothing */ } -static void ft80x_pwrdown(FAR const struct ft80x_config_s *lower, +static void ft80x_pwrdown(const struct ft80x_config_s *lower, bool pwrdown) { /* Powerdown pin is active low. Hence, it is really a power up pin. */ @@ -226,14 +226,14 @@ static void ft80x_pwrdown(FAR const struct ft80x_config_s *lower, } #ifdef CONFIG_LCD_FT80X_AUDIO_MCUSHUTDOWN -static void ft80x_audio(FAR const struct ft80x_config_s *lower, bool enable) +static void ft80x_audio(const struct ft80x_config_s *lower, bool enable) { /* Does nothing */ } #endif #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS -static void ft80x_destroy(FAR const struct ft80x_config_s *lower) +static void ft80x_destroy(const struct ft80x_config_s *lower) { /* Does nothing */ } @@ -261,7 +261,7 @@ static void ft80x_destroy(FAR const struct ft80x_config_s *lower) int stm32_ft80x_setup(void) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Configure the FT80x interrupt pin as an input and powerdown pin as an diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c index 3eed410dc0..8e62c6c655 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c @@ -87,7 +87,7 @@ struct highpri_s { - FAR struct stm32_tim_dev_s *dev; /* TIM6 driver instance */ + struct stm32_tim_dev_s *dev; /* TIM6 driver instance */ volatile uint64_t basepri[16]; volatile uint64_t handler; volatile uint64_t thread; @@ -152,7 +152,7 @@ void tim6_handler(void) int highpri_main(int argc, char *argv[]) { - FAR struct stm32_tim_dev_s *dev; + struct stm32_tim_dev_s *dev; uint64_t basepri[16]; uint64_t handler; uint64_t thread; diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_max3421e.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_max3421e.c index 599202a601..e0658c0458 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_max3421e.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_max3421e.c @@ -64,7 +64,7 @@ struct viewtool_max3421elower_s /* Extensions for the viewtool board */ xcpt_t handler; - FAR void *arg; + void *arg; }; /**************************************************************************** @@ -83,13 +83,13 @@ struct viewtool_max3421elower_s * acknowledge - Acknowledge/clear any pending GPIO interrupt as necessary. */ -static int max3421e_attach(FAR const struct max3421e_lowerhalf_s *lower, - xcpt_t isr, FAR void *arg); -static void max3421e_enable(FAR const struct max3421e_lowerhalf_s *lower, +static int max3421e_attach(const struct max3421e_lowerhalf_s *lower, + xcpt_t isr, void *arg); +static void max3421e_enable(const struct max3421e_lowerhalf_s *lower, bool enable); static void max3421e_acknowledge - (FAR const struct max3421e_lowerhalf_s *lower); -static void max3421e_power(FAR const struct max3421e_lowerhalf_s *lower, + (const struct max3421e_lowerhalf_s *lower); +static void max3421e_power(const struct max3421e_lowerhalf_s *lower, bool enable); /**************************************************************************** @@ -123,7 +123,7 @@ static struct viewtool_max3421elower_s g_max3421e_lower = }, }; -static FAR struct usbhost_connection_s *g_usbconn; +static struct usbhost_connection_s *g_usbconn; /**************************************************************************** * Private Functions @@ -144,11 +144,11 @@ static FAR struct usbhost_connection_s *g_usbconn; * ****************************************************************************/ -static int max3421e_attach(FAR const struct max3421e_lowerhalf_s *lower, - xcpt_t isr, FAR void *arg) +static int max3421e_attach(const struct max3421e_lowerhalf_s *lower, + xcpt_t isr, void *arg) { - FAR struct viewtool_max3421elower_s *priv = - (FAR struct viewtool_max3421elower_s *)lower; + struct viewtool_max3421elower_s *priv = + (struct viewtool_max3421elower_s *)lower; if (isr != NULL) { @@ -171,11 +171,11 @@ static int max3421e_attach(FAR const struct max3421e_lowerhalf_s *lower, return OK; } -static void max3421e_enable(FAR const struct max3421e_lowerhalf_s *lower, +static void max3421e_enable(const struct max3421e_lowerhalf_s *lower, bool enable) { - FAR struct viewtool_max3421elower_s *priv = - (FAR struct viewtool_max3421elower_s *)lower; + struct viewtool_max3421elower_s *priv = + (struct viewtool_max3421elower_s *)lower; irqstate_t flags; uinfo("enable=%u handler=%p\n", enable, priv->handler); @@ -212,12 +212,12 @@ static void max3421e_enable(FAR const struct max3421e_lowerhalf_s *lower, } static void max3421e_acknowledge - (FAR const struct max3421e_lowerhalf_s *lower) + (const struct max3421e_lowerhalf_s *lower) { /* Does nothing */ } -static void max3421e_power(FAR const struct max3421e_lowerhalf_s *lower, +static void max3421e_power(const struct max3421e_lowerhalf_s *lower, bool enable) { /* We currently have no control over VBUS power */ @@ -234,9 +234,9 @@ static void max3421e_power(FAR const struct max3421e_lowerhalf_s *lower, * Wait for USB devices to be connected. ****************************************************************************/ -static int usbhost_detect(int argc, FAR char *argv[]) +static int usbhost_detect(int argc, char *argv[]) { - FAR struct usbhost_hubport_s *hport; + struct usbhost_hubport_s *hport; uinfo("Starting USB detect thread\n"); @@ -275,7 +275,7 @@ static int usbhost_detect(int argc, FAR char *argv[]) int stm32_max3421e_setup(void) { - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; int ret; /* Configure the MAX3421E interrupt pin as an input and the reset and power diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_mmcsd.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_mmcsd.c index 6ca6fa3367..c1e5af0949 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_mmcsd.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_mmcsd.c @@ -75,7 +75,7 @@ int stm32_sdinitialize(int minor) { #ifdef HAVE_MMCSD - FAR struct sdio_dev_s *sdio; + struct sdio_dev_s *sdio; int ret; /* Configure the card-detect GPIO */ diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_spi.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_spi.c index 89332a7c87..2e1640961f 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_spi.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_spi.c @@ -111,7 +111,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -140,14 +140,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, +void stm32_spi2select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", @@ -185,21 +185,21 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, } } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, +void stm32_spi3select(struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t stm32_spi3status(struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c index fac7b874f5..ffb940a558 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c @@ -87,14 +87,14 @@ /* Low Level LCD access */ -static void stm32_select(FAR struct ssd1289_lcd_s *dev); -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev); -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index); +static void stm32_select(struct ssd1289_lcd_s *dev); +static void stm32_deselect(struct ssd1289_lcd_s *dev); +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index); #ifndef CONFIG_SSD1289_WRONLY -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev); +static uint16_t stm32_read(struct ssd1289_lcd_s *dev); #endif -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data); -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power); +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data); +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power); static void stm32_extmemgpios(const uint16_t *gpios, int ngpios); @@ -212,7 +212,7 @@ static struct ssd1289_lcd_s g_ssd1289 = /* The saved instance of the LCD driver */ -static FAR struct lcd_dev_s *g_ssd1289drvr; +static struct lcd_dev_s *g_ssd1289drvr; /**************************************************************************** * Private Functions @@ -226,7 +226,7 @@ static FAR struct lcd_dev_s *g_ssd1289drvr; * ****************************************************************************/ -static void stm32_select(FAR struct ssd1289_lcd_s *dev) +static void stm32_select(struct ssd1289_lcd_s *dev) { /* Does not apply to this hardware */ } @@ -239,7 +239,7 @@ static void stm32_select(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) +static void stm32_deselect(struct ssd1289_lcd_s *dev) { /* Does not apply to this hardware */ } @@ -252,7 +252,7 @@ static void stm32_deselect(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) +static void stm32_index(struct ssd1289_lcd_s *dev, uint8_t index) { putreg16((uint16_t)index, LCD_INDEX); } @@ -266,7 +266,7 @@ static void stm32_index(FAR struct ssd1289_lcd_s *dev, uint8_t index) ****************************************************************************/ #ifndef CONFIG_SSD1289_WRONLY -static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) +static uint16_t stm32_read(struct ssd1289_lcd_s *dev) { return getreg16(LCD_DATA); } @@ -280,7 +280,7 @@ static uint16_t stm32_read(FAR struct ssd1289_lcd_s *dev) * ****************************************************************************/ -static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) +static void stm32_write(struct ssd1289_lcd_s *dev, uint16_t data) { putreg16((uint16_t)data, LCD_DATA); } @@ -295,7 +295,7 @@ static void stm32_write(FAR struct ssd1289_lcd_s *dev, uint16_t data) * ****************************************************************************/ -static void stm32_backlight(FAR struct ssd1289_lcd_s *dev, int power) +static void stm32_backlight(struct ssd1289_lcd_s *dev, int power) { DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); @@ -542,7 +542,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +struct lcd_dev_s *board_lcd_getdev(int lcddev) { DEBUGASSERT(lcddev == 0); return g_ssd1289drvr; diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbdev.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbdev.c index 751047ac5e..d0b4d4fb1e 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbdev.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbdev.c @@ -84,7 +84,7 @@ void stm32_usbdev_initialize(void) ****************************************************************************/ #ifdef CONFIG_ARCH_CHIP_STM32F103VC -int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +int stm32_usbpullup(struct usbdev_s *dev, bool enable) { usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); stm32_gpiowrite(GPIO_USB_PULLUP, !enable); @@ -103,7 +103,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) { uinfo("resume: %d\n", resume); } diff --git a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h index dabbc4d371..294dd6cfed 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h +++ b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h @@ -461,7 +461,7 @@ int stm32_can_setup(void); ****************************************************************************/ #if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MPL115A) && defined(CONFIG_STM32_SPI3) -int stm32_mpl115ainitialize(FAR const char *devpath); +int stm32_mpl115ainitialize(const char *devpath); #endif /****************************************************************************