blob: 26cc4cac92253d6cc1cf57715988dc2a809a0cc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2017-09-06 ���� first version
*/
// ���Ź���(��ͨgpio��pwm�����õ�)��ؽӿ�
#ifndef __OPENLOONGSON_PIN_H
#define __OPENLOONGSON_PIN_H
// ������;
typedef enum
{
PIN_PURPOSE_GPIO = 0, // ����������ͨgpio
PIN_PURPOSE_OTHER, // ����������������(��gpio)
}pin_purpose_t;
// ���Ÿ���
typedef enum
{
PIN_REMAP_FIRST = 0, // ��һ����
PIN_REMAP_SECOND, // �ڶ�����
PIN_REMAP_THIRD, // ��������
PIN_REMAP_FOURTH, // ���ĸ���
PIN_REMAP_FIFTH, // ���帴��
PIN_REMAP_DEFAULT, //ȱʡ����
}pin_remap_t;
/*
* ��ָ��pin����Ϊָ����;(��ͨgpio����gpio)
* @gpio gpio���ű��
* @purpose ��;
*/
void pin_set_purpose(unsigned int gpio, pin_purpose_t purpose);
/*
* ����ָ��pinΪ��n����
* @gpio gpio���
* @remap ��n����
*/
void pin_set_remap(unsigned int gpio, pin_remap_t remap);
#endif
|