aboutsummaryrefslogtreecommitdiffstats
path: root/boards/addons/gdisp
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-12-21 13:21:59 +1000
committerinmarket <andrewh@inmarket.com.au>2013-12-21 13:21:59 +1000
commitd9f02858fdc04c4404834a033850f758e4c8ee7e (patch)
tree2d7b4759cabf76eba5b7ef2147e58d3c9d7f885b /boards/addons/gdisp
parent018a930d5525ffefc30fb2514752918455853685 (diff)
downloaduGFX-d9f02858fdc04c4404834a033850f758e4c8ee7e.tar.gz
uGFX-d9f02858fdc04c4404834a033850f758e4c8ee7e.tar.bz2
uGFX-d9f02858fdc04c4404834a033850f758e4c8ee7e.zip
Replace NULL's with 0 as NULL is not defined by the Raw32 GOS.
Diffstat (limited to 'boards/addons/gdisp')
-rw-r--r--boards/addons/gdisp/board_HX8347D_stm32f4discovery.h14
-rw-r--r--boards/addons/gdisp/board_SSD1289_stm32f4discovery.h12
-rw-r--r--boards/addons/gdisp/board_SSD1306_i2c.h4
-rw-r--r--boards/addons/gdisp/board_SSD1306_spi.h2
4 files changed, 16 insertions, 16 deletions
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,