不能调用 sbl_printf 的地方可以使用函数指针来调用
This commit is contained in:
@@ -21,6 +21,7 @@ Information is free from patent or copyright infringement.
|
||||
#include "pin_rf.h"
|
||||
#include "gpio_mtx_hw.h"
|
||||
#include "apb.h"
|
||||
#include "iot_config.h"
|
||||
|
||||
#define GPIO_MTX_CHECK(a) \
|
||||
if (!(a)) { \
|
||||
@@ -118,7 +119,9 @@ void gpio_pin_oinv(uint32_t pin, uint32_t val)
|
||||
PIN_RF_WRITE_REG(offset, tmp);
|
||||
}
|
||||
|
||||
void gpio_pin_select(uint32_t pin, uint32_t func)
|
||||
static_printf_def(0x10001b9e)
|
||||
|
||||
void gpio_pin_select(uint32_t pin , uint32_t func)
|
||||
{
|
||||
uint32_t tmp;
|
||||
uint32_t offset;
|
||||
@@ -127,7 +130,8 @@ void gpio_pin_select(uint32_t pin, uint32_t func)
|
||||
offset = PIN_GET_OFFSET(pin);
|
||||
tmp = PIN_RF_READ_REG(offset);
|
||||
REG_FIELD_SET(GPIO_FUNC_SEL, tmp, func);
|
||||
PIN_RF_WRITE_REG(offset, tmp);
|
||||
PIN_RF_WRITE_REG(offset , tmp);
|
||||
sbl_printf("gpio pin=%d , fun=%d\n" , pin , func);
|
||||
}
|
||||
|
||||
uint8_t gpio_pin_get_select(uint32_t pin)
|
||||
|
Reference in New Issue
Block a user