Browse Source

Added new type definitions - moving towards V3.0

remotes/origin_old/release/v2.9
inmarket 4 years ago
parent
commit
41271d632b
  1. 20
      boards/addons/gdisp/board_ED060SC4_example.h
  2. 2
      boards/addons/gdisp/board_HX8347D_stm32f4discovery.h
  3. 2
      boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h
  4. 2
      boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h
  5. 6
      boards/addons/gdisp/board_ILI9341_spi.h
  6. 2
      boards/addons/gdisp/board_ILI9481_firebullstm32f103.h
  7. 2
      boards/addons/gdisp/board_ILI9488_stm32f4cube_hal.h
  8. 2
      boards/addons/gdisp/board_S6D1121_olimex_e407.h
  9. 4
      boards/addons/gdisp/board_SPFD54124B_stm32f3.h
  10. 2
      boards/addons/gdisp/board_SSD1289_stm32f4discovery.h
  11. 2
      boards/addons/gdisp/board_SSD1306_chibios_16.1.3_stm32f4.h
  12. 2
      boards/addons/gdisp/board_SSD1306_i2c.h
  13. 88
      boards/addons/gdisp/board_SSD1331_tinyscreen_arduino.cpp
  14. 34
      boards/addons/gdisp/board_SSD1331_tinyscreen_arduino.h
  15. 25
      boards/addons/gdisp/board_SSD1351_teensy.h
  16. 2
      boards/addons/gdisp/board_SSD1963_fsmc.h
  17. 2
      boards/addons/gdisp/board_SSD1963_gpio.h
  18. 14
      boards/addons/gdisp/board_UC8173_nordic_nrf52_sdk11.h
  19. 8
      boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h
  20. 8
      boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h
  21. 12
      boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h
  22. 12
      boards/addons/ginput/touch/MCU/ginput_lld_mouse_board_olimex_pic32mx_lcd.h
  23. 4
      boards/base/Altera-MAX10-Neek/gmouse_lld_FT5316_board.h
  24. 1
      boards/base/ArduinoTinyScreen/gfx/board_SSD1331.h
  25. 2
      boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h
  26. 8
      boards/base/Embest-STM32-DMSTF4BB/gmouse_lld_STMPE811_board.h
  27. 2
      boards/base/FireBull-STM32F103-FB/board_SSD1289.h
  28. 8
      boards/base/FireBull-STM32F103-FB/gmouse_lld_ADS7843_board.h
  29. 2
      boards/base/HY-MiniSTM32V/board_SSD1289.h
  30. 4
      boards/base/HY-MiniSTM32V/gmouse_lld_ADS7843_board.h
  31. 2
      boards/base/Marlin/board_RA8875.h
  32. 6
      boards/base/Marlin/gmouse_lld_FT5x06_board.h
  33. 2
      boards/base/Mikromedia-Plus-STM32-M4/board_SSD1963.h
  34. 8
      boards/base/Mikromedia-Plus-STM32-M4/gmouse_lld_STMPE610_board.h
  35. 2
      boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h
  36. 10
      boards/base/Mikromedia-STM32-M4-ILI9341/gmouse_lld_MCU_board.h
  37. 12
      boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h
  38. 12
      boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h
  39. 2
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_i2c.h
  40. 2
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_spi.h
  41. 2
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1331.h
  42. 2
      boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h
  43. 6
      boards/base/Olimex-SAM7EX256-GE8/gaudio_play_board.h
  44. 2
      boards/base/Olimex-STM32-LCD/board_ILI9320.h
  45. 10
      boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h
  46. 8
      boards/base/STM32F429i-Discovery/chibios/gmouse_lld_STMPE811_board.h
  47. 8
      boards/base/STM32F439i-Eval/CubeHal/gmouse_lld_EXC7200_board.h
  48. 6
      boards/base/STM32F469i-Discovery/CubeHAL/gmouse_lld_FT6x06_board.h
  49. 6
      boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h
  50. 6
      boards/base/STM32F746-Discovery/stm32f7_i2c.c
  51. 2
      boards/base/STM32F746-Discovery/stm32f7_i2c.h
  52. 8
      changelog.txt
  53. 4
      demos/3rdparty/notepad-2/main.c
  54. 10
      demos/3rdparty/notepad-2/notepadApp.c
  55. 6
      demos/3rdparty/notepad-2/notepadCore.c
  56. 8
      demos/applications/combo/bounce.c
  57. 142
      demos/applications/combo/main.c
  58. 8
      demos/applications/combo/mandelbrot.c
  59. 4
      demos/applications/combo/tasks.h
  60. 2
      demos/applications/mandelbrot/main.c
  61. 2
      demos/applications/notepad/main.c
  62. 2
      demos/benchmarks/main.c
  63. 86
      demos/games/justget10/jg10.c
  64. 2
      demos/games/justget10/main.c
  65. 2
      demos/games/minesweeper/main.c
  66. 66
      demos/games/minesweeper/mines.c
  67. 2
      demos/games/tetris/Example_Makefiles/stm32f4/board_SSD1289.h
  68. 2
      demos/games/tetris/Example_Makefiles/stm32f4/ginput_lld_mouse_board.h
  69. 8
      demos/games/tetris/Example_Makefiles/stm32f4/gmouse_lld_ADS7843_board.h
  70. 8
      demos/games/tetris/Example_Makefiles/stm32f4/gmouse_lld_ADS7843_board.h.old
  71. 2
      demos/games/tetris/Example_Makefiles/stm32f4_chibios_3.x/board_SSD1289.h
  72. 2
      demos/games/tetris/Example_Makefiles/stm32f4_chibios_3.x/ginput_lld_mouse_board.h
  73. 8
      demos/games/tetris/Example_Makefiles/stm32f4_chibios_3.x/gmouse_lld_ADS7843_board.h
  74. 2
      demos/games/tetris/main.c
  75. 80
      demos/games/tetris/tetris.c
  76. 14
      demos/modules/gadc/gwinosc.c
  77. 8
      demos/modules/gadc/main.c
  78. 14
      demos/modules/gaudio/oscilloscope/gwinosc.c
  79. 4
      demos/modules/gaudio/oscilloscope/main.c
  80. 2
      demos/modules/gaudio/play-vs1053/main.c
  81. 4
      demos/modules/gaudio/play-wave/main.c
  82. 2
      demos/modules/gdisp/basics/main.c
  83. 2
      demos/modules/gdisp/circles/main.c
  84. 2
      demos/modules/gdisp/fonts/main.c
  85. 2
      demos/modules/gdisp/fonts_cyrillic/main.c
  86. 4
      demos/modules/gdisp/multiple_displays/main.c
  87. 2
      demos/modules/gdisp/pixmap/main.c
  88. 2
      demos/modules/gdisp/polygons/main.c
  89. 2
      demos/modules/gdisp/thickarcs/main.c
  90. 2
      demos/modules/ginput/keyboard/main.c
  91. 6
      demos/modules/gos/threads/main.c
  92. 18
      demos/modules/gos/threads_advanced/main.c
  93. 6
      demos/modules/gtimer/main.c
  94. 2
      demos/modules/gtrans/basic/main.c
  95. 6
      demos/modules/gwin/basic/main.c
  96. 6
      demos/modules/gwin/button/main.c
  97. 4
      demos/modules/gwin/checkbox/main.c
  98. 8
      demos/modules/gwin/console/main.c
  99. 6
      demos/modules/gwin/container/main.c
  100. 12
      demos/modules/gwin/container_nested/main.c

20
boards/addons/gdisp/board_ED060SC4_example.h

@ -76,44 +76,44 @@ static void eink_delay(int us) {
}
/* Turn the E-ink panel Vdd supply (+3.3V) on or off. */
static GFXINLINE void setpower_vdd(GDisplay *g, bool_t on) {
static GFXINLINE void setpower_vdd(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOB, GPIOB_SMPS_CTRL, !on);
palWritePad(GPIOA, GPIOA_EINK_VDD, on);
}
/* Turn the E-ink panel negative supplies (-15V, -20V) on or off. */
static GFXINLINE void setpower_vneg(GDisplay *g, bool_t on) {
static GFXINLINE void setpower_vneg(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOA, GPIOA_VNEG_CTRL, on);
}
/* Turn the E-ink panel positive supplies (-15V, -20V) on or off. */
static GFXINLINE void setpower_vpos(GDisplay *g, bool_t on) {
static GFXINLINE void setpower_vpos(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOA, GPIOA_VPOS_CTRL, on);
}
/* Set the state of the LE (source driver Latch Enable) pin. */
static GFXINLINE void setpin_le(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_le(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_LE, on);
}
/* Set the state of the OE (source driver Output Enable) pin. */
static GFXINLINE void setpin_oe(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_oe(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_OE, on);
}
/* Set the state of the CL (source driver Clock) pin. */
static GFXINLINE void setpin_cl(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_cl(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_CL, on);
}
/* Set the state of the SPH (source driver Start Pulse Horizontal) pin. */
static GFXINLINE void setpin_sph(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_sph(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_SPH, on);
}
@ -125,19 +125,19 @@ static GFXINLINE void setpins_data(GDisplay *g, uint8_t value) {
}
/* Set the state of the CKV (gate driver Clock Vertical) pin. */
static GFXINLINE void setpin_ckv(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_ckv(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_CKV, on);
}
/* Set the state of the GMODE (gate driver Gate Mode) pin. */
static GFXINLINE void setpin_gmode(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_gmode(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOC, GPIOC_EINK_GMODE, on);
}
/* Set the state of the SPV (gate driver Start Pulse Vertical) pin. */
static GFXINLINE void setpin_spv(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_spv(GDisplay *g, gBool on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_SPV, on);
}

2
boards/addons/gdisp/board_HX8347D_stm32f4discovery.h

@ -103,7 +103,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if (state) {
CLR_RST;

2
boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h

@ -68,7 +68,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static noinline void setpin_reset(GDisplay *g, bool_t state) {
static noinline void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if (state)
palClearPad(IOPORTA, 7);

2
boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h

@ -68,7 +68,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if(state)
palClearPad(GPIOE, GPIOE_TFT_RST);

6
boards/addons/gdisp/board_ILI9341_spi.h

@ -83,14 +83,14 @@ static GFXINLINE void post_init_board(GDisplay *g) {
* @brief Set or clear the lcd reset pin.
*
* @param[in] g The GDisplay structure
* @param[in] state TRUE = lcd in reset, FALSE = normal operation
* @param[in] state gTrue = lcd in reset, gFalse = normal operation
*
* @notapi
*/
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if (state == TRUE) {
if (state) {
palClearPad(LCD_PORT, LCD_RES);
} else {
palSetPad(LCD_PORT, LCD_RES);

2
boards/addons/gdisp/board_ILI9481_firebullstm32f103.h

@ -53,7 +53,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;
}

2
boards/addons/gdisp/board_ILI9488_stm32f4cube_hal.h

@ -97,7 +97,7 @@ static GFXINLINE void post_init_board(GDisplay* g)
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay* g, bool_t state)
static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
{
(void) g;

2
boards/addons/gdisp/board_S6D1121_olimex_e407.h

@ -50,7 +50,7 @@ static GFXINLINE void init_board(GDisplay *g) {
}
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;
}

4
boards/addons/gdisp/board_SPFD54124B_stm32f3.h

@ -81,7 +81,7 @@ static GFXINLINE void soft_spi_write_9bit(uint16_t data){
}
#endif
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if(state) {
CLR_RST;
@ -100,7 +100,7 @@ static GFXINLINE void init_board(GDisplay *g) {
* SPI1 I/O pins setup.
*/
palSetPadMode(SPFD54124B_PIN_PORT, SPFD54124B_PIN_RST, PAL_MODE_OUTPUT_PUSHPULL); /* RESET */
setpin_reset(g, TRUE);
setpin_reset(g, gTrue);
#if USE_HARD_SPI
palSetPadMode(SPFD54124B_SPI_PORT, SPFD54124B_SPI_SCK, PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); /* SCK. */

2
boards/addons/gdisp/board_SSD1289_stm32f4discovery.h

@ -109,7 +109,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;
}

2
boards/addons/gdisp/board_SSD1306_chibios_16.1.3_stm32f4.h

@ -49,7 +49,7 @@ static GFXINLINE void post_init_board(GDisplay* g)
}
static GFXINLINE void setpin_reset(GDisplay* g, bool_t state)
static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
{
(void)g;

2
boards/addons/gdisp/board_SSD1306_i2c.h

@ -82,7 +82,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if(state)
CLR_RST

88
boards/addons/gdisp/board_SSD1331_tinyscreen_arduino.cpp

@ -1,88 +0,0 @@
#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
#include "board_SSD1331.h"
#define LCD_BOARD_ID 0 // 0 or 1 - set by the position of a resistor near SX1505 (see schematic and board design)
// GPIO Pins
#define GPIO_DC 0x01
#define GPIO_CS 0x02
#define GPIO_RES 0x08
#define GPIO_BTN1 0x10
#define GPIO_BTN2 0x20
#define GPIO_BTN3 0x40
#define GPIO_BTN4 0x80
#define GPIO_CMD_START ~(GPIO_CS|GPIO_DC)
#define GPIO_DATA_START ~GPIO_CS
#define GPIO_TRANSFER_END GPIO_CS
//GPIO Registers
#define GPIO_RegData 0x00
#define GPIO_RegDir 0x01
#define GPIO_RegPullUp 0x02
// Wire address of the SX1505 chip
#define GPIO_ADDR 0x20
static void writeGPIO(uint8_t regAddr, uint8_t regData)
{
uint8_t oldTWBR=TWBR;
TWBR=0;
Wire.beginTransmission(GPIO_ADDR + LCD_BOARD_ID);
Wire.write(regAddr);
Wire.write(regData);
Wire.endTransmission();
TWBR=oldTWBR;
}
static bool isDataMode = false;
static bool isCmdMode = false;
void SSD1331_init_board(void) {
//setup GPIO, reset SSD1331
writeGPIO(GPIO_RegData,~GPIO_RES);//reset low, CS/other pins high
writeGPIO(GPIO_RegDir,~GPIO_RES);//set reset to output
delay(5);
writeGPIO(GPIO_RegDir,~(GPIO_CS|GPIO_DC));//reset to input, CS/DC output
writeGPIO(GPIO_RegPullUp,GPIO_BTN1|GPIO_BTN2|GPIO_BTN3|GPIO_BTN4);//button pullup enable
//init SPI
SPI.begin();
SPI.setDataMode(SPI_MODE0);//wrong mode, works because we're only writing. this mode is compatible with SD cards.
SPI.setClockDivider(SPI_CLOCK_DIV2);
isDataMode = isCmdMode = false;
}
void SSD1331_setpin_reset(int state) {
// Ignore this as we did it in the init_board
}
void SSD1331_aquirebus(void) {
// Do nothing as we do it in the data transfer
}
void SSD1331_releasebus(void) {
if (!isDataMode && !isCmdMode) return;
writeGPIO(GPIO_RegData,GPIO_TRANSFER_END);
isDataMode = isCmdMode = false;
}
void SSD1331_write_cmd(uint8_t cmd) {
if (!isCmdMode) {
writeGPIO(GPIO_RegData,GPIO_CMD_START);
isDataMode = false;
isCmdMode = true;
}
SPI.transfer(cmd);
}
void SSD1331_write_data(uint8_t data) {
if (!isDataMode) {
writeGPIO(GPIO_RegData,GPIO_DATA_START);
isDataMode = true;
isCmdMode = false;
}
SPI.transfer(data);
}

34
boards/addons/gdisp/board_SSD1331_tinyscreen_arduino.h

@ -1,34 +0,0 @@
/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
* http://ugfx.org/license.html
*/
#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H
#define init_board(g) SSD1331_init_board()
#define post_init_board(g)
#define setpin_reset(g, state) SSD1331_setpin_reset(state)
#define acquire_bus(g) SSD1331_aquirebus()
#define release_bus(g) SSD1331_releasebus()
#define write_cmd(g, cmd) SSD1331_write_cmd(cmd)
#define write_data(g, data) SSD1331_write_data(data)
#ifdef __cplusplus
extern "C" {
#endif
void SSD1331_init_board(void);
void SSD1331_setpin_reset(int state);
void SSD1331_aquirebus(void);
void SSD1331_releasebus(void);
void SSD1331_write_cmd(uint8_t cmd);
void SSD1331_write_data(uint8_t data);
#ifdef __cplusplus
}
#endif
#endif /* _GDISP_LLD_BOARD_H */

25
boards/addons/gdisp/board_SSD1351_teensy.h

@ -8,17 +8,6 @@
#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
extern void ssd1351_init_board(void);
extern void ssd1351_setpin_reset(int state);
extern void ssd1351_acquire_bus(void);
extern void ssd1351_release_bus(void);
extern void ssd1351_write_cmd(unsigned char index);
extern void ssd1351_write_data(unsigned char data);
#define init_board(g) ssd1351_init_board()
#define post_init_board(g)
#define setpin_reset(g, s) ssd1351_setpin_reset(s)
@ -28,8 +17,20 @@ extern void ssd1351_write_data(unsigned char data);
#define write_cmd(g, i) ssd1351_write_cmd(i)
#define write_data(g, d) ssd1351_write_cmd(d)
/* This test is needed as this file is also included in the .cpp file providing the below functions */
#ifdef __cplusplus
extern "C" {
#endif
void ssd1351_init_board(void);
void ssd1351_setpin_reset(int state);
void ssd1351_acquire_bus(void);
void ssd1351_release_bus(void);
void ssd1351_write_cmd(unsigned char index);
void ssd1351_write_data(unsigned char data);
#ifdef __cplusplus
}
#endif // __cplusplus
#endif
#endif /* _GDISP_LLD_BOARD_H */

2
boards/addons/gdisp/board_SSD1963_fsmc.h

@ -81,7 +81,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
FSMC_Bank1->BTCR[0] = FSMC_BCR1_MWID_0 | FSMC_BCR1_WREN | FSMC_BCR1_MBKEN;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;
}

2
boards/addons/gdisp/board_SSD1963_gpio.h

@ -72,7 +72,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;
}

14
boards/addons/gdisp/board_UC8173_nordic_nrf52_sdk11.h

@ -16,7 +16,7 @@
static const nrf_drv_spi_t spi = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE);
static GFXINLINE bool_t init_board(GDisplay* g)
static GFXINLINE gBool init_board(GDisplay* g)
{
nrf_drv_spi_config_t spi_config;
ret_code_t err = NRF_SUCCESS;
@ -47,10 +47,10 @@ static GFXINLINE bool_t init_board(GDisplay* g)
spi_config.bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST;
err = nrf_drv_spi_init(&spi, &spi_config, 0);
if (err != NRF_SUCCESS) {
return FALSE;
return gFalse;
}
return TRUE;
return gTrue;
}
static GFXINLINE void post_init_board(GDisplay* g)
@ -58,7 +58,7 @@ static GFXINLINE void post_init_board(GDisplay* g)
(void)g;
}
static GFXINLINE void setpin_reset(GDisplay* g, bool_t state)
static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
{
(void)g;
@ -69,14 +69,14 @@ static GFXINLINE void setpin_reset(GDisplay* g, bool_t state)
}
}
static GFXINLINE bool_t getpin_busy(GDisplay* g)
static GFXINLINE gBool getpin_busy(GDisplay* g)
{
(void)g;
if (nrf_gpio_pin_read(PIN_BUSY) == 1) {
return TRUE;
return gTrue;
} else {
return FALSE;
return gFalse;
}
}

8
boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h

@ -34,17 +34,17 @@ static const SPIConfig spicfg = {
// How much extra data to allocate at the end of the GMouse structure for the board's use
#define GMOUSE_ADS7843_BOARD_DATA_SIZE 0
static bool_t init_board(GMouse* m, unsigned driverinstance) {
static gBool init_board(GMouse* m, unsigned driverinstance) {
(void) m;
if (driverinstance)
return FALSE;
return gFalse;
spiStart(&SPID2, &spicfg);
return TRUE;
return gTrue;
}
static GFXINLINE bool_t getpin_pressed(GMouse* m) {
static GFXINLINE gBool getpin_pressed(GMouse* m) {
(void) m;
return (!palReadPad(GPIOG, 0));

8
boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h

@ -45,11 +45,11 @@ static const SPIConfig spicfg = {
// How much extra data to allocate at the end of the GMouse structure for the board's use
#define GMOUSE_ADS7843_BOARD_DATA_SIZE 0
static bool_t init_board(GMouse* m, unsigned driverinstance) {
static gBool init_board(GMouse* m, unsigned driverinstance) {
(void) m;
if (driverinstance)
return FALSE;
return gFalse;
palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) ); /* SCK */
palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) ); /* MISO */
@ -57,10 +57,10 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); /* CS */
spiStart(&SPID2, &spicfg);
return TRUE;
return gTrue;
}
static GFXINLINE bool_t getpin_pressed(GMouse* m) {
static GFXINLINE gBool getpin_pressed(GMouse* m) {
(void) m;
return (!palReadPad(GPIOC, 5));

12
boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h

@ -16,7 +16,7 @@
static SPI_HandleTypeDef _hspi;
static bool_t init_board(GMouse* m, unsigned driverinstance)
static gBool init_board(GMouse* m, unsigned driverinstance)
{
GPIO_InitTypeDef GPIO_InitStruct;
@ -93,20 +93,20 @@ static bool_t init_board(GMouse* m, unsigned driverinstance)
_hspi.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
_hspi.Init.CRCPolynomial = 10;
if (HAL_SPI_Init(&_hspi) != HAL_OK) {
return FALSE;
return gFalse;
}
return TRUE;
return gTrue;
}
static GFXINLINE bool_t getpin_pressed(GMouse* m)
static GFXINLINE gBool getpin_pressed(GMouse* m)
{
(void)m;
if (HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_4) == GPIO_PIN_RESET)
return TRUE;
return gTrue;
return FALSE;
return gFalse;
}
static GFXINLINE void aquire_bus(GMouse* m)

12
boards/addons/ginput/touch/MCU/ginput_lld_mouse_board_olimex_pic32mx_lcd.h

@ -59,18 +59,18 @@ static const ADCConversionGroup ADC_Y_CG = {
.channels = 1 << YPOS,
};
static bool_t init_board(GMouse *m, unsigned driverinstance) {
static gBool init_board(GMouse *m, unsigned driverinstance) {
(void) m;
if (driverinstance)
return FALSE;
return gFalse;
adcObjectInit(&ADCD);
adcStart(&ADCD, &ADCC);
return TRUE;
return gTrue;
}
static bool_t read_xyz(GMouse *m, GMouseReading *prd) {
static gBool read_xyz(GMouse *m, GMouseReading *prd) {
adcsample_t samples[2];
prd->buttons = 0;
@ -89,7 +89,7 @@ static bool_t read_xyz(GMouse *m, GMouseReading *prd) {
// Shortcut - no need to read X or Y if the touch is off.
if (pdr->z < GMOUSE_MCU_Z_TOUCHON)
return TRUE;
return gTrue;
// Read X
palSetPadMode(IOPORTB, XPOS, PAL_MODE_OUTPUT);
@ -111,7 +111,7 @@ static bool_t read_xyz(GMouse *m, GMouseReading *prd) {
adcConvert(&ADCD, &ADC_X_CG, &samples[0], 1);
pdr->y = ADC_MAX - samples[0];
return TRUE;
return gTrue;
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */

4
boards/base/Altera-MAX10-Neek/gmouse_lld_FT5316_board.h

@ -66,14 +66,14 @@ static unsigned int device_read_16(unsigned char device_address, unsigned char s
return (0xFFFF & ((rdata_h << 8) | rdata_l));
}
static bool_t init_board(GMouse* m, unsigned instance)
static gBool init_board(GMouse* m, unsigned instance)
{
(void)m;
(void)instance;
I2C_init(I2C_OPENCORES_0_BASE, 50000000, 400000);
return TRUE;
return gTrue;
}
static void write_reg(GMouse* m, uint8_t reg, uint8_t val)

1
boards/base/ArduinoTinyScreen/gfx/board_SSD1331.h

@ -16,6 +16,7 @@
#define write_cmd(g, cmd) SSD1331_write_cmd(cmd)
#define write_data(g, data) SSD1331_write_data(data)
/* This test is needed as this file is also included in the .cpp file providing the below functions */
#ifdef __cplusplus
extern "C" {
#endif

2
boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h

@ -99,7 +99,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if (state) {
CLR_RST;

8
boards/base/Embest-STM32-DMSTF4BB/gmouse_lld_STMPE811_board.h

@ -43,12 +43,12 @@ static const I2CConfig i2ccfg = {
FAST_DUTY_CYCLE_2,
};
static bool_t init_board(GMouse* m, unsigned driverinstance) {
static gBool init_board(GMouse* m, unsigned driverinstance) {
(void) m;
// This board only supports one touch panel
if (driverinstance)
return FALSE;
return gFalse;
palSetPadMode(GPIOC, 13, PAL_MODE_INPUT | PAL_STM32_PUDR_FLOATING); /* TP IRQ */
palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); /* SCL */
@ -56,11 +56,11 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
i2cStart(&I2CD1, &i2ccfg);
return TRUE;
return gTrue;
}
#if GMOUSE_STMPE811_GPIO_IRQPIN
static bool_t getpin_irq(GMouse* m) {
static gBool getpin_irq(GMouse* m) {
(void) m;
return !palReadPad(GPIOC, 13);

2
boards/base/FireBull-STM32F103-FB/board_SSD1289.h

@ -48,7 +48,7 @@ static GFXINLINE void post_init_board(GDisplay *g)
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state)
static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
{
(void) g;
(void) state;

8
boards/base/FireBull-STM32F103-FB/gmouse_lld_ADS7843_board.h

@ -26,13 +26,13 @@ static const SPIConfig spicfg = {
/* SPI_CR1_BR_2 |*/ SPI_CR1_BR_1 | SPI_CR1_BR_0,
};
static bool_t init_board(GMouse* m, unsigned driverinstance)
static gBool init_board(GMouse* m, unsigned driverinstance)
{
(void)m;
// Only one touch interface on this board
if (driverinstance)
return FALSE;
return gFalse;
// Set the GPIO modes
palSetPadMode(GPIOC, 4, PAL_MODE_INPUT_PULLUP);
@ -40,10 +40,10 @@ static bool_t init_board(GMouse* m, unsigned driverinstance)
// Start the SPI peripheral
spiStart(&SPID1, &spicfg);
return TRUE;
return gTrue;
}
static GFXINLINE bool_t getpin_pressed(GMouse* m)
static GFXINLINE gBool getpin_pressed(GMouse* m)
{
(void) m;

2
boards/base/HY-MiniSTM32V/board_SSD1289.h

@ -124,7 +124,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if(state) {}

4
boards/base/HY-MiniSTM32V/gmouse_lld_ADS7843_board.h

@ -46,7 +46,7 @@ static const SPIConfig spicfg = {
* TP_IRQ PB6
*/
static bool_t init_board(GMouse* m, unsigned driverinstance) {
static gBool init_board(GMouse* m, unsigned driverinstance) {
(void) m;
(void) driverinstance;
@ -63,7 +63,7 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
/*
* PB6 is connected to TP_IRQ (low active).
*/
static GFXINLINE bool_t getpin_pressed(GMouse* m) {
static GFXINLINE gBool getpin_pressed(GMouse* m) {
(void)m;
return (!palReadPad(GPIOB, 6));
}

2
boards/base/Marlin/board_RA8875.h

@ -70,7 +70,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
FSMC_Bank1->BTCR[2] = FSMC_BCR1_MWID_0 | FSMC_BCR1_WREN | FSMC_BCR1_MBKEN;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;
}

6
boards/base/Marlin/gmouse_lld_FT5x06_board.h

@ -32,13 +32,13 @@ static const I2CConfig i2ccfg2 = {
FAST_DUTY_CYCLE_2,
};
static bool_t init_board(GMouse* m, unsigned driverinstance) {
static gBool init_board(GMouse* m, unsigned driverinstance) {
(void) m;
// We only support one of these on this board
if (driverinstance)
return FALSE;
return TRUE;
return gFalse;
return gTrue;
}
static GFXINLINE void aquire_bus(GMouse* m) {

2
boards/base/Mikromedia-Plus-STM32-M4/board_SSD1963.h

@ -68,7 +68,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if (state) {
CLR_RST;

8
boards/base/Mikromedia-Plus-STM32-M4/gmouse_lld_STMPE610_board.h

@ -43,12 +43,12 @@ static const I2CConfig i2ccfg = {
FAST_DUTY_CYCLE_2,
};
static bool_t init_board(GMouse* m, unsigned driverinstance) {
static gBool init_board(GMouse* m, unsigned driverinstance) {
(void) m;
// This board only supports one touch panel
if (driverinstance)
return FALSE;
return gFalse;
palSetPadMode(GPIOA, 0, PAL_MODE_INPUT | PAL_STM32_PUDR_FLOATING); /* TP IRQ */
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); /* SCL */
@ -56,11 +56,11 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
i2cStart(&I2CD1, &i2ccfg);
return TRUE;
return gTrue;
}
#if GMOUSE_STMPE610_GPIO_IRQPIN
static bool_t getpin_irq(GMouse* m) {
static gBool getpin_irq(GMouse* m) {
(void) m;
return !palReadPad(GPIOA, 0);

2
boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h

@ -39,7 +39,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if(state) {
// reset lcd

10
boards/base/Mikromedia-STM32-M4-ILI9341/gmouse_lld_MCU_board.h

@ -41,12 +41,12 @@ static const ADCConversionGroup adcgrpcfg = {
ADC_SQR3_SQ2_N(ADC_CHANNEL_IN8) | ADC_SQR3_SQ1_N(ADC_CHANNEL_IN9)
};
static bool_t init_board(GMouse *m, unsigned driverinstance) {
static gBool init_board(GMouse *m, unsigned driverinstance) {
(void) m;
// Only one touch interface on this board
if (driverinstance)
return FALSE;
return gFalse;
adcStart(&ADCD1, 0);
@ -54,10 +54,10 @@ static bool_t init_board(GMouse *m, unsigned driverinstance) {
palClearPad(GPIOB, GPIOB_DRIVEA);
palClearPad(GPIOB, GPIOB_DRIVEB);
chThdSleepMilliseconds(1); // Settling time
return TRUE;
return gTrue;
}
static bool_t read_xyz(GMouse *m, GMouseReading *prd) {
static gBool read_xyz(GMouse *m, GMouseReading *prd) {
adcsample_t samples[ADC_NUM_CHANNELS * ADC_BUF_DEPTH];
(void) m;
@ -89,7 +89,7 @@ static bool_t read_xyz(GMouse *m, GMouseReading *prd) {
palClearPad(GPIOB, GPIOB_DRIVEA);
palClearPad(GPIOB, GPIOB_DRIVEB);
}
return TRUE;
return gTrue;
}
#endif /* _LLD_GMOUSE_MCU_BOARD_H */

12
boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h

@ -57,7 +57,7 @@ static const PWMConfig pwmcfg = {
},
};
static bool_t pwmRunning = FALSE;
static gBool pwmRunning = gFalse;
/**
* @brief Initialise the board for the display.
@ -123,7 +123,7 @@ static GFXINLINE void init_board(GDisplay *g) {
pSPI->SPI_CSR[0] = 0x01010311; //9bit, CPOL=1, ClockPhase=0, SCLK = 48Mhz/3 = 16MHz
/* Display backlight control at 100% */
pwmRunning = FALSE;
pwmRunning = gFalse;
palSetPad(IOPORT2, PIOB_LCD_BL);
break;
}
@ -133,7 +133,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if (state)
palClearPad(IOPORT1, PIOA_LCD_RESET);
@ -147,21 +147,21 @@ static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
/* Turn the pin on - No PWM */
if (pwmRunning) {
pwmStop(&PWMD2);
pwmRunning = FALSE;
pwmRunning = gFalse;
}
palSetPad(IOPORT2, PIOB_LCD_BL);
} else if (percent == 0) {
/* Turn the pin off - No PWM */
if (pwmRunning) {
pwmStop(&PWMD2);
pwmRunning = FALSE;
pwmRunning = gFalse;
}
palClearPad(IOPORT2, PIOB_LCD_BL);
} else {
/* Use the PWM */
if (!pwmRunning) {
pwmStart(&PWMD2, &pwmcfg);
pwmRunning = TRUE;
pwmRunning = gTrue;
}
pwmEnableChannel(&PWMD2, 0, PWM_VALUE(percent));
}

12
boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h

@ -56,7 +56,7 @@ static const PWMConfig pwmcfg = {
},
};
static bool_t pwmRunning = FALSE;
static gBool pwmRunning = gFalse;
/**
* @brief Initialise the board for the display.
@ -121,7 +121,7 @@ static GFXINLINE void init_board(GDisplay *g) {
pSPI->SPI_CSR[0] = 0x00000311; //9bit, CPOL=1, ClockPhase=0, SCLK = 48Mhz/3 = 16MHz
/* Display backlight control at 100% */
pwmRunning = FALSE;
pwmRunning = gFalse;
palSetPad(IOPORT2, PIOB_LCD_BL);
break;
}
@ -131,7 +131,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if (state)
palClearPad(IOPORT1, PIOA_LCD_RESET);
@ -145,21 +145,21 @@ static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
/* Turn the pin on - No PWM */
if (pwmRunning) {
pwmStop(&PWMD2);
pwmRunning = FALSE;
pwmRunning = gFalse;
}
palSetPad(IOPORT2, PIOB_LCD_BL);
} else if (percent == 0) {
/* Turn the pin off - No PWM */
if (pwmRunning) {
pwmStop(&PWMD2);
pwmRunning = FALSE;
pwmRunning = gFalse;
}
palClearPad(IOPORT2, PIOB_LCD_BL);
} else {
/* Use the PWM */
if (!pwmRunning) {
pwmStart(&PWMD2, &pwmcfg);
pwmRunning = TRUE;
pwmRunning = gTrue;
}
pwmEnableChannel(&PWMD2, 0, PWM_VALUE(percent));
}

2
boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_i2c.h

@ -102,7 +102,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;
}

2
boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_spi.h

@ -175,7 +175,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;

2
boards/base/Olimex-SAM7EX256-GE8/board_SSD1331.h

@ -172,7 +172,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;

2
boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h

@ -161,7 +161,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
(void) state;

6
boards/base/Olimex-SAM7EX256-GE8/gaudio_play_board.h

@ -35,15 +35,15 @@ static GPTConfig gptcfg = {
static uint16_t lastvalue;
static bool gaudio_play_pwm_setup(uint32_t frequency, ArrayDataFormat format) {
static gBool gaudio_play_pwm_setup(uint32_t frequency, ArrayDataFormat format) {
if (format == ARRAY_DATA_10BITUNSIGNED)
pwmcfg.period = 1024;
else if (format == ARRAY_DATA_8BITUNSIGNED)
pwmcfg.period = 256;
else
return FALSE;
return gFalse;
gptcfg.frequency = frequency;
return TRUE;
return gTrue;
}
static void gaudio_play_pwm_start(void) {

2
boards/base/Olimex-STM32-LCD/board_ILI9320.h

@ -45,7 +45,7 @@ static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) g;
if(state)

10
boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h

@ -58,22 +58,22 @@ static GFXINLINE void setup_z(void) {
palSetPad(GPIOC, 3);
}
static bool_t init_board(GMouse *m, unsigned driverinstance) {
static gBool init_board(GMouse *m, unsigned driverinstance) {
(void) m;
// Only one touch interface on this board
if (driverinstance)
return FALSE;
return gFalse;
adcStart(&ADCD1, 0);
// Set up for reading Z
setup_z();
chThdSleepMilliseconds(1); // Settling time
return TRUE;
return gTrue;
}
static bool_t read_xyz(GMouse *m, GMouseReading *prd) {
static gBool read_xyz(GMouse *m, GMouseReading *prd) {
adcsample_t samples[ADC_NUM_CHANNELS * ADC_BUF_DEPTH];
uint16_t val1, val2;
(void) m;
@ -130,7 +130,7 @@ static bool_t read_xyz(GMouse *m, GMouseReading *prd) {
// Set up for reading z again. We know it will be 20ms before we get called again so don't worry about settling time
setup_z();
}
return TRUE;
return gTrue;
}
#endif /* _LLD_GMOUSE_MCU_BOARD_H */

8
boards/base/STM32F429i-Discovery/chibios/gmouse_lld_STMPE811_board.h

@ -42,12 +42,12 @@ static const I2CConfig i2ccfg = {
FAST_DUTY_CYCLE_2,
};
static bool_t init_board(GMouse* m, unsigned driverinstance) {
static gBool init_board(GMouse* m, unsigned driverinstance) {
(void) m;
// This board only supports one touch panel
if (driverinstance)
return FALSE;
return gFalse;
// Set pin modes
#if CH_KERNEL_MAJOR == 2
@ -63,11 +63,11 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
// Start the I2C
i2cStart(&I2CD3, &i2ccfg);
return TRUE;
return gTrue;
}
#if GMOUSE_STMPE811_GPIO_IRQPIN
static bool_t getpin_irq(GMouse* m) {
static gBool getpin_irq(GMouse* m) {
(void) m;
return !palReadPad(GPIOA, 15);

8
boards/base/STM32F439i-Eval/CubeHal/gmouse_lld_EXC7200_board.h

@ -40,7 +40,7 @@
static I2C_HandleTypeDef _i2cHandle;
static bool_t init_board(GMouse* m, unsigned driverinstance)
static gBool init_board(GMouse* m, unsigned driverinstance)
{
GPIO_InitTypeDef GPIO_InitStruct;
@ -79,17 +79,17 @@ static bool_t init_board(GMouse* m, unsigned driverinstance)
_i2cHandle.Init.NoStretchMode = I2C_NOSTRETCH_DISABLED;
HAL_I2C_Init(&_i2cHandle);
return TRUE;
return gTrue;
}
static bool_t read_bytes(GMouse* m, uint8_t reg, uint8_t* buffer, uint8_t nbrBytes)
static gBool read_bytes(GMouse* m, uint8_t reg, uint8_t* buffer, uint8_t nbrBytes)
{
(void)m;
HAL_I2C_Master_Transmit(&_i2cHandle, (uint16_t)EXC7200_SLAVE_ADDR, (uint8_t*)&reg, 1, 10000);
HAL_I2C_Master_Receive(&_i2cHandle, (uint16_t)EXC7200_SLAVE_ADDR, buffer, nbrBytes, 10000);
return TRUE;
return gTrue;
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */

6
boards/base/STM32F469i-Discovery/CubeHAL/gmouse_lld_FT6x06_board.h

@ -30,7 +30,7 @@ I2C_HandleTypeDef i2cHandle;
/* Maximum speed (400kHz) */
#define CLOCKSPEED 400000;
static bool_t init_board(GMouse* m, unsigned instance) {
static gBool init_board(GMouse* m, unsigned instance) {
(void)m;
(void)instance;
@ -69,9 +69,9 @@ static bool_t init_board(GMouse* m, unsigned instance) {
__HAL_RCC_I2C1_CLK_ENABLE();
if(HAL_I2C_Init(&i2cHandle) == HAL_OK)
return TRUE;
return gTrue;
return FALSE;
return gFalse;
}
static GFXINLINE void aquire_bus(GMouse* m) {

6
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)

6
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)

2
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);

8
changelog.txt

@ -15,8 +15,16 @@ FEATURE: Added GFX_COMPAT_V2 to maintain source compatibility with V2.x programs
FEATURE: Added GFX_COMPAT_OLDCOLORS to allow V2.x Red, Green, Blue color names. It is turned on by default.
CHANGE: Added GFX_RED, GFX_BLUE, GFX_GREEN etc to replace V2.x Red, Gree, Blue color names
CHANGE: Added GFXON/GFXOFF to replace V2.x TRUE/FALSE for configuration options.
CHANGE: Added gBool type and gTrue/gFalse to replace TRUE/FALSE for booleans.
CHANGE: Added types gI8, gU8 .. gI32, gU32 to replace V2.x int8_t etc
CHANGE: Added types gPtr and gPtrDiff
FEATURE: Added gI64 and gU64 when the compiler supports it. GFX_TYPE_64 macro is defined as GFXON if it does.
FEATURE: Fixed headers to ensure size_t, NULL are always defined. size_t is not used as it may be 64bit.
FIX: Added gfxRealloc() to Qt port
FIX: Fixed UC1610 driver private area initialisation
FIX: Fixed ST7735 driver and added kapacuk changes
FEATURE: Added keyboard support to radio buttons (by Steffan)
FEATURE: Added internal use only GFX_COMPILESTAGE (used to control compilation)
*** Release 2.8 ***

4
demos/3rdparty/notepad-2/main.c

@ -81,13 +81,13 @@ int main(void) {
gfxInit();
/* Calibrate the touchscreen */
ginputSetMouseCalibrationRoutines(0, NULL, tsCalibRead, FALSE);
ginputSetMouseCalibrationRoutines(0, NULL, tsCalibRead, gFalse);
ginputGetMouse(0);
// Set the color scheme
nSetColorScheme(schemeDefault);
while (TRUE) {
while (1) {
gfxThreadWait(nLaunchNotepadApp());
gdispSetClip(0, 0, gdispGetWidth(), gdispGetHeight());

10
demos/3rdparty/notepad-2/notepadApp.c

@ -73,7 +73,7 @@ static NColorScheme nCurColorScheme;
static DECLARE_THREAD_FUNCTION(notepadThread, param);
// Custom drawing functions for the buttons
static void nbtnColorBarDraw(GHandle gh, bool_t enabled, bool_t isdown, const char *txt, const GButtonDrawStyle *pstyle, void *param) {
static void nbtnColorBarDraw(GHandle gh, gBool enabled, gBool isdown, const char *txt, const GButtonDrawStyle *pstyle, void *param) {
#define ccs nCurColorScheme
int i, j, k;