aboutsummaryrefslogtreecommitdiffstats
path: root/boards/base/STM32F746-Discovery
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-06-23 13:02:07 +1000
committerinmarket <andrewh@inmarket.com.au>2018-06-23 13:02:07 +1000
commit41271d632b74f5cf47c30d3b699eb6b2786f2136 (patch)
tree78bcb729c6d6177ca598f28908fefd186c50e9b6 /boards/base/STM32F746-Discovery
parent3b97fb798e96514057bcf17263c1e5dbdcd7da26 (diff)
downloaduGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.gz
uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.bz2
uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.zip
Added new type definitions - moving towards V3.0
Diffstat (limited to 'boards/base/STM32F746-Discovery')
-rw-r--r--boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h6
-rw-r--r--boards/base/STM32F746-Discovery/stm32f7_i2c.c6
-rw-r--r--boards/base/STM32F746-Discovery/stm32f7_i2c.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h b/boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h
index 7d61bb25..d8c4c2e1 100644
--- a/boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h
+++ b/boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h
@@ -30,7 +30,7 @@
#define AFRH AFR[1]
#endif
-static bool_t init_board(GMouse* m, unsigned instance)
+static gBool init_board(GMouse* m, unsigned instance)
{
(void)m;
(void)instance;
@@ -51,10 +51,10 @@ static bool_t init_board(GMouse* m, unsigned instance)
// Initialize the I2C3 peripheral
if (!(i2cInit(I2C3))) {
- return FALSE;
+ return gFalse;
}
- return TRUE;
+ return gTrue;
}
static void write_reg(GMouse* m, uint8_t reg, uint8_t val)
diff --git a/boards/base/STM32F746-Discovery/stm32f7_i2c.c b/boards/base/STM32F746-Discovery/stm32f7_i2c.c
index 90bb9635..75af9de7 100644
--- a/boards/base/STM32F746-Discovery/stm32f7_i2c.c
+++ b/boards/base/STM32F746-Discovery/stm32f7_i2c.c
@@ -34,7 +34,7 @@ static void _i2cResetCr2(I2C_TypeDef* i2c)
i2c->CR2 &= (uint32_t) ~((uint32_t) (I2C_CR2_SADD | I2C_CR2_HEAD10R | I2C_CR2_NBYTES | I2C_CR2_RELOAD | I2C_CR2_RD_WRN));
}
-bool_t i2cInit(I2C_TypeDef* i2c)
+gBool i2cInit(I2C_TypeDef* i2c)
{
// Enable I2Cx peripheral clock.
// Select APB1 as clock source
@@ -51,7 +51,7 @@ bool_t i2cInit(I2C_TypeDef* i2c)
RCC->DCKCFGR2 &= ~RCC_DCKCFGR2_I2C4SEL;
RCC->APB1ENR |= RCC_APB1ENR_I2C4EN;
} else {
- return FALSE;
+ return gFalse;
}
// Disable the I2Cx peripheral
@@ -76,7 +76,7 @@ bool_t i2cInit(I2C_TypeDef* i2c)
// Enable the I2Cx peripheral
i2c->CR1 |= I2C_CR1_PE;
- return TRUE;
+ return gTrue;
}
void i2cSend(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t* data, uint16_t length)
diff --git a/boards/base/STM32F746-Discovery/stm32f7_i2c.h b/boards/base/STM32F746-Discovery/stm32f7_i2c.h
index 625aeed8..4d481903 100644
--- a/boards/base/STM32F746-Discovery/stm32f7_i2c.h
+++ b/boards/base/STM32F746-Discovery/stm32f7_i2c.h
@@ -3,7 +3,7 @@
#include "stm32f7xx.h"
#include "gfx.h"
-bool_t i2cInit(I2C_TypeDef* i2c);
+gBool i2cInit(I2C_TypeDef* i2c);
void i2cSend(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t* data, uint16_t length);
void i2cSendByte(I2C_TypeDef* i2c, uint8_t slaveAddr, uint8_t data);