bsp: cvitek: new design for pinmux

In the new design, we require the user to manually enter the
PinName (as a string) in menuconfig instead of being given
menu items to select.

The original method will lead to too many menu item-related
macros being defined in the code, causing ifdef and other
codes scatter everywhere in the driver code, which is
inconvenient to maintain.

The new design adds a pinmux driver module to manage the
multiplexing of pins. This patch provides this driver module.

P.S., the reason why users are allowed to specify pinname
in a string instead of the pin number is mainly because
the technical manual provided by the SOC manufacturer
does not have numbers for some pins, only names.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Reviewed-by: Yuanjie He <943313837@qq.com>
Reviewed-by: Shell <smokewood@qq.com>
This commit is contained in:
Chen Wang
2024-07-16 11:37:23 +08:00
committed by Rbb666
parent 80668e0ba2
commit a63c07fd75
3 changed files with 993 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@ src = Split('''
drv_uart.c
drv_por.c
drv_gpio.c
drv_pinmux.c
''')
CPPDEFINES = []
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff