displayð&i2c&pca9555&pin驱动与驱动框架支持
This commit is contained in:
@@ -2311,7 +2311,9 @@ void emac_ptp_pps_frequency_set(emac_ptp_pps_control_type freq)
|
||||
{
|
||||
EMAC_PTP->ppscr_bit.pofc = freq;
|
||||
}
|
||||
|
||||
#ifdef MKRTOS_DRV
|
||||
#include "u_sys.h"
|
||||
#endif
|
||||
/**
|
||||
* @brief this is delay function base on system clock.
|
||||
* @param delay: delay time
|
||||
@@ -2319,7 +2321,11 @@ void emac_ptp_pps_frequency_set(emac_ptp_pps_control_type freq)
|
||||
*/
|
||||
static void emac_delay(uint32_t delay)
|
||||
{
|
||||
#ifdef MKRTOS_DRV
|
||||
__IO uint32_t delay_time = delay * (sys_read_clk() / 8 / 1000);
|
||||
#else
|
||||
__IO uint32_t delay_time = delay * (system_core_clock / 8 / 1000);
|
||||
#endif
|
||||
do
|
||||
{
|
||||
__NOP();
|
||||
|
||||
@@ -102,9 +102,9 @@
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
__WEAK void i2c_lowlevel_init(i2c_handle_type* hi2c)
|
||||
__WEAK int i2c_lowlevel_init(i2c_handle_type* hi2c)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -143,7 +143,7 @@ typedef struct
|
||||
*/
|
||||
|
||||
void i2c_config (i2c_handle_type* hi2c);
|
||||
void i2c_lowlevel_init (i2c_handle_type* hi2c);
|
||||
int i2c_lowlevel_init (i2c_handle_type* hi2c);
|
||||
void i2c_reset_ctrl2_register (i2c_handle_type* hi2c);
|
||||
i2c_status_type i2c_wait_end (i2c_handle_type* hi2c, uint32_t timeout);
|
||||
i2c_status_type i2c_wait_flag (i2c_handle_type* hi2c, uint32_t flag, uint32_t event_check, uint32_t timeout);
|
||||
|
||||
@@ -258,7 +258,7 @@ void codec_i2s_init(audio_codec_type *param)
|
||||
i2s_init_struct.mclk_output_enable = TRUE;
|
||||
i2s_init_struct.audio_sampling_freq = I2S_AUDIO_FREQUENCY_48K;
|
||||
i2s_init_struct.clock_polarity = I2S_CLOCK_POLARITY_LOW;
|
||||
i2s_init_struct.operation_mode = I2S_MODE_SLAVE_TX ;
|
||||
i2s_init_struct.operation_mode = I2S_MODE_SLAVE_TX;
|
||||
i2s_init(I2S_SPIx, &i2s_init_struct);
|
||||
/* i2s2EXT Rx init */
|
||||
i2s_init_struct.operation_mode = I2S_MODE_SLAVE_RX;
|
||||
|
||||
Reference in New Issue
Block a user