/** ########################################################################## ** Filename : ** Project : ** Module : ** Processor : ** Version : ** Compiler : ** Date/Time : ** Abstract : ** Contents : ** Note : ** ** (c) Copyright dmdz Co.,Ltd ** -------------------------------------------------------------------------- ** R E V I S I O N H I S T O R Y ** -------------------------------------------------------------------------- ** Date Ver Author Description ** -20230602- --V1.0-- --mingyea--- --修改-- ** #########################################################################*/ /*--------------------------------------------------------------------------- - I N C L U D E F I L E S ----------------------------------------------------------------------------*/ #include "i2c.h" #include "common_memory.h" /*--------------------------------------------------------------------------- - D E F I N E S / M A C R O S ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- - T Y P E D E F I N I T I O N S ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- - S T A T I C V A R I A B L E S ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- * G L O B A L V A R I A B L E S ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- - C O N S T A N T S ----------------------------------------------------------------------------*/ const FL_I2C_MasterMode_InitTypeDef g_IICInitStructer= { FL_CMU_I2C_CLK_SOURCE_APBCLK, /** 主机时使用的时钟源*/ 100000, /** I2C通讯速率*/ }; const u16 g_i2c_time_total[I2C_TIME_TOTAL_ID_MAX] = { 1u/I2C_TASK_TIME_UNIT, 2u/I2C_TASK_TIME_UNIT, 2u/I2C_TASK_TIME_UNIT, 2u/I2C_TASK_TIME_UNIT, 1u/I2C_TASK_TIME_UNIT, //1u/I2C_TASK_TIME_UNIT, }; /*--------------------------------------------------------------------------- - F U N C T I O N P R O T O T Y P E ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- |Prototype : static return_type example_fun1(parameter list) |Called by : |Preconditions : |Input parameters : |Output parameters : |Return value : |Description : 在结束时,把结果处理一下,比如长度,或者数据回读 ----------------------------------------------------------------------------*/ void i2c_send_block_successful_callback(void) { //touch_force_drv_com_tx_success_callback(); } /*--------------------------------------------------------------------------- |Prototype : static return_type example_fun1(parameter list) |Called by : |Preconditions : |Input parameters : |Output parameters : |Return value : |Description : 在结束时,把结果处理一下,比如长度,或者数据回读 ----------------------------------------------------------------------------*/ void i2c_recv_block_successful_callback(void) { //touch_force_drv_com_rx_success_callback(); } #ifdef I2C_API_RECALL #else /*--------------------------------------------------------------------------- |Prototype : |Called by : |Preconditions : |Input parameters : |Output parameters : |Return value : |Description : ----------------------------------------------------------------------------*/ void CI2C1_Init(void) { } /*--------------------------------------------------------------------------- |Prototype : |Called by : |Preconditions : |Input parameters : |Output parameters : |Return value : |Description : ----------------------------------------------------------------------------*/ void CI2C_re_init_para(void) { } /*--------------------------------------------------------------------------- |Prototype : |Called by : |Preconditions : |Input parameters : |Output parameters : |Return value : |Description : ----------------------------------------------------------------------------*/ u8 CI2C1_SelectSlave(u8 Slv) { return 0u; } /*--------------------------------------------------------------------------- |Prototype : |Called by : |Preconditions : |Input parameters : |Output parameters : |Return value : |Description : ----------------------------------------------------------------------------*/ u8 CI2C1_SendBlock(void* Ptr,i2c_len_type Siz,i2c_len_type *Snt) { return 0u; } /*--------------------------------------------------------------------------- |Prototype : |Called by : |Preconditions : |Input parameters : |Output parameters : |Return value : |Description : ----------------------------------------------------------------------------*/ u8 CI2C1_RecvBlock(void* Ptr,i2c_len_type Siz,i2c_len_type *Rcv) { return 0u; } #endif