MMC driver APIs. More...
Data Structures | |
| struct | mmc_track_pos_mode_t |
| struct | mmc_track_mode_t |
| struct | mmc_pos_or_delta_pos_input_t |
| struct | mmc_coef_input_t |
| struct | mmc_coef_trig_config_t |
| struct | mmc_pos_out_t |
| struct | mmc_coef_out_t |
| struct | mmc_pred_mode_t |
| struct | mmc_pred_period_time_t |
| struct | mmc_pos_trig_t |
| struct | mmc_speed_trig_t |
Functions | |
| static void | mmc_set_sysclk_freq (MMC_Type *base, uint32_t freq) |
| MMC set frequency. More... | |
| static void | mmc_software_reset (MMC_Type *base) |
| MMC software reset. More... | |
| static void | mmc_enable_module (MMC_Type *base) |
| MMC module enable. More... | |
| static void | mmc_disable_module (MMC_Type *base) |
| MMC module disable. More... | |
| static void | mmc_track_set_open_loop_mode (MMC_Type *base, bool open_loop) |
| MMC track set loop mode. More... | |
| static void | mmc_track_set_adjop_mode (MMC_Type *base, bool adjop) |
| MMC track set adjop mode. More... | |
| static void | mmc_track_enable_shadow_read (MMC_Type *base) |
| MMC track request shadow read. More... | |
| static void | mmc_track_enable_interrupt (MMC_Type *base, uint32_t int_mask) |
| MMC track enable interrupt. More... | |
| static void | mmc_track_disable_interrupt (MMC_Type *base, uint32_t int_mask) |
| MMC track disable interrupt. More... | |
| static uint32_t | mmc_track_get_status (MMC_Type *base) |
| MMC track get status register value. More... | |
| static void | mmc_track_clear_status (MMC_Type *base, uint32_t clr_mask) |
| MMC track clear status flag in status register. More... | |
| static void | mmc_track_set_oosync_theta_threshold (MMC_Type *base, uint32_t threshold) |
| MMC track set the threshold of theta for out-of-sync. More... | |
| void | mmc_track_config_pos_mode (MMC_Type *base, mmc_track_pos_mode_t *mode) |
| MMC track config position mode. More... | |
| void | mmc_track_get_default_mode_config (MMC_Type *base, mmc_track_mode_t *config) |
| MMC track get default mode config. More... | |
| void | mmc_track_config_mode (MMC_Type *base, mmc_track_mode_t *config) |
| MMC track config mode. More... | |
| void | mmc_track_config_pos_para (MMC_Type *base, mmc_pos_or_delta_pos_input_t *para) |
| MMC track config position parameter. More... | |
| void | mmc_track_config_delta_para (MMC_Type *base, mmc_pos_or_delta_pos_input_t *para) |
| MMC track config delta parameter. More... | |
| void | mmc_track_config_coef_para (MMC_Type *base, mmc_coef_input_t *para) |
| MMC track config coef parameter. More... | |
| void | mmc_track_config_position_trig (MMC_Type *base, mmc_pos_trig_t *trig) |
| MMC track config position trigger. More... | |
| void | mmc_track_config_speed_trig (MMC_Type *base, mmc_speed_trig_t *trig) |
| MMC track config speed trigger. More... | |
| static void | mmc_track_disable_position_trig (MMC_Type *base) |
| MMC track disable position trigger. More... | |
| static void | mmc_track_disable_speed_trig (MMC_Type *base) |
| MMC track disable speed trigger. More... | |
| void | mmc_track_config_coef_trig (MMC_Type *base, uint8_t index, mmc_coef_trig_config_t *config) |
| MMC track config multiple coef trigger. More... | |
| void | mmc_track_get_result (MMC_Type *base, mmc_pos_out_t *pos_out, mmc_coef_out_t *coef_out) |
| MMC track get result. More... | |
| static void | mmc_enable_pred (MMC_Type *base, uint8_t index) |
| MMC enable predictor. More... | |
| static void | mmc_disable_pred (MMC_Type *base, uint8_t index) |
| MMC disable predictor. More... | |
| static void | mmc_pred_set_open_loop_mode (MMC_Type *base, uint8_t index, bool open_loop) |
| MMC predictor set loop mode. More... | |
| static void | mmc_pred_set_pred_time (MMC_Type *base, uint8_t index, mmc_pred_time_t time) |
| MMC predictor set pred time. More... | |
| static void | mmc_pred_enable_interrupt (MMC_Type *base, uint8_t index, uint32_t int_mask) |
| MMC pred enable interrupt. More... | |
| static void | mmc_pred_disable_interrupt (MMC_Type *base, uint8_t index, uint32_t int_mask) |
| MMC pred disable interrupt. More... | |
| static uint32_t | mmc_pred_get_status (MMC_Type *base, uint8_t index) |
| MMC predictor get status register value. More... | |
| static void | mmc_pred_clear_status (MMC_Type *base, uint8_t index, uint32_t clr_mask) |
| MMC predictor clear status bit in reigster. More... | |
| void | mmc_pred_get_default_mode_config (MMC_Type *base, mmc_pred_mode_t *config) |
| MMC predictor get default mode config. More... | |
| void | mmc_pred_config_mode (MMC_Type *base, uint8_t index, mmc_pred_mode_t *config) |
| MMC predictor config mode. More... | |
| void | mmc_pred_config_pos_para (MMC_Type *base, uint8_t index, mmc_pos_or_delta_pos_input_t *para, bool req_reload) |
| MMC predictor config position parameter. More... | |
| static void | mmc_pred_reload_pos_cmd (MMC_Type *base, mmc_pred_reload_pos_cmd_t cmd) |
| MMC predictor reload position parameter cmd. More... | |
| void | mmc_pred_config_delta_para (MMC_Type *base, uint8_t index, mmc_pos_or_delta_pos_input_t *para) |
| MMC predictor update delta parameter. More... | |
| void | mmc_pred_config_period_time (MMC_Type *base, uint8_t index, mmc_pred_period_time_t *time) |
| MMC predictor config period time. More... | |
| void | mmc_pred_config_position_trig (MMC_Type *base, uint8_t index, mmc_pos_trig_t *trig) |
| MMC predictor config position trigger. More... | |
| void | mmc_pred_config_speed_trig (MMC_Type *base, uint8_t index, mmc_speed_trig_t *trig) |
| MMC predictor config speed trigger. More... | |
| static void | mmc_pred_disable_position_trig (MMC_Type *base, uint8_t index) |
| MMC predictor disable position trigger. More... | |
| static void | mmc_pred_disable_speed_trig (MMC_Type *base, uint8_t index) |
| MMC predictor disable speed trigger. More... | |
| void | mmc_pred_get_result (MMC_Type *base, uint8_t index, mmc_pos_out_t *pos_out) |
| MMC predictor get result. More... | |
| void | mmc_get_default_pos_or_delta_pos_para (MMC_Type *base, mmc_pos_or_delta_pos_input_t *para) |
| MMC predictor get result. More... | |
MMC driver APIs.
#include <drivers/inc/hpm_mmc_drv.h>
| Enumerator | |
|---|---|
| mmc_coef_not_update | |
| mmc_coef_p_update | |
| mmc_coef_i_update | |
| mmc_coef_a_update | |
| mmc_coef_update_all | |
#include <drivers/inc/hpm_mmc_drv.h>
| Enumerator | |
|---|---|
| mmc_pos_update_none | |
| mmc_pos_update_position | |
| mmc_pos_update_revolution | |
| mmc_pos_update_speed | |
| mmc_pos_update_accel | |
| mmc_pos_update_all | |
#include <drivers/inc/hpm_mmc_drv.h>
| enum mmc_pred_event_t |
#include <drivers/inc/hpm_mmc_drv.h>
| Enumerator | |
|---|---|
| mmc_pred_idle | |
| mmc_pred_init_delta_pos_done | |
| mmc_pred_pos_trig_valid | |
| mmc_pred_speed_trig_valid | |
| mmc_pred_open_loop | |
| enum mmc_pred_int_t |
#include <drivers/inc/hpm_mmc_drv.h>
| Enumerator | |
|---|---|
| mmc_pred_pos_trig_valid_int | |
| mmc_pred_speed_trig_valid_int | |
| mmc_pred_init_delta_pos_done_int | |
#include <drivers/inc/hpm_mmc_drv.h>
| Enumerator | |
|---|---|
| mmc_pred_not_reload_pos_cmd | |
| mmc_pred_0_reload_pos_cmd | |
| mmc_pred_1_reload_pos_cmd | |
| mmc_pred_both_reload_pos_cmd | |
| enum mmc_pred_time_t |
#include <drivers/inc/hpm_mmc_drv.h>
| Enumerator | |
|---|---|
| mmc_pred_by_period | |
| mmc_pred_continuously_repeat | |
| mmc_pred_only_once | |
| enum mmc_track_event_t |
#include <drivers/inc/hpm_mmc_drv.h>
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC disable predictor.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC enable predictor.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| void mmc_get_default_pos_or_delta_pos_para | ( | MMC_Type * | base, |
| mmc_pos_or_delta_pos_input_t * | para | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor get result.
| [in] | base | MMC base address |
| [out] | para | mmc_pos_or_delta_pos_input_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor clear status bit in reigster.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | clr_mask | bit mask mmc_pred_event_t |
< W1C
| void mmc_pred_config_delta_para | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_pos_or_delta_pos_input_t * | para | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor update delta parameter.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | para | mmc_pos_or_delta_pos_input_t |
| void mmc_pred_config_mode | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_pred_mode_t * | config | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor config mode.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | config | mmc_pred_mode_t |
| void mmc_pred_config_period_time | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_pred_period_time_t * | time | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor config period time.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | time | mmc_pred_period_time_t |
| void mmc_pred_config_pos_para | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_pos_or_delta_pos_input_t * | para, | ||
| bool | req_reload | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor config position parameter.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | para | mmc_pos_or_delta_pos_input_t |
| [in] | req_reload | request to update parameter cmd |
| void mmc_pred_config_position_trig | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_pos_trig_t * | trig | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor config position trigger.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | trig | mmc_pos_trig_t |
| void mmc_pred_config_speed_trig | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_speed_trig_t * | trig | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor config speed trigger.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | trig | mmc_speed_trig_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC pred disable interrupt.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | int_mask | interrupt_mask mmc_pred_int_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor disable position trigger.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor disable speed trigger.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC pred enable interrupt.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | int_mask | interrupt_mask mmc_pred_int_t |
| void mmc_pred_get_default_mode_config | ( | MMC_Type * | base, |
| mmc_pred_mode_t * | config | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor get default mode config.
| [in] | base | MMC base address |
| [in] | config | mmc_pred_mode_t |
| void mmc_pred_get_result | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_pos_out_t * | pos_out | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor get result.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [out] | pos_out | mmc_pos_out_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor get status register value.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| predictor | status register value |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor reload position parameter cmd.
| [in] | base | MMC base address |
| [in] | cmd | mmc_pred_reload_pos_cmd_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor set loop mode.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | open_loop | true for open loop, false for close loop |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC predictor set pred time.
| [in] | base | MMC base address |
| [in] | index | predictor index(0/1) |
| [in] | time | mmc_pred_time_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC set frequency.
| [in] | base | MMC base address |
| [in] | freq | the moto system freq |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track clear status flag in status register.
| [in] | base | MMC base address |
| [in] | clr_mask | mmc_track_event_t |
| void mmc_track_config_coef_para | ( | MMC_Type * | base, |
| mmc_coef_input_t * | para | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config coef parameter.
| [in] | base | MMC base address |
| [in] | para | mmc_coef_input_t |
| void mmc_track_config_coef_trig | ( | MMC_Type * | base, |
| uint8_t | index, | ||
| mmc_coef_trig_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config multiple coef trigger.
| [in] | base | MMC base address |
| [in] | index | coef trigger index(0/1/2) |
| [in] | config | mmc_coef_trig_config_t |
| void mmc_track_config_delta_para | ( | MMC_Type * | base, |
| mmc_pos_or_delta_pos_input_t * | para | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config delta parameter.
| [in] | base | MMC base address |
| [in] | para | mmc_pos_or_delta_pos_input_t |
| void mmc_track_config_mode | ( | MMC_Type * | base, |
| mmc_track_mode_t * | config | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config mode.
| [in] | base | MMC base address |
| [in] | config | mmc_track_mode_t |
| void mmc_track_config_pos_mode | ( | MMC_Type * | base, |
| mmc_track_pos_mode_t * | mode | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config position mode.
| [in] | base | MMC base address |
| [in] | mode | mmc_track_pos_mode_t |
| void mmc_track_config_pos_para | ( | MMC_Type * | base, |
| mmc_pos_or_delta_pos_input_t * | para | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config position parameter.
| [in] | base | MMC base address |
| [in] | para | mmc_pos_or_delta_pos_input_t |
| void mmc_track_config_position_trig | ( | MMC_Type * | base, |
| mmc_pos_trig_t * | trig | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config position trigger.
| [in] | base | MMC base address |
| [in] | trig | mmc_pos_trig_t |
| void mmc_track_config_speed_trig | ( | MMC_Type * | base, |
| mmc_speed_trig_t * | trig | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track config speed trigger.
| [in] | base | MMC base address |
| [in] | trig | mmc_speed_trig_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track disable interrupt.
| [in] | base | MMC base address |
| [in] | int_mask | interrupt_mask mmc_track_event_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track disable position trigger.
| [in] | base | MMC base address |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track disable speed trigger.
| [in] | base | MMC base address |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track enable interrupt.
| [in] | base | MMC base address |
| [in] | int_mask | interrupt_mask mmc_track_event_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track request shadow read.
| [in] | base | MMC base address |
| void mmc_track_get_default_mode_config | ( | MMC_Type * | base, |
| mmc_track_mode_t * | config | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track get default mode config.
| [in] | base | MMC base address |
| [in] | config | mmc_track_mode_t |
| void mmc_track_get_result | ( | MMC_Type * | base, |
| mmc_pos_out_t * | pos_out, | ||
| mmc_coef_out_t * | coef_out | ||
| ) |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track get result.
| [in] | base | MMC base address |
| [out] | pos_out | mmc_pos_out_t |
| [out] | coef_out | mmc_coef_out_t |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track get status register value.
| [in] | base | MMC base address |
| status | register value |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track set adjop mode.
| [in] | base | MMC base address |
| [in] | adjop | true for adjop mode, false for normal mode |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track set the threshold of theta for out-of-sync.
| [in] | base | MMC base address |
| [in] | threshold | threshold value |
|
inlinestatic |
#include <drivers/inc/hpm_mmc_drv.h>
MMC track set loop mode.
| [in] | base | MMC base address |
| [in] | open_loop | true for open loop, false for close loop |