1 /*
2 * Copyright (C) 2017-2024 Alibaba Group Holding Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 /******************************************************************************
20 * @file pinmux.c
21 * @brief source file for the pinmux
22 * @version V1.0
23 * @date 02. June 2017
24 ******************************************************************************/
25
26 #include <stdint.h>
27 #include <stddef.h>
28 #include <drv/pin.h>
29 #include <drv/gpio.h>
30 #include "soc.h"
31
32 /*******************************************************************************
33 * function: ioreuse config
34 *******************************************************************************/
csi_pin_set_mux(pin_name_t pin_name,pin_func_t pin_func)35 csi_error_t csi_pin_set_mux(pin_name_t pin_name, pin_func_t pin_func)
36 {
37 return CSI_OK;
38 }
39
40
csi_pin_mode(pin_name_t pin_name,csi_gpio_mode_t mode)41 csi_error_t csi_pin_mode(pin_name_t pin_name, csi_gpio_mode_t mode)
42 {
43 return CSI_OK;
44 }
45
46
47 /**
48 \brief get the pin function.
49 \param[in] pin refs to pin_name_e.
50 \return pin function count
51 */
csi_pin_get_mux(pin_name_t pin_name)52 pin_func_t csi_pin_get_mux(pin_name_t pin_name)
53 {
54 return PIN_FUNC_GPIO;
55 }
56
57 /**
58 \brief set pin speed
59 \param[in] pin_name pin name, defined in soc.h.
60 \param[in] speed io speed
61 \return error code
62 */
csi_pin_speed(pin_name_t pin_name,csi_pin_speed_t speed)63 csi_error_t csi_pin_speed(pin_name_t pin_name, csi_pin_speed_t speed)
64 {
65 return CSI_OK;
66 }
67
68
69 /**
70 \brief set pin drive
71 \param[in] pin_name pin name, defined in soc.h.
72 \param[in] drive io drive
73 \return error code
74 */
csi_pin_drive(pin_name_t pin_name,csi_pin_drive_t drive)75 csi_error_t csi_pin_drive(pin_name_t pin_name, csi_pin_drive_t drive)
76 {
77 return CSI_OK;
78 }
79