InPlay API
|
HAL_CLK. More...
Functions | |
void | hal_clk_calib_xo (void) |
Calibrate XO. More... | |
uint32_t | hal_clk_root_get (void) |
Get Root clock. More... | |
int | hal_clk_cpu_set (uint32_t cpu_clk) |
Set CPU clock. More... | |
uint32_t | hal_clk_cpu_get (void) |
Get CPU clock. More... | |
int | hal_clk_d0_mux (int mux) |
Set D0 domain clock. More... | |
uint32_t | hal_clk_d0_get (void) |
Get D0 domanin clock. More... | |
int | hal_clk_d1_mux (int mux) |
Set D1 domain clock. More... | |
uint32_t | hal_clk_d1_get (void) |
Get D1 domanin clock. More... | |
int | hal_clk_d2_mux (int mux) |
Set D2 domain clock. More... | |
uint32_t | hal_clk_d2_get (void) |
Get D2 domanin clock. More... | |
int | hal_clk_tmr_mux (int tmr_id, int mux) |
Set Timer clock. More... | |
uint32_t | hal_clk_tmr_get (int tmr_id) |
Get Timer clock. More... | |
int | hal_clk_sadc_mux (int mux) |
Set Sensor ADC clock. More... | |
uint32_t | hal_clk_sadc_get (void) |
Get SADC clock. More... | |
int | hal_clk_smem_mux (int mux) |
Set Shared memory clock. More... | |
int | hal_clk_qspi_mux (int mux) |
Set QSPI speed clock. More... | |
void | hal_clk_audio_sdm_mux (int mux) |
Audio sigma delta modulator clock source mux. More... | |
uint32_t | hal_clk_qspi_get (void) |
Get QSPI clock. More... | |
int | hal_clk_efuse_mux (int mux) |
Set Efuse clock. More... | |
void | hal_clk_si2s_set (int ext_clk) |
Set Slave I2S clock source. More... | |
void | hal_clk_mi2s_set (uint32_t bit_clk) |
Set Master I2S bit clock. More... | |
void | hal_clk_audio_output (int mux) |
Set audio output (Speaker/Sigma Delta) clock mux. More... | |
void | hal_clk_efuse_en (int en) |
Enable or disable Efuse clock. More... | |
void | hal_clk_uart_en (int id, int on) |
Enable or disable Uart clock. More... | |
void | hal_clk_i2c_en (int id, int on) |
Enable or disable I2c clock. More... | |
void | hal_clk_pwm_en (int on) |
Enable or disable PWM clock. More... | |
void | hal_clk_wdt_en (int on) |
Enable or disable Watch Dog Timer clock. More... | |
void | hal_clk_kb_en (int on) |
Enable or disable keyboard clock. More... | |
void | hal_clk_ecc_en (int on) |
Enable or disable ECC clock. More... | |
void | hal_clk_hash_en (int on) |
Enable or disable hash clock. More... | |
void | hal_clk_aes_en (int on) |
Enable or disable AES clock. More... | |
void | hal_clk_counter_en (int on) |
Enable or disable counter clock. More... | |
void | hal_clk_audio_en (int en) |
Enable or disable shared audio clock. More... | |
void | hal_clk_audio_enc_en (int en) |
Enable or disable audio encoder related clock. More... | |
void | hal_clk_audio_dec_en (int en) |
Enable or disable audio decoder related clock. More... | |
void | hal_clk_audio_resample_en (int en) |
Enable or disable audio reampling related clock. More... | |
void | hal_clk_sadc_en (int on) |
Enable or disable sensor ADC clock. More... | |
void | hal_clk_i2s_en (int id, int on) |
Enable or disable I2S clock. More... | |
void | hal_clk_quaddec_en (int on) |
Enable or disable QD clock. More... | |
void | hal_clk_dma_en (int on) |
Enable or disable DMA clock. More... | |
void | hal_clk_ble_en (int on) |
Enable or disable BLE clock. More... | |
void | hal_clk_gpio_intr (int port, int on) |
Enable or disable GPIO interrupt controller clock. More... | |
void | hal_clk_mspi_en (int on) |
Enable or disable master SPI clock. More... | |
void | hal_clk_sspi_en (int id, int on) |
Enable or disable slave SPI clock. More... | |
void | hal_clk_sm_en (int on) |
Enable or disable share memory clock. More... | |
void | hal_clk_tmr_en (int tim_id, int en) |
Enable or disable Timer clock. More... | |
void | hal_clk_32k (int clk_src) |
Select 32k clock source. More... | |
int | hal_clk_32k_ready (void) |
Check if RTC is ready. More... | |
uint32_t | hal_clk_32k_get (void) |
Get slow clock (low power clock) rate. More... | |
void | hal_clk_calib_32k (int cycles) |
Calibrate Low Power Clock (RC/RTC) timer. More... | |
int | hal_clk_systick_mux (int mux) |
Set Inplay's Systick clock. More... | |
uint32_t | hal_clk_systick_get (void) |
Get Inplay systick clock. More... | |
void | hal_clk_systick_en (int en) |
Enable or disable Inplay's systick clock. More... | |
HAL_CLK.
enum clk_d0_div |
enum clk_d1_div |
enum clk_d2_div |
enum clk_efuse_div |
enum clk_error |
enum clk_qspi_div |
enum clk_sdm_mux |
enum clk_smem_div |
enum clk_systick_div |
enum clk_tim_div |
void hal_clk_32k | ( | int | clk_src | ) |
Select 32k clock source.
[in] | clk_src | 1: RTC, 0: RC |
uint32_t hal_clk_32k_get | ( | void | ) |
Get slow clock (low power clock) rate.
int hal_clk_32k_ready | ( | void | ) |
Check if RTC is ready.
void hal_clk_aes_en | ( | int | on | ) |
Enable or disable AES clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_audio_dec_en | ( | int | en | ) |
Enable or disable audio decoder related clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_audio_en | ( | int | en | ) |
Enable or disable shared audio clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_audio_enc_en | ( | int | en | ) |
Enable or disable audio encoder related clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_audio_output | ( | int | mux | ) |
Set audio output (Speaker/Sigma Delta) clock mux.
[in] | mux | 0: I2S master sclk generated from integer divider 1: I2S slave clock from PAD 2: PDM clock |
void hal_clk_audio_resample_en | ( | int | en | ) |
Enable or disable audio reampling related clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_audio_sdm_mux | ( | int | mux | ) |
Audio sigma delta modulator clock source mux.
[in] | mux | SDM clock source mux, |
void hal_clk_ble_en | ( | int | on | ) |
Enable or disable BLE clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_calib_32k | ( | int | cycles | ) |
Calibrate Low Power Clock (RC/RTC) timer.
[in] | cycles | Calibrate cycles (2 ^ cycles) |
void hal_clk_calib_xo | ( | void | ) |
Calibrate XO.
void hal_clk_counter_en | ( | int | on | ) |
Enable or disable counter clock.
[in] | on | 1: Enable, 0: otherwise |
uint32_t hal_clk_cpu_get | ( | void | ) |
Get CPU clock.
int hal_clk_cpu_set | ( | uint32_t | cpu_clk | ) |
Set CPU clock.
[in] | cpu_clk | XO: 64000000, 32000000, 16000000, and 8000000, RC: 32000000, 16000000, 8000000, 4000000 |
uint32_t hal_clk_d0_get | ( | void | ) |
Get D0 domanin clock.
int hal_clk_d0_mux | ( | int | mux | ) |
uint32_t hal_clk_d1_get | ( | void | ) |
Get D1 domanin clock.
int hal_clk_d1_mux | ( | int | mux | ) |
uint32_t hal_clk_d2_get | ( | void | ) |
Get D2 domanin clock.
int hal_clk_d2_mux | ( | int | mux | ) |
void hal_clk_dma_en | ( | int | on | ) |
Enable or disable DMA clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_ecc_en | ( | int | on | ) |
Enable or disable ECC clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_efuse_en | ( | int | en | ) |
Enable or disable Efuse clock.
[in] | en | 1: Enable, 0: otherwise |
int hal_clk_efuse_mux | ( | int | mux | ) |
void hal_clk_gpio_intr | ( | int | port, |
int | on | ||
) |
Enable or disable GPIO interrupt controller clock.
[in] | port | Port number, |
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_hash_en | ( | int | on | ) |
Enable or disable hash clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_i2c_en | ( | int | id, |
int | on | ||
) |
Enable or disable I2c clock.
[in] | id | I2c Id, |
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_i2s_en | ( | int | id, |
int | on | ||
) |
Enable or disable I2S clock.
[in] | id | I2S Id, |
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_kb_en | ( | int | on | ) |
Enable or disable keyboard clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_mi2s_set | ( | uint32_t | bit_clk | ) |
Set Master I2S bit clock.
[in] | bit_clk | Serial bit clock |
void hal_clk_mspi_en | ( | int | on | ) |
Enable or disable master SPI clock.
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_pwm_en | ( | int | on | ) |
Enable or disable PWM clock.
[in] | on | 1: Enable, 0: otherwise |
uint32_t hal_clk_qspi_get | ( | void | ) |
Get QSPI clock.
int hal_clk_qspi_mux | ( | int | mux | ) |
Set QSPI speed clock.
[in] | mux | Qspi clock divider, |
void hal_clk_quaddec_en | ( | int | on | ) |
Enable or disable QD clock.
[in] | on | 1: Enable, 0: otherwise |
uint32_t hal_clk_root_get | ( | void | ) |
Get Root clock.
void hal_clk_sadc_en | ( | int | on | ) |
Enable or disable sensor ADC clock.
[in] | on | 1: Enable, 0: otherwise |
uint32_t hal_clk_sadc_get | ( | void | ) |
Get SADC clock.
int hal_clk_sadc_mux | ( | int | mux | ) |
Set Sensor ADC clock.
[in] | mux | Sadc domain clock mux, |
void hal_clk_si2s_set | ( | int | ext_clk | ) |
Set Slave I2S clock source.
[in] | ext_clk | 1: From external, 0: From internal. |
void hal_clk_sm_en | ( | int | on | ) |
Enable or disable share memory clock.
[in] | on | 1: Enable, 0: otherwise |
int hal_clk_smem_mux | ( | int | mux | ) |
Set Shared memory clock.
[in] | mux | Smem domain clock mux, |
void hal_clk_sspi_en | ( | int | id, |
int | on | ||
) |
Enable or disable slave SPI clock.
[in] | id | SPI slave id, |
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_systick_en | ( | int | en | ) |
Enable or disable Inplay's systick clock.
[in] | en | 1: Enable, 0: otherwise |
uint32_t hal_clk_systick_get | ( | void | ) |
Get Inplay systick clock.
int hal_clk_systick_mux | ( | int | mux | ) |
Set Inplay's Systick clock.
[in] | mux | Systick clock mux, |
void hal_clk_tmr_en | ( | int | tim_id, |
int | en | ||
) |
Enable or disable Timer clock.
[in] | tim_id | Timer Id, |
[in] | on | 1: Enable, 0: otherwise |
uint32_t hal_clk_tmr_get | ( | int | tmr_id | ) |
Get Timer clock.
int hal_clk_tmr_mux | ( | int | tmr_id, |
int | mux | ||
) |
void hal_clk_uart_en | ( | int | id, |
int | on | ||
) |
Enable or disable Uart clock.
[in] | id | Uart Id, |
[in] | on | 1: Enable, 0: otherwise |
void hal_clk_wdt_en | ( | int | on | ) |
Enable or disable Watch Dog Timer clock.
[in] | on | 1: Enable, 0: otherwise |