feat(hal):graudate the LCD hal driver into a new component

- Introduced new HAL components for LCD and MIPI DSI, including:
  - `lcd_hal.c` and `lcd_hal.h` for LCD hardware abstraction layer.
  - `mipi_dsi_hal.c` and `mipi_dsi_hal.h` for MIPI DSI hardware
abstraction layer.
  - Peripheral connection definitions in `lcd_periph.c` and
`lcd_periph.h`.
  - Added necessary types and utility functions in `lcd_types.h` and
`mipi_dsi_types.h`.

- Updated CMakeLists to include the new HAL components in the build
system.
- Removed legacy references to LCD and MIPI DSI in the HAL and SOC
CMakeLists.
This commit is contained in:
morris
2025-10-22 17:00:18 +08:00
parent 8e1ebcad18
commit d4d8b09ced
78 changed files with 558 additions and 648 deletions
+11 -12
View File
@@ -22,6 +22,11 @@
#include "hal/i2s_types.h"
#include "hal/hal_utils.h"
#define I2S_LL_GET(_attr) I2S_LL_ ## _attr
#define I2S_LL_BUS_WIDTH 24
#define I2S_LL_INST_NUM 2
#define I2S_LL_TRANS_SIZE_ALIGN_WORD 1 // I2S DMA transfer size must be aligned to word
#define I2S_LL_ADC_DAC_CAPABLE 1 // I2S supports to connect to ADC / DAC converters
#ifdef __cplusplus
extern "C" {
@@ -761,8 +766,7 @@ static inline void i2s_ll_rx_enable_msb_shift(i2s_dev_t *hw, bool msb_shift_enab
static inline void i2s_ll_tx_select_pdm_slot(i2s_dev_t *hw, i2s_pdm_slot_mask_t slot_mask, bool is_mono)
{
if (is_mono) {
switch (slot_mask)
{
switch (slot_mask) {
case I2S_PDM_SLOT_RIGHT:
hw->conf_chan.tx_chan_mod = 3;
break;
@@ -776,8 +780,7 @@ static inline void i2s_ll_tx_select_pdm_slot(i2s_dev_t *hw, i2s_pdm_slot_mask_t
break;
}
} else {
switch (slot_mask)
{
switch (slot_mask) {
case I2S_PDM_SLOT_RIGHT:
hw->conf_chan.tx_chan_mod = 1;
break;
@@ -799,8 +802,7 @@ static inline void i2s_ll_tx_select_pdm_slot(i2s_dev_t *hw, i2s_pdm_slot_mask_t
*/
static inline void i2s_ll_rx_select_pdm_slot(i2s_dev_t *hw, i2s_pdm_slot_mask_t slot_mask)
{
switch (slot_mask)
{
switch (slot_mask) {
case I2S_PDM_SLOT_RIGHT:
hw->conf_chan.rx_chan_mod = 1;
break;
@@ -825,8 +827,7 @@ static inline void i2s_ll_rx_select_pdm_slot(i2s_dev_t *hw, i2s_pdm_slot_mask_t
static inline void i2s_ll_tx_select_std_slot(i2s_dev_t *hw, i2s_std_slot_mask_t slot_mask, bool is_mono)
{
if (is_mono) {
switch (slot_mask)
{
switch (slot_mask) {
case I2S_STD_SLOT_RIGHT:
hw->conf_chan.tx_chan_mod = 3;
break;
@@ -840,8 +841,7 @@ static inline void i2s_ll_tx_select_std_slot(i2s_dev_t *hw, i2s_std_slot_mask_t
break;
}
} else {
switch (slot_mask)
{
switch (slot_mask) {
case I2S_STD_SLOT_RIGHT:
hw->conf_chan.tx_chan_mod = 1;
break;
@@ -866,8 +866,7 @@ static inline void i2s_ll_tx_select_std_slot(i2s_dev_t *hw, i2s_std_slot_mask_t
*/
static inline void i2s_ll_rx_select_std_slot(i2s_dev_t *hw, i2s_std_slot_mask_t slot_mask, bool is_msb_right)
{
switch (slot_mask)
{
switch (slot_mask) {
case I2S_STD_SLOT_RIGHT:
hw->conf_chan.rx_chan_mod = is_msb_right ? 1 : 2;
break;