Skip to content

Commit

Permalink
Update Zephyr MSDK Hal based on MSDK PR: analogdevicesinc/msdk#1119
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 19, 2024
1 parent 26c0589 commit c3539fa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
9 changes: 9 additions & 0 deletions MAX/Libraries/PeriphDrivers/Include/MAX32680/uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,15 @@ int MXC_UART_SetFlowCtrl(mxc_uart_regs_t *uart, mxc_uart_flow_t flowCtrl, int rt
*/
int MXC_UART_SetClockSource(mxc_uart_regs_t *uart, mxc_uart_clock_t clock);

/**
* @brief Gets the clock source used for the UART instance
*
* @param uart Pointer to UART registers (selects the UART block used.)
*
* @return The selected clock source for the UART instance
*/
mxc_uart_clock_t MXC_UART_GetClockSource(mxc_uart_regs_t *uart);

/* ************************************************************************* */
/* Low-level functions */
/* ************************************************************************* */
Expand Down
4 changes: 2 additions & 2 deletions MAX/Libraries/PeriphDrivers/Source/UART/uart_ai85.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ mxc_uart_clock_t MXC_UART_GetClockSource(mxc_uart_regs_t *uart)
break;
case 3:
switch (clock_option) {
case 0:
case 2:
return MXC_UART_IBRO_CLK;
case 1:
case 3:
return MXC_UART_ERTCO_CLK;
default:
return E_BAD_STATE;
Expand Down
5 changes: 2 additions & 3 deletions MAX/Libraries/PeriphDrivers/Source/UART/uart_me17.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clo
if (retval != E_NO_ERROR) {
return retval;
}

return MXC_UART_RevB_Init((mxc_uart_revb_regs_t *)uart, baud, MXC_UART_GetClockSource(uart));
}

Expand Down Expand Up @@ -320,9 +319,9 @@ mxc_uart_clock_t MXC_UART_GetClockSource(mxc_uart_regs_t *uart)
break;
case 3:
switch (clock_option) {
case 0:
case 2:
return MXC_UART_IBRO_CLK;
case 1:
case 3:
return MXC_UART_ERTCO_CLK;
default:
return E_BAD_STATE;
Expand Down
2 changes: 1 addition & 1 deletion MAX/msdk_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
330aef5a9aff238ef439fbd2692d24b14646a761
fb3ae96e021ca2bd195408e1ee0e88f1057e2119

0 comments on commit c3539fa

Please sign in to comment.