Merge branch 'feature/i80_lcd_support_esp32s2' into 'master'

esp_lcd: lcd driver for esp32/esp32s2/esp32s3

Closes IDF-3144, IDF-3314, IDF-3315, and IDF-3316

See merge request espressif/esp-idf!13679
This commit is contained in:
morris
2021-08-18 07:55:06 +00:00
43 changed files with 2308 additions and 397 deletions

View File

@@ -43,7 +43,6 @@ typedef struct {
uint16_t mclk_div; // I2S module clock devider, Fmclk = Fsclk /(mclk_div+b/a)
uint16_t a;
uint16_t b; // The decimal part of module clock devider, the decimal is: b/a
uint16_t bck_div; // The BCK devider, Fbck = Fmclk / bck_div
} i2s_ll_clk_cal_t;
/**
@@ -186,6 +185,17 @@ static inline void i2s_ll_rx_clk_set_src(i2s_dev_t *hw, i2s_clock_src_t src)
hw->rx_clkm_conf.rx_clk_sel = 2;
}
/**
* @brief Set I2S tx bck div num
*
* @param hw Peripheral I2S hardware instance address.
* @param val value to set tx bck div num
*/
static inline void i2s_ll_tx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
{
hw->tx_conf1.tx_bck_div_num = val - 1;
}
/**
* @brief Configure I2S TX clock devider
*
@@ -212,7 +222,17 @@ static inline void i2s_ll_tx_set_clk(i2s_dev_t *hw, i2s_ll_clk_cal_t *set)
}
}
hw->tx_clkm_conf.tx_clkm_div_num = set->mclk_div;
hw->tx_conf1.tx_bck_div_num = set->bck_div - 1;
}
/**
* @brief Set I2S rx bck div num
*
* @param hw Peripheral I2S hardware instance address.
* @param val value to set rx bck div num
*/
static inline void i2s_ll_rx_set_bck_div_num(i2s_dev_t *hw, uint32_t val)
{
hw->rx_conf1.rx_bck_div_num = val - 1;
}
/**
@@ -241,7 +261,6 @@ static inline void i2s_ll_rx_set_clk(i2s_dev_t *hw, i2s_ll_clk_cal_t *set)
}
}
hw->rx_clkm_conf.rx_clkm_div_num = set->mclk_div;
hw->rx_conf1.rx_bck_div_num = set->bck_div - 1;
}
/**

View File

@@ -131,15 +131,14 @@ static inline void lcd_ll_reverse_data_bit_order(lcd_cam_dev_t *dev, bool en)
dev->lcd_user.lcd_bit_order = en;
}
static inline void lcd_ll_reverse_data_byte_order(lcd_cam_dev_t *dev, uint32_t data_width, bool en)
static inline void lcd_ll_reverse_data_byte_order(lcd_cam_dev_t *dev, bool en)
{
if (data_width == 8) {
dev->lcd_user.lcd_8bits_order = en; // valid in 8bit mode
dev->lcd_user.lcd_byte_order = 0;
} else if (data_width == 16) {
dev->lcd_user.lcd_byte_order = en; // valid in 16bit mode
dev->lcd_user.lcd_8bits_order = 0;
}
dev->lcd_user.lcd_byte_order = en;
}
static inline void lcd_ll_reverse_data_8bits_order(lcd_cam_dev_t *dev, bool en)
{
dev->lcd_user.lcd_8bits_order = en;
}
static inline void lcd_ll_fifo_reset(lcd_cam_dev_t *dev)