|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
EK-RA8D2 BSP – GoodIX GT911 bring-up on the board's own I2C wiring. More...
#include "ra8_board_ek_ra8d2_touch.h"#include <stdint.h>#include "ra8_board_ek_ra8d2.h"#include "ra8_cgc.h"#include "ra8_check.h"#include "ra8_err.h"#include "ra8_i2c_bus_ops.h"#include "ra8_i3c.h"#include "ra8_io_i2c_bus.h"#include "ra8_io_i2c_bus_i3c_compat.h"#include "ra8_touch.h"Go to the source code of this file.
Functions | |
| ra8_err_t | ra8_board_touch_open (const ra8_board_touch_cfg_t *cfg) |
| Bring the on-board GT911 up and open the touch driver against it. | |
Variables | |
| static const char *const | s_tag = "ra8_board.touch" |
| Module log tag. | |
| static ra8_io_i2c_bus_t | s_touch_bus = {} |
| Bound bus handle the touch driver's injected seam points at. | |
EK-RA8D2 BSP – GoodIX GT911 bring-up on the board's own I2C wiring.
Spends the three board facts in ra8_board_touch_wiring_t plus the live PCLKA on the four-call sequence eight applications used to write out by hand. Like the rest of the BSP it touches no MCU registers itself: ra8_i3c owns the IIC_B / I3C citations and ra8_touch owns the GT911 protocol.
Compiled into an application only when it declares ra8_io or ra8_io_bus in LIBS (see cmake/ra8_app/sources.cmake): the bus facade this unit binds through lives in libs/ra8_io.
Definition in file ra8_board_ek_ra8d2_touch.c.
|
nodiscard |
Bring the on-board GT911 up and open the touch driver against it.
Reads PCLKA from ra8_cgc_get_clock_hz and initialises the board's I3C channel in I2C-compatibility mode at k_ra8_board_touch_bus_hz against that live rate, binds the channel through the ra8_io_i2c_bus facade, projects it as an ra8_i2c_bus_ops_t, and opens ra8_touch at k_ra8_board_touch_target_7b.
| [in] | cfg | Application-side settings; see ra8_board_touch_cfg_t. Must not be null. max_points must be 0 or at most k_ra8_touch_max_points. |
| k_ra8_ok | The GT911 answered and the driver is open. |
| k_ra8_err_null_ptr | cfg was null. |
| k_ra8_err_invalid_arg | max_points exceeds the GT911's capacity. |
| k_ra8_err_invalid_state | ra8_touch_open was already called. |
| k_ra8_err_hw_timeout | The I3C block did not come out of module stop, or the GT911 did not answer. |
| k_ra8_err_* | Any other code propagated unchanged from ra8_i3c_init or ra8_touch_open. |
Definition at line 60 of file ra8_board_ek_ra8d2_touch.c.
References ra8_board_touch_cfg_t::irq_pin, k_ra8_board_touch_bus_hz, k_ra8_board_touch_i3c_channel, k_ra8_board_touch_target_7b, k_ra8_clock_id_pclka, k_ra8_err_invalid_arg, k_ra8_i3c_mode_i2c, k_ra8_ok, k_ra8_touch_max_points, ra8_board_touch_cfg_t::max_points, ra8_cgc_get_clock_hz(), RA8_CHECK_NULL_PTR, ra8_i3c_init(), ra8_io_i2c_bus_as_ops(), ra8_io_i2c_bus_bind_i3c_compat(), ra8_touch_open(), s_tag, and s_touch_bus.
Referenced by app_bringup_touch(), cm_bringup_touch(), ez_bringup_touch(), internal_tc_touch_bringup(), main(), mg_bringup_touch(), and sh_input_init().
|
static |
Module log tag.
Definition at line 39 of file ra8_board_ek_ra8d2_touch.c.
|
static |
Bound bus handle the touch driver's injected seam points at.
ra8_touch keeps the ra8_i2c_bus_ops_t it is handed, and those ops carry a pointer back to this handle, so the handle must out-live the open driver. There is one GT911 on one board, so one module-owned handle is the whole requirement – which is what lets ra8_board_touch_open take no bus argument.
Definition at line 58 of file ra8_board_ek_ra8d2_touch.c.
Referenced by ra8_board_touch_open().