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/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 ++-- .../Mikromedia-STM32-M4-ILI9341/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 +++++----- 9 files changed, 24 insertions(+), 24 deletions(-) (limited to 'boards/base') 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