[BSP][ls1c]Fixed some bugs of ls1c lib.

This commit is contained in:
sundm75 committed 2018-02-09 09:21:02 +08:00
1 parent d08ce950e5
commit c121d823fd
3 files changed
+68 -57

No files matched your search

+9
View File
@@ -42,6 +42,15 @@ void pin_set_remap(unsigned int gpio, pin_remap_t remap)
volatile unsigned int *reg = NULL; // 复用寄存器
unsigned int port = GPIO_GET_PORT(gpio);
unsigned int pin = GPIO_GET_PIN(gpio);
int i;
/*指定全部pin复用为0*/
for(i =0; i <=4; i++)
{
reg = (volatile unsigned int *)((LS1C_CBUS_FIRST0)+((port)*0x04)+((i)*0x10));
// 置0
reg_clr_one_bit(reg, pin);
}
switch (port)
{
+1
View File
@@ -20,6 +20,7 @@ typedef enum
PIN_REMAP_THIRD, // 第三复用
PIN_REMAP_FOURTH, // 第四复用
PIN_REMAP_FIFTH, // 第五复用
PIN_REMAP_DEFAULT, //缺省复用
}pin_remap_t;
File diff suppressed because it is too large. Load diff