-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Staging/max32670 #2238
base: main
Are you sure you want to change the base?
Staging/max32670 #2238
Conversation
Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
For consistency reasons, to match the other Maxim targets. Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
static int32_t _max_spi_config_pins(struct no_os_spi_desc *desc) | ||
{ | ||
struct max_spi_init_param *eparam; | ||
mxc_gpio_cfg_t spi_pins; | ||
|
||
eparam = desc->extra; | ||
|
||
switch(desc->device_id) { | ||
case 0: | ||
spi_pins = gpio_cfg_spi0; | ||
break; | ||
case 1: | ||
spi_pins = gpio_cfg_spi1; | ||
break; | ||
case 2: | ||
spi_pins = gpio_cfg_spi2; | ||
break; | ||
default: | ||
return -EINVAL; | ||
} | ||
|
||
spi_pins.vssel = eparam->vssel; | ||
MXC_GPIO_Config(&spi_pins); | ||
|
||
return 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be worth mentioning in the commit message that MAX32670 only has 1 CS per SPI instance (which is already included in the gpio_cfg_spi
pin config structs), so we don't need to configure it independently, as for the other Maxim drivers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me overall, just some of the commits are lacking a body.
Pull Request Description
MAX32670 VDDIO selection support for SPI and UART.
PR Type
PR Checklist