rtt-f030/bsp/ls1cdev/libraries/ls1c_pin.h

45 lines
921 B
C
Raw Normal View History

// <20><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>(<28><>ͨgpio<69><6F>pwm<77><6D><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>)<29><><EFBFBD>ؽӿ<D8BD>
#ifndef __OPENLOONGSON_PIN_H
#define __OPENLOONGSON_PIN_H
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
typedef enum
{
PIN_PURPOSE_GPIO = 0, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨgpio
PIN_PURPOSE_OTHER, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>gpio)
}pin_purpose_t;
// <20><><EFBFBD>Ÿ<EFBFBD><C5B8><EFBFBD>
typedef enum
{
PIN_REMAP_FIRST = 0, // <20><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
PIN_REMAP_SECOND, // <20>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD>
PIN_REMAP_THIRD, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PIN_REMAP_FOURTH, // <20><><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD>
PIN_REMAP_FIFTH, // <20><><EFBFBD><EFBFBD><E5B8B4>
PIN_REMAP_DEFAULT, //ȱʡ<C8B1><CAA1><EFBFBD><EFBFBD>
}pin_remap_t;
/*
* <EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>pin<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>;(<EFBFBD><EFBFBD>ͨgpio<EFBFBD><EFBFBD><EFBFBD><EFBFBD>gpio)
* @gpio gpio<EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><EFBFBD><EFBFBD>
* @purpose <EFBFBD><EFBFBD>;
*/
void pin_set_purpose(unsigned int gpio, pin_purpose_t purpose);
/*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>pinΪ<EFBFBD><EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @gpio gpio<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @remap <EFBFBD><EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
void pin_set_remap(unsigned int gpio, pin_remap_t remap);
#endif