Go to the source code of this file.
Typedefs | |
| typedef I2C_Type * | sccb_type |
| typedef enum _sccb_xfer_flag | sccb_xfer_flags_t |
| typedef struct _sccb_bus | hpm_sccb_bus_t |
Functions | |
| hpm_stat_t | sccb_master_init (sccb_type sccb) |
| sccb master initialization More... | |
| uint8_t | sccb_master_scan (sccb_type sccb) |
| sccb master scan slave addr More... | |
| hpm_stat_t | sccb_master_gencall (sccb_type sccb, uint8_t cmd) |
| sccb master gen call slave More... | |
| hpm_stat_t | sccb_master_readb (sccb_type sccb, uint8_t slv_addr, uint8_t reg_addr, uint8_t *reg_data) |
| sccb master read 8bit data of specify 8bit register from certain slave device More... | |
| hpm_stat_t | sccb_master_writeb (sccb_type sccb, uint8_t slv_addr, uint8_t reg_addr, uint8_t reg_data) |
| sccb master write 8bit data of specify 8bit register from certain slave device More... | |
| hpm_stat_t | sccb_master_readb2 (sccb_type sccb, uint8_t slv_addr, uint16_t reg_addr, uint8_t *reg_data) |
| sccb master read 8bit data of specify 16bit register from certain slave device More... | |
| hpm_stat_t | sccb_master_writeb2 (sccb_type sccb, uint8_t slv_addr, uint16_t reg_addr, uint8_t reg_data) |
| sccb master write 8bit data of specify 16bit register from certain slave device More... | |
| hpm_stat_t | sccb_master_readw (sccb_type sccb, uint8_t slv_addr, uint8_t reg_addr, uint16_t *reg_data) |
| sccb master read 16bit data of specify 8bit register from certain slave device More... | |
| hpm_stat_t | sccb_master_writew (sccb_type sccb, uint8_t slv_addr, uint8_t reg_addr, uint16_t reg_data) |
| sccb master write 16bit data of specify 8bit register from certain slave device More... | |
| hpm_stat_t | sccb_master_readw2 (sccb_type sccb, uint8_t slv_addr, uint16_t reg_addr, uint16_t *reg_data) |
| sccb master read 16bit data of specify 16it register from certain slave device More... | |
| hpm_stat_t | sccb_master_writew2 (sccb_type sccb, uint8_t slv_addr, uint16_t reg_addr, uint16_t reg_data) |
| sccb master write 16bit data of specify 16bit register from certain slave device More... | |
| hpm_stat_t | sccb_master_read_bytes (sccb_type sccb, uint8_t slv_addr, uint8_t *buf, const uint32_t len, uint8_t flags) |
| sccb master reads the specified number of bytes continuously at the specified flag More... | |
| hpm_stat_t | cambus_write_bytes (sccb_type sccb, uint8_t slv_addr, uint8_t *buf, const uint32_t len, uint8_t flags) |
| sccb master weite the specified number of bytes continuously at the specified flag More... | |
| typedef struct _sccb_bus hpm_sccb_bus_t |
| typedef enum _sccb_xfer_flag sccb_xfer_flags_t |
| hpm_stat_t cambus_write_bytes | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint8_t * | buf, | ||
| const uint32_t | len, | ||
| uint8_t | flags | ||
| ) |
sccb master weite the specified number of bytes continuously at the specified flag
the size should not not greater than I2C_SOC_TRANSFER_COUNT_MAX
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | buf | point of the buffer to store 8bit data from device |
| [out] | len | size of data to be write in bytes |
| [in] | flags | sccb_xfer_flags_t enmu flags |
| hpm_stat_t | status_success if writing is completed without any error |
| hpm_stat_t sccb_master_gencall | ( | sccb_type | sccb, |
| uint8_t | cmd | ||
| ) |
sccb master gen call slave
the controller sends the command to determine whether the slave responds
| [in] | sccb | sccb base address |
| [in] | cmd | sccb master sends command |
| hpm_stat_t | status_success if the slave responds |
| hpm_stat_t sccb_master_init | ( | sccb_type | sccb | ) |
sccb master initialization
Initialized sccb working at master mode
| [in] | sccb | sccb base address |
| hpm_stat_t | status_success if initialization is completed without any error |
| hpm_stat_t sccb_master_read_bytes | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint8_t * | buf, | ||
| const uint32_t | len, | ||
| uint8_t | flags | ||
| ) |
sccb master reads the specified number of bytes continuously at the specified flag
the size should not not greater than I2C_SOC_TRANSFER_COUNT_MAX
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | buf | point of the buffer to store 8bit data from device |
| [out] | len | size of data to be read in bytes |
| [in] | flags | sccb_xfer_flags_t enmu flags |
| hpm_stat_t | status_success if reading is completed without any error |
| hpm_stat_t sccb_master_readb | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint8_t | reg_addr, | ||
| uint8_t * | reg_data | ||
| ) |
sccb master read 8bit data of specify 8bit register from certain slave device
the function used to access 8 bit register address,read 8bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 8bit register address of sccb slave device |
| [out] | reg_data | point of the buffer to store 8bit data from device the number of bytes is 1 |
| hpm_stat_t | status_success if reading is completed without any error |
| hpm_stat_t sccb_master_readb2 | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint16_t | reg_addr, | ||
| uint8_t * | reg_data | ||
| ) |
sccb master read 8bit data of specify 16bit register from certain slave device
the function used to access 16 bit register address,read 8bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 16bit register address of sccb slave device |
| [out] | reg_data | point of the buffer to store 8bit data from device the number of bytes is 1 |
| hpm_stat_t | status_success if reading is completed without any error |
| hpm_stat_t sccb_master_readw | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint8_t | reg_addr, | ||
| uint16_t * | reg_data | ||
| ) |
sccb master read 16bit data of specify 8bit register from certain slave device
the function used to access 8 bit register address,read 16bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 8bit register address of sccb slave device |
| [out] | reg_data | point of the buffer to store 16bit data from device the number of bytes is 1 |
| hpm_stat_t | status_success if reading is completed without any error |
| hpm_stat_t sccb_master_readw2 | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint16_t | reg_addr, | ||
| uint16_t * | reg_data | ||
| ) |
sccb master read 16bit data of specify 16it register from certain slave device
the function used to access 16 bit register address,read 16bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 16bit register address of sccb slave device |
| [out] | reg_data | point of the buffer to store 16bit data from device the number of bytes is 1 |
| hpm_stat_t | status_success if reading is completed without any error |
| uint8_t sccb_master_scan | ( | sccb_type | sccb | ) |
sccb master scan slave addr
master scan the slave
| [in] | sccb | sccb base address |
| uint8_t | the slave address val is zero if scan slave fail |
| hpm_stat_t sccb_master_writeb | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint8_t | reg_addr, | ||
| uint8_t | reg_data | ||
| ) |
sccb master write 8bit data of specify 8bit register from certain slave device
the function used to access 8 bit register address,write 8bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 8bit register address of sccb slave device |
| [out] | reg_data | write 8bit data |
| hpm_stat_t | status_success if writing is completed without any error |
| hpm_stat_t sccb_master_writeb2 | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint16_t | reg_addr, | ||
| uint8_t | reg_data | ||
| ) |
sccb master write 8bit data of specify 16bit register from certain slave device
the function used to access 16 bit register address,write 8bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 16bit register address of sccb slave device |
| [out] | reg_data | wirite 8bit data |
| hpm_stat_t | status_success if writing is completed without any error |
| hpm_stat_t sccb_master_writew | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint8_t | reg_addr, | ||
| uint16_t | reg_data | ||
| ) |
sccb master write 16bit data of specify 8bit register from certain slave device
the function used to access 8 bit register address,write 16bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 8bit register address of sccb slave device |
| [out] | reg_data | wirite 16bit data |
| hpm_stat_t | status_success if writing is completed without any error |
| hpm_stat_t sccb_master_writew2 | ( | sccb_type | sccb, |
| uint8_t | slv_addr, | ||
| uint16_t | reg_addr, | ||
| uint16_t | reg_data | ||
| ) |
sccb master write 16bit data of specify 16bit register from certain slave device
the function used to access 16bit register address,write 16bit data
| [in] | sccb | sccb base address |
| [in] | slv_addr | sccb slave address |
| [out] | reg_addr | 16bit register address of sccb slave device |
| [out] | reg_data | wirite 16bit data |
| hpm_stat_t | status_success if writing is completed without any error |