Skip to content

Commit c21dc0c

Browse files
committed
hw:add iomux API for EC200U module
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 50e9f46 commit c21dc0c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

include/hw/iomux.h

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* iomux.h
3+
*
4+
*/
5+
6+
#ifndef __HW_IOMUX_H__
7+
#define __HW_IOMUX_H__
8+
9+
#ifdef __cplusplus
10+
extern "C" {
11+
#endif
12+
13+
#ifdef PLATFORM_EC200U
14+
/**
15+
* @brief Configure IOMUX for SPI port
16+
* @note Only applicable to EC200U modules
17+
*
18+
* @param port [in] SPI Port Number (@ref spiport_e)
19+
* @param select [in] IOMUX pin selection
20+
* @return 0 on success, negative value on error
21+
*/
22+
int spi_hw_setiomux(int port, int select);
23+
24+
25+
/**
26+
* @brief Configure the IOMUX for UART1. This function must
27+
* be called before using UART2.
28+
*
29+
* Group 1: UART1_TXD: Pin
30+
*
31+
* @note only applicable to EC200U modules
32+
*
33+
* @param select 0 to select group 1, 1 to select group 2
34+
*
35+
* @return 0 on success, -1 on failure
36+
*/
37+
int uart1_setiomux(int select);
38+
39+
#endif
40+
41+
#ifdef __cplusplus
42+
}
43+
#endif
44+
45+
#endif // __HW_IOMUX_H__

0 commit comments

Comments
 (0)