From d9f02858fdc04c4404834a033850f758e4c8ee7e Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 21 Dec 2013 13:21:59 +1000 Subject: Replace NULL's with 0 as NULL is not defined by the Raw32 GOS. --- boards/addons/gdisp/board_HX8347D_stm32f4discovery.h | 14 +++++++------- boards/addons/gdisp/board_SSD1289_stm32f4discovery.h | 12 ++++++------ boards/addons/gdisp/board_SSD1306_i2c.h | 4 ++-- boards/addons/gdisp/board_SSD1306_spi.h | 2 +- .../ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h | 2 +- .../ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h | 2 +- boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h | 12 ++++++------ boards/base/Embest-STM32-DMSTF4BB/ginput_lld_mouse_board.h | 4 ++-- boards/base/FireBull-STM32F103-FB/ginput_lld_mouse_board.h | 2 +- boards/base/Marlin/ginput_lld_mouse_board.h | 4 ++-- .../ChibiOS_Board/flash_memory.c | 2 +- .../Mikromedia-STM32-M4-ILI9341/ginput_lld_mouse_board.h | 6 +++--- boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h | 4 ++-- boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h | 4 ++-- boards/base/Olimex-STM32-LCD/ginput_lld_mouse_board.h | 10 +++++----- 15 files changed, 42 insertions(+), 42 deletions(-) (limited to 'boards') diff --git a/boards/addons/gdisp/board_HX8347D_stm32f4discovery.h b/boards/addons/gdisp/board_HX8347D_stm32f4discovery.h index df287477..f486841b 100644 --- a/boards/addons/gdisp/board_HX8347D_stm32f4discovery.h +++ b/boards/addons/gdisp/board_HX8347D_stm32f4discovery.h @@ -28,12 +28,12 @@ static const PWMConfig pwmcfg = { 1000000, /* 1 MHz PWM clock frequency. */ 100, /* PWM period is 100 cycles. */ - NULL, + 0, { - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL} + {PWM_OUTPUT_ACTIVE_HIGH, 0}, + {PWM_OUTPUT_ACTIVE_HIGH, 0}, + {PWM_OUTPUT_ACTIVE_HIGH, 0}, + {PWM_OUTPUT_ACTIVE_HIGH, 0} }, 0 }; @@ -44,7 +44,7 @@ static const PWMConfig pwmcfg = { * The slave select line is the pin 4 on the port GPIOA. */ static const SPIConfig spi1cfg_8bit = { - NULL, + 0, /* HW dependent part.*/ GPIOA, 4, @@ -57,7 +57,7 @@ static const SPIConfig spi1cfg_8bit = { * The slave select line is the pin 4 on the port GPIOA. */ static const SPIConfig spi1cfg_16bit = { - NULL, + 0, /* HW dependent part.*/ GPIOA, 4, diff --git a/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h b/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h index 866311dc..1d86a67e 100644 --- a/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h +++ b/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h @@ -24,12 +24,12 @@ static const PWMConfig pwmcfg = { 100000, /* 100 kHz PWM clock frequency. */ 100, /* PWM period is 100 cycles. */ - NULL, + 0, { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, - {PWM_OUTPUT_DISABLED, NULL} + {PWM_OUTPUT_DISABLED, 0}, + {PWM_OUTPUT_DISABLED, 0}, + {PWM_OUTPUT_ACTIVE_HIGH, 0}, + {PWM_OUTPUT_DISABLED, 0} }, 0 }; @@ -61,7 +61,7 @@ static inline void init_board(GDisplay *g) { rccEnableAHB3(RCC_AHB3ENR_FSMCEN, 0); #if defined(GDISP_USE_DMA) - if (dmaStreamAllocate(GDISP_DMA_STREAM, 0, NULL, NULL)) gfxExit(); + if (dmaStreamAllocate(GDISP_DMA_STREAM, 0, 0, 0)) gfxExit(); dmaStreamSetMemory0(GDISP_DMA_STREAM, &GDISP_RAM); dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M); #else diff --git a/boards/addons/gdisp/board_SSD1306_i2c.h b/boards/addons/gdisp/board_SSD1306_i2c.h index 449d47ba..3f755f26 100644 --- a/boards/addons/gdisp/board_SSD1306_i2c.h +++ b/boards/addons/gdisp/board_SSD1306_i2c.h @@ -112,7 +112,7 @@ static inline void write_cmd(GDisplay *g, uint8_t cmd) { command[1] = cmd; i2cStart(&I2CD1, &i2cconfig); - i2cMasterTransmitTimeout(&I2CD1, SSD1306_I2C_ADDRESS, command, 2, NULL, 0, MS2ST(10)); + i2cMasterTransmitTimeout(&I2CD1, SSD1306_I2C_ADDRESS, command, 2, 0, 0, MS2ST(10)); i2cStop(&I2CD1); } @@ -120,7 +120,7 @@ static inline void write_data(GDisplay *g, uint8_t* data, uint16_t length) { (void) g; i2cStart(&I2CD1, &i2cconfig); - i2cMasterTransmitTimeout(&I2CD1, SSD1306_I2C_ADDRESS, data, length, NULL, 0, MS2ST(10)); + i2cMasterTransmitTimeout(&I2CD1, SSD1306_I2C_ADDRESS, data, length, 0, 0, MS2ST(10)); i2cStop(&I2CD1); } diff --git a/boards/addons/gdisp/board_SSD1306_spi.h b/boards/addons/gdisp/board_SSD1306_spi.h index 21bf095f..b476fec0 100644 --- a/boards/addons/gdisp/board_SSD1306_spi.h +++ b/boards/addons/gdisp/board_SSD1306_spi.h @@ -37,7 +37,7 @@ * The slave select line is the pin 4 on the port GPIOA. */ static const SPIConfig spi1config = { - NULL, + 0, /* HW dependent part.*/ SSD1306_MISO_PORT, SSD1306_MISO_PIN, diff --git a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h index e0ab85dc..73507f10 100644 --- a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h +++ b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h @@ -18,7 +18,7 @@ #define _GINPUT_LLD_MOUSE_BOARD_H static const SPIConfig spicfg = { - NULL, + 0, GPIOG, 10, /* SPI_CR1_BR_2 |*/ SPI_CR1_BR_1 | SPI_CR1_BR_0, diff --git a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h index 919b767d..d4923c29 100644 --- a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h +++ b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h @@ -20,7 +20,7 @@ * Note that you can tweak the SPI bus speed */ static const SPIConfig spicfg = { - NULL, + 0, GPIOC, 4, /* SPI_CR1_BR_2 |*/ SPI_CR1_BR_1 | SPI_CR1_BR_0, diff --git a/boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h b/boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h index c6d3d040..d6e10a61 100644 --- a/boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h +++ b/boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h @@ -31,12 +31,12 @@ static const PWMConfig pwmcfg = { 1000000, /* 1 MHz PWM clock frequency. */ 100, /* PWM period is 100 cycles. */ - NULL, + 0, { - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL} + {PWM_OUTPUT_ACTIVE_HIGH, 0}, + {PWM_OUTPUT_ACTIVE_HIGH, 0}, + {PWM_OUTPUT_ACTIVE_HIGH, 0}, + {PWM_OUTPUT_ACTIVE_HIGH, 0} }, 0 }; @@ -53,7 +53,7 @@ static inline void init_board(GDisplay *g) { rccEnableAHB3(RCC_AHB3ENR_FSMCEN, 0); #if defined(GDISP_USE_DMA) && defined(GDISP_DMA_STREAM) - if (dmaStreamAllocate(GDISP_DMA_STREAM, 0, NULL, NULL)) + if (dmaStreamAllocate(GDISP_DMA_STREAM, 0, 0, 0)) gfxExit(); dmaStreamSetMemory0(GDISP_DMA_STREAM, &GDISP_RAM); dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M); diff --git a/boards/base/Embest-STM32-DMSTF4BB/ginput_lld_mouse_board.h b/boards/base/Embest-STM32-DMSTF4BB/ginput_lld_mouse_board.h index 6eff87c9..d525e268 100644 --- a/boards/base/Embest-STM32-DMSTF4BB/ginput_lld_mouse_board.h +++ b/boards/base/Embest-STM32-DMSTF4BB/ginput_lld_mouse_board.h @@ -38,11 +38,11 @@ static void write_reg(uint8_t reg, uint8_t n, uint16_t val) if (n == 1) { txbuf[1] = val; - i2cMasterTransmitTimeout(&I2CD1, STMPE811_ADDR, txbuf, 2, NULL, 0, MS2ST(STMPE811_TIMEOUT)); + i2cMasterTransmitTimeout(&I2CD1, STMPE811_ADDR, txbuf, 2, 0, 0, MS2ST(STMPE811_TIMEOUT)); } else if (n == 2) { txbuf[1] = ((val & 0xFF00) >> 8); txbuf[2] = (val & 0x00FF); - i2cMasterTransmitTimeout(&I2CD1, STMPE811_ADDR, txbuf, 3, NULL, 0, MS2ST(STMPE811_TIMEOUT)); + i2cMasterTransmitTimeout(&I2CD1, STMPE811_ADDR, txbuf, 3, 0, 0, MS2ST(STMPE811_TIMEOUT)); } i2cReleaseBus(&I2CD1); diff --git a/boards/base/FireBull-STM32F103-FB/ginput_lld_mouse_board.h b/boards/base/FireBull-STM32F103-FB/ginput_lld_mouse_board.h index 102bd834..6ca1a897 100644 --- a/boards/base/FireBull-STM32F103-FB/ginput_lld_mouse_board.h +++ b/boards/base/FireBull-STM32F103-FB/ginput_lld_mouse_board.h @@ -9,7 +9,7 @@ #define _GINPUT_LLD_MOUSE_BOARD_H static const SPIConfig spicfg = { - NULL, + 0, GPIOC, 6, /* SPI_CR1_BR_2 |*/ SPI_CR1_BR_1 | SPI_CR1_BR_0, diff --git a/boards/base/Marlin/ginput_lld_mouse_board.h b/boards/base/Marlin/ginput_lld_mouse_board.h index e3e18c24..d787d224 100644 --- a/boards/base/Marlin/ginput_lld_mouse_board.h +++ b/boards/base/Marlin/ginput_lld_mouse_board.h @@ -52,11 +52,11 @@ static void write_reg(uint8_t reg, uint8_t n, uint16_t val) { if (n == 1) { txbuf[1] = val; - i2cMasterTransmitTimeout(&I2CD2, FT5x06_ADDR, txbuf, 2, NULL, 0, MS2ST(FT5x06_TIMEOUT)); + i2cMasterTransmitTimeout(&I2CD2, FT5x06_ADDR, txbuf, 2, 0, 0, MS2ST(FT5x06_TIMEOUT)); } else if (n == 2) { txbuf[1] = ((val & 0xFF00) >> 8); txbuf[2] = (val & 0x00FF); - i2cMasterTransmitTimeout(&I2CD2, FT5x06_ADDR, txbuf, 3, NULL, 0, MS2ST(FT5x06_TIMEOUT)); + i2cMasterTransmitTimeout(&I2CD2, FT5x06_ADDR, txbuf, 3, 0, 0, MS2ST(FT5x06_TIMEOUT)); } i2cReleaseBus(&I2CD2); diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c b/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c index a27a3db5..ccd3ab9f 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c @@ -12,7 +12,7 @@ static const unsigned short _SERIAL_FLASH_CMD_WRSR = 0x01; static const unsigned short _SERIAL_FLASH_CMD_SER = 0xD8; //25P80 static const SPIConfig flash_spicfg = { - NULL, + 0, GPIOD, GPIOD_FLASH_CS, 0 diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/ginput_lld_mouse_board.h b/boards/base/Mikromedia-STM32-M4-ILI9341/ginput_lld_mouse_board.h index 9c659e66..7e9948a5 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/ginput_lld_mouse_board.h +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/ginput_lld_mouse_board.h @@ -19,8 +19,8 @@ static const ADCConversionGroup adcgrpcfg = { FALSE, ADC_NUM_CHANNELS, - NULL, - NULL, + 0, + 0, /* HW dependent part.*/ 0, ADC_CR2_SWSTART, @@ -37,7 +37,7 @@ static const ADCConversionGroup adcgrpcfg = { * @notapi */ static inline void init_board(void) { - adcStart(&ADCD1, NULL); + adcStart(&ADCD1, 0); } /** diff --git a/boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h b/boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h index feb1887e..f6c73a14 100644 --- a/boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h +++ b/boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h @@ -51,9 +51,9 @@ static volatile AT91PS_PDC pPDC = AT91C_BASE_PDC_SPI0; static const PWMConfig pwmcfg = { 1000000, /* 1 MHz PWM clock frequency. Ignored as we are using PWM_MCK_DIV_n */ 1000, /* PWM period is 1000 cycles. */ - NULL, + 0, { - {PWM_MCK_DIV_1 | PWM_OUTPUT_ACTIVE_HIGH | PWM_OUTPUT_PIN1 | PWM_DISABLEPULLUP_PIN1, NULL}, + {PWM_MCK_DIV_1 | PWM_OUTPUT_ACTIVE_HIGH | PWM_OUTPUT_PIN1 | PWM_DISABLEPULLUP_PIN1, 0}, }, }; diff --git a/boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h b/boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h index c88dbe74..aa907058 100644 --- a/boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h +++ b/boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h @@ -51,9 +51,9 @@ static volatile AT91PS_PDC pPDC = AT91C_BASE_PDC_SPI0; static const PWMConfig pwmcfg = { 1000000, /* 1 MHz PWM clock frequency. Ignored as we are using PWM_MCK_DIV_n */ 1000, /* PWM period is 1000 cycles. */ - NULL, + 0, { - {PWM_MCK_DIV_1 | PWM_OUTPUT_ACTIVE_HIGH | PWM_OUTPUT_PIN1 | PWM_DISABLEPULLUP_PIN1, NULL}, + {PWM_MCK_DIV_1 | PWM_OUTPUT_ACTIVE_HIGH | PWM_OUTPUT_PIN1 | PWM_DISABLEPULLUP_PIN1, 0}, }, }; diff --git a/boards/base/Olimex-STM32-LCD/ginput_lld_mouse_board.h b/boards/base/Olimex-STM32-LCD/ginput_lld_mouse_board.h index 4fcffd25..91575527 100644 --- a/boards/base/Olimex-STM32-LCD/ginput_lld_mouse_board.h +++ b/boards/base/Olimex-STM32-LCD/ginput_lld_mouse_board.h @@ -14,8 +14,8 @@ static const ADCConversionGroup adc_y_config = { FALSE, ADC_NUM_CHANNELS, - NULL, - NULL, + 0, + 0, 0, 0, 0, 0, ADC_SQR1_NUM_CH(ADC_NUM_CHANNELS), @@ -26,8 +26,8 @@ static const ADCConversionGroup adc_y_config = { static const ADCConversionGroup adc_x_config = { FALSE, ADC_NUM_CHANNELS, - NULL, - NULL, + 0, + 0, 0, 0, 0, 0, ADC_SQR1_NUM_CH(ADC_NUM_CHANNELS), @@ -36,7 +36,7 @@ static const ADCConversionGroup adc_x_config = { }; static inline void init_board(void) { - adcStart(&ADCD1, NULL); + adcStart(&ADCD1, 0); } static inline void aquire_bus(void) { -- cgit v1.2.3