Routines for accessing global resources shared across multiple drivers.
Functions | |
uint32_t | _cyhal_system_chipcontrol (volatile uint32_t *addr_reg, volatile uint32_t *ctrl_reg, uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to a chip control register. More... | |
uint32_t | _cyhal_system_common_chipcontrol (volatile uint32_t *reg, uint32_t clear_mask, uint32_t set_mask) |
Write to a common chip control register. More... | |
uint32_t | _cyhal_system_chipstatus (volatile uint32_t *addr_reg, volatile uint32_t *status_reg, uint8_t reg_offset) |
Read from a chip status register. More... | |
static uint32_t | _cyhal_system_gci_chipcontrol (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to GCI chip control register. More... | |
static uint32_t | _cyhal_system_gci_chipstatus (uint8_t reg_offset) |
Read from GCI chip status register. More... | |
static uint32_t | _cyhal_system_gci_gpiocontrol (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to GCI GPIO control register. More... | |
static uint32_t | _cyhal_system_gci_gpiostatus (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to GCI GPIO status register. More... | |
static uint32_t | _cyhal_system_gci_gpiowakemask (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to GCI GPIO wake make register. More... | |
static uint32_t | _cyhal_system_pmu_chipcontrol (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to PMU chip control register. More... | |
static uint32_t | _cyhal_system_pmu_res_updown_time (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to PMU resource up/down register. More... | |
static uint32_t | _cyhal_system_pmu_res_dep_mask (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to PMU resource dependency mask register. More... | |
static uint32_t | _cyhal_system_pmu_regulatorcontrol (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to PMU regulator control register. More... | |
static uint32_t | _cyhal_system_pmu_pllcontrol (uint8_t reg_offset, uint32_t clear_mask, uint32_t set_mask) |
Write to PMU PLL control register. More... | |
void | _cyhal_system_pinmux_connect (cyhal_gpio_t pin, int gci_chipcontrol_mux) |
Connect pin multiplexer. More... | |
bool | _cyhal_system_irq_remap_sink (uint8_t bus_line_num, uint8_t sink_num) |
Route an interrupt bus line to an external interrupt. More... | |
bool | _cyhal_system_irq_remap_source (uint32_t wrapper_addr, uint8_t source_num, uint8_t bus_line_num) |
Route an interrupt source to an interrupt bus line. More... | |
void | _cyhal_syspm_register_peripheral_callback (cyhal_syspm_callback_data_t *callback_data) |
Register an internal peripheral callback. More... | |
void | _cyhal_syspm_unregister_peripheral_callback (cyhal_syspm_callback_data_t *callback_data) |
Unregister an internal peripheral callback. More... | |
void | _cyhal_system_timer_enable_irq (void) |
Enable external interrupts from Timer to APPS Core. | |
static void | _cyhal_system_timer_disable_irq (void) |
Disable external interrupts from Timer to APPS Core. | |
static void | _cyhal_system_chipcommon_disable_irq (void) |
Disable external interrupts from ChipCommon to APPS Core. | |
static void | _cyhal_system_chipcommon_enable_irq (void) |
Enable external interrupts from ChipCommon to APPS Core. | |
static void | _cyhal_system_m2m_disable_irq (void) |
Disable external interrupts from M2M_ExtIRQn to APPS Core. | |
static void | _cyhal_system_m2m_enable_irq (void) |
Enable external interrupts from M2M_ExtIRQn to APPS Core. | |
static void | _cyhal_system_sw0_disable_irq (void) |
Disable external interrupts from SW0_ExtIRQn to APPS Core. | |
static void | _cyhal_system_sw0_enable_irq (void) |
Enable external interrupts from SW0_ExtIRQn to APPS Core. | |
uint32_t _cyhal_system_chipcontrol | ( | volatile uint32_t * | addr_reg, |
volatile uint32_t * | ctrl_reg, | ||
uint8_t | reg_offset, | ||
uint32_t | clear_mask, | ||
uint32_t | set_mask | ||
) |
Write to a chip control register.
This is used to write to an indirect register not directly accessible by the CPU.
[in] | addr_reg | Base address |
[in] | ctrl_reg | Control register |
[in] | reg_offset | Offset value to access the register |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
uint32_t _cyhal_system_common_chipcontrol | ( | volatile uint32_t * | reg, |
uint32_t | clear_mask, | ||
uint32_t | set_mask | ||
) |
Write to a common chip control register.
This is used to directly write to a control register.
[in] | reg | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
uint32_t _cyhal_system_chipstatus | ( | volatile uint32_t * | addr_reg, |
volatile uint32_t * | status_reg, | ||
uint8_t | reg_offset | ||
) |
Read from a chip status register.
This is used to read from an indirect status register not directly accessible by the CPU.
[in] | addr_reg | Base address |
[in] | status_reg | Status register |
[in] | reg_offset | Offset value to access the register |
|
inlinestatic |
Write to GCI chip control register.
This is used to write to an indirect GCI CC register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Read from GCI chip status register.
This is used to read from an indirect status register not directly accessible by the CPU.
[in] | reg_offset | Offset value to access the register |
|
inlinestatic |
Write to GCI GPIO control register.
This is used to write to an indirect GCI GPIO register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Write to GCI GPIO status register.
This is used to write to an indirect GCI GPIO status register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Write to GCI GPIO wake make register.
This is used to write to an indirect GCI GPIO wake mask register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Write to PMU chip control register.
This is used to write to an indirect PMU CC register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Write to PMU resource up/down register.
This is used to write to an indirect PMU resource updown register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Write to PMU resource dependency mask register.
This is used to write to an indirect PMU resource dependency register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Write to PMU regulator control register.
This is used to write to an indirect PMU regulator control register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
|
inlinestatic |
Write to PMU PLL control register.
This is used to write to an indirect PMU PLL control register not directly accessible by the CPU.
[in] | reg_offset | Register to write |
[in] | clear_mask | Clear mask value |
[in] | set_mask | Set mask value |
void _cyhal_system_pinmux_connect | ( | cyhal_gpio_t | pin, |
int | gci_chipcontrol_mux | ||
) |
Connect pin multiplexer.
This function allows connecting/multiplexing peripherals to pins. Do not use this for CPU (SW) driven GPIO. Use the GPIO driver instead. Note that pin states can always be read by the CPU using the GPIO driver.
[in] | pin | Pin pad |
[in] | gci_chipcontrol_mux | Mux selection value |
bool _cyhal_system_irq_remap_sink | ( | uint8_t | bus_line_num, |
uint8_t | sink_num | ||
) |
Route an interrupt bus line to an external interrupt.
This function should be used with the _cyhal_system_irq_remap_source() function.
[in] | bus_line_num | Bus line number |
[in] | sink_num | External interrupt number |
bool _cyhal_system_irq_remap_source | ( | uint32_t | wrapper_addr, |
uint8_t | source_num, | ||
uint8_t | bus_line_num | ||
) |
Route an interrupt source to an interrupt bus line.
This function should be used with the _cyhal_system_irq_remap_sink() function.
[in] | wrapper_addr | Wrapper base address |
[in] | source_num | Interrupt source number |
[in] | bus_line_num | Bus line number |
void _cyhal_syspm_register_peripheral_callback | ( | cyhal_syspm_callback_data_t * | callback_data | ) |
Register an internal peripheral callback.
[in] | callback_data | Pointer to callback data |
void _cyhal_syspm_unregister_peripheral_callback | ( | cyhal_syspm_callback_data_t * | callback_data | ) |
Unregister an internal peripheral callback.
[in] | callback_data | Pointer to callback data |