|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include "i2c_porting.h"#include "hal_i2c.h"#include "hal_i2c_v150.h"#include "hal_i2c_v150_comm.h"#include "pinctrl.h"#include "osal_interrupt.h"#include "chip_core_irq.h"#include "arch_port.h"
结构体 | |
| struct | i2c_irq_handler |
宏定义 | |
| #define | BUS_CLOCK_TIME_24M 24000000UL |
| #define | BUS_CLOCK_TIME_40M 40000000UL |
| #define | I2C_CLOCK_DEFAULT BUS_CLOCK_TIME_40M |
类型定义 | |
| typedef void(* | i2c_porting_irq_handler) (void) |
| typedef struct i2c_irq_handler | i2c_irq_handler_t |
函数 | |
| uintptr_t | i2c_porting_base_addr_get (i2c_bus_t bus) |
| Get the base address of a specified I2C. | |
| void | i2c_port_set_clock_value (i2c_bus_t bus, uint32_t clock) |
| Set the bus clock of specified i2c. | |
| uint32_t | i2c_port_get_clock_value (i2c_bus_t bus) |
| Get the bus clock of specified i2c. | |
| void | i2c_port_register_irq (i2c_bus_t bus) |
| Register the interrupt of I2C. | |
| void | i2c_port_unregister_irq (i2c_bus_t bus) |
| Unregister the interrupt of I2C. | |
| uint32_t | i2c_porting_lock (i2c_bus_t bus) |
| I2C lock. | |
| void | i2c_porting_unlock (i2c_bus_t bus, uint32_t irq_sts) |
| I2C unlock. | |
变量 | |
| uintptr_t | g_i2c_base_addrs [I2C_BUS_MAX_NUMBER] |
| uint32_t | g_i2c_clock [I2C_BUS_MAX_NUMBER] |
| #define BUS_CLOCK_TIME_24M 24000000UL |
Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
Description: Provides i2c port template
History:
2022-08-15, Create file.
| #define BUS_CLOCK_TIME_40M 40000000UL |
| #define I2C_CLOCK_DEFAULT BUS_CLOCK_TIME_40M |
| typedef struct i2c_irq_handler i2c_irq_handler_t |
| typedef void(* i2c_porting_irq_handler) (void) |
| uint32_t i2c_port_get_clock_value | ( | i2c_bus_t | bus | ) |
Get the bus clock of specified i2c.
| [in] | bus | The I2C bus. see i2c_bus_t |
| void i2c_port_register_irq | ( | i2c_bus_t | bus | ) |
Register the interrupt of I2C.
| void i2c_port_set_clock_value | ( | i2c_bus_t | bus, |
| uint32_t | clock | ||
| ) |
Set the bus clock of specified i2c.
| [in] | bus | The I2C bus. see i2c_bus_t |
| [in] | clock | The bus clock of specified I2C. |
| void i2c_port_unregister_irq | ( | i2c_bus_t | bus | ) |
Unregister the interrupt of I2C.
Get the base address of a specified I2C.
| [in] | bus | The bus index of I2C. |
| uint32_t i2c_porting_lock | ( | i2c_bus_t | bus | ) |
I2C lock.
| [in] | bus | The bus index of I2C. |
| void i2c_porting_unlock | ( | i2c_bus_t | bus, |
| uint32_t | irq_sts | ||
| ) |
I2C unlock.
| [in] | bus | The bus index of I2C. |
| [in] | irq_sts | The irq lock number of I2C. |
| uintptr_t g_i2c_base_addrs[I2C_BUS_MAX_NUMBER] |
| uint32_t g_i2c_clock[I2C_BUS_MAX_NUMBER] |