VSF Documented
|
#include "hal/driver/driver.h"
Macros | |
#define | VSF_I2C_CFG_FUNCTION_RENAME DISABLED |
Functions | |
vsf_err_t | vsf_i2c_init (vsf_i2c_t *i2c_ptr, vsf_i2c_cfg_t *cfg_ptr) |
initialize a i2c instance. | |
void | vsf_i2c_fini (vsf_i2c_t *i2c_ptr) |
termination a i2c instance. | |
fsm_rt_t | vsf_i2c_enable (vsf_i2c_t *i2c_ptr) |
enable i2c instance. | |
fsm_rt_t | vsf_i2c_disable (vsf_i2c_t *i2c_ptr) |
disable i2c instance. | |
void | vsf_i2c_irq_enable (vsf_i2c_t *i2c_ptr, vsf_i2c_irq_mask_t irq_mask) |
enable interrupt masks of i2c instance. | |
void | vsf_i2c_irq_disable (vsf_i2c_t *i2c_ptr, vsf_i2c_irq_mask_t irq_mask) |
disable interrupt masks of i2c instance. | |
vsf_i2c_status_t | vsf_i2c_status (vsf_i2c_t *i2c_ptr) |
get the status of i2c instance. | |
vsf_i2c_capability_t | vsf_i2c_capability (vsf_i2c_t *i2c_ptr) |
get the capability of i2c instance. | |
vsf_err_t | vsf_i2c_master_request (vsf_i2c_t *i2c_ptr, uint16_t address, vsf_i2c_cmd_t cmd, uint16_t count, uint8_t *buffer_ptr) |
i2c instance as master mode request a transfer | |
uint_fast32_t | vsf_i2c_get_transferred_count (vsf_i2c_t *i2c_ptr) |
get the counter of transfers for current request by the i2c master | |
#define VSF_I2C_CFG_FUNCTION_RENAME DISABLED |
vsf_err_t vsf_i2c_init | ( | vsf_i2c_t * | i2c_ptr, |
vsf_i2c_cfg_t * | cfg_ptr | ||
) |
initialize a i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
[in] | cfg_ptr | a pointer to structure vsf_i2c_cfg_t |
void vsf_i2c_fini | ( | vsf_i2c_t * | i2c_ptr | ) |
termination a i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
enable i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
disable i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
void vsf_i2c_irq_enable | ( | vsf_i2c_t * | i2c_ptr, |
vsf_i2c_irq_mask_t | irq_mask | ||
) |
enable interrupt masks of i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
[in] | irq_mask | one or more value of enum vsf_i2c_irq_mask_t |
void vsf_i2c_irq_disable | ( | vsf_i2c_t * | i2c_ptr, |
vsf_i2c_irq_mask_t | irq_mask | ||
) |
disable interrupt masks of i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
[in] | irq_mask | one or more value of enum vsf_i2c_irq_mask_t, vsf_i2c_irq_mask_t |
vsf_i2c_status_t vsf_i2c_status | ( | vsf_i2c_t * | i2c_ptr | ) |
get the status of i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
vsf_i2c_capability_t vsf_i2c_capability | ( | vsf_i2c_t * | i2c_ptr | ) |
get the capability of i2c instance.
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
vsf_err_t vsf_i2c_master_request | ( | vsf_i2c_t * | i2c_ptr, |
uint16_t | address, | ||
vsf_i2c_cmd_t | cmd, | ||
uint16_t | count, | ||
uint8_t * | buffer_ptr | ||
) |
i2c instance as master mode request a transfer
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |
[in] | address | address of i2c transfer |
[in] | cmd | i2c cmd |
[in] | count | i2c transfer buffer count (in byte) |
[in] | buffer_ptr | i2c transfer buffer |
uint_fast32_t vsf_i2c_get_transferred_count | ( | vsf_i2c_t * | i2c_ptr | ) |
get the counter of transfers for current request by the i2c master
[in] | i2c_ptr | a pointer to structure vsf_i2c_t |