修改格式

This commit is contained in:
guohp1128 2020-06-20 14:01:39 +08:00
parent 1d960894ff
commit 933fd4a05c
4 changed files with 36 additions and 40 deletions

View File

@ -8,7 +8,6 @@
* 2020-06-16 guohp1128 first version
*/
#include "drv_gpio.h"
#ifdef RT_USING_PIN
@ -65,7 +64,7 @@ static const struct pin_index pins[] =
__NRF5X_PIN(47, 1, 15),
};
/* EVENTS_IN[n](n=0..7), EVENTS_PORT */
/* EVENTS_IN[n](n=0..7) and EVENTS_PORT */
static struct rt_pin_irq_hdr pin_irq_hdr_tab[] =
{
{-1, 0, RT_NULL, RT_NULL},
@ -81,7 +80,7 @@ static struct rt_pin_irq_hdr pin_irq_hdr_tab[] =
#define ITEM_NUM(items) sizeof(items) / sizeof(items[0])
/*pin: 引脚编号*/
/*pin: the number of pins*/
static const struct pin_index *get_pin(uint8_t pin)
{
const struct pin_index *index;
@ -190,7 +189,7 @@ static void pin_irq_hdr(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
}
/* args = true : hi_accuracy(IN_EVENT)
args = false: lo_accuracy(PORT_EVENT)
* args = false: lo_accuracy(PORT_EVENT)
*/
static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
rt_uint32_t mode, void (*hdr)(void *args), void *args)

View File

@ -39,7 +39,6 @@ struct pin_index
uint32_t pin;
};
static void nrf5x_pin_write(rt_device_t dev, rt_base_t pin, rt_base_t value);
static int nrf5x_pin_read(rt_device_t dev, rt_base_t pin);
static void nrf5x_pin_mode(rt_device_t dev, rt_base_t pin, rt_base_t mode);

View File

@ -40,10 +40,8 @@ int main(void)
rt_pin_write(DK_BOARD_LED_1, PIN_LOW);
rt_thread_mdelay(500);
}
return RT_EOK;
}
/*@}*/