This is the chip specific include file for T32CM11 GPIO Driver note that there is a common include file for this HAL module that contains the APIs (such as the init function) that should be used by the application. More...
#include "tr_hal_platform.h"
Go to the source code of this file.
Data Structures | |
struct | GPIO_REGISTERS_T |
struct | SYS_CTRL_REGISTERS_T |
offsets for where to find chip registers needed for System Control register which is used to configure GPIO pins (what mode are they in and pull up/down and open drain enable, etc see section 19.3 in the chip datasheet More... | |
struct | tr_hal_gpio_settings_t |
Macros | |
#define | TR_HAL_MAX_PIN_NUMBER (32) |
max pin number | |
#define | CHIP_MEMORY_MAP_GPIO_BASE (0x40000000UL) |
chip register addresses section 3.1 of the data sheet explains the Memory map. this gives the base address for how to write the chip registers the chip registers are how the software interacts configures GPIOs, reads GPIOs, and gets/sets information on the chip We create a struct below that addresses the individual registers. This makes it so we can use this base address and a struct field to read or write a chip register | |
#define | CHIP_MEMORY_MAP_SYS_CTRL_BASE (0x40800000UL) |
#define | set_output_high state |
#define | set_output_low interrupt_status |
#define | GPIO_CHIP_REGISTERS ((GPIO_REGISTERS_T *) CHIP_MEMORY_MAP_GPIO_BASE) |
#define | TR_HAL_NUM_PULL_REGISTERS 4 |
defines for dealing with the SYS_CTRL pull registers, mode registers, and drive registers | |
#define | TR_HAL_PINS_PER_PULL_REG 8 |
#define | TR_HAL_NUM_MODE_REGISTERS 4 |
#define | TR_HAL_PINS_PER_MODE_REG 8 |
#define | TR_HAL_NUM_DRIVE_REGISTERS 2 |
#define | TR_HAL_PINS_PER_DRIVE_REG 16 |
#define | SYS_CTRL_CHIP_REGISTERS ((SYS_CTRL_REGISTERS_T *) CHIP_MEMORY_MAP_SYS_CTRL_BASE) |
#define | SCC_UART0_CLOCK_BIT 16 |
#define | SCC_UART1_CLOCK_BIT 17 |
#define | SCC_UART2_CLOCK_BIT 18 |
#define | TR_HAL_ENABLE_LITE_SLEEP 1 |
#define | TR_HAL_ENABLE_DEEP_SLEEP 2 |
#define | DEFAULT_GPIO_OUTPUT_CONFIG |
#define | DEFAULT_GPIO_INPUT_CONFIG |
Typedefs | |
typedef void(* | tr_hal_gpio_event_callback_t) (tr_hal_gpio_pin_t pin, tr_hal_gpio_event_t event) |
This is the chip specific include file for T32CM11 GPIO Driver note that there is a common include file for this HAL module that contains the APIs (such as the init function) that should be used by the application.
this chip has 32 numbered GPIOs, from 0-31 GPIOs 10,11,12,13 and 18,19 and 24,25,26,27 are not available for use
GPIOs are set to a mode that determines their function (GPIO, UART, SPI, etc) GPIOs can be set as input or output the drive strength, open drain, pull up, pull down, debounce can all be set
the user is encouraged to use the GPIO settings struct (tr_hal_gpio_settings_t) and tr_hal_gpio_init to set GPIO pins, since there is error checking in the init function
SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com