Merge pull request #402 from g-oikonomou/contrib/gpio/logging
Add some logging to the GPIO HAL
This commit is contained in:
commit
4eabf542be
@ -40,10 +40,15 @@
|
|||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
#include "dev/gpio-hal.h"
|
#include "dev/gpio-hal.h"
|
||||||
#include "lib/list.h"
|
#include "lib/list.h"
|
||||||
|
#include "sys/log.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Log configuration */
|
||||||
|
#define LOG_MODULE "GPIO HAL"
|
||||||
|
#define LOG_LEVEL LOG_LEVEL_NONE
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
LIST(handlers);
|
LIST(handlers);
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
@ -78,6 +83,7 @@ void
|
|||||||
gpio_hal_arch_toggle_pin(gpio_hal_pin_t pin)
|
gpio_hal_arch_toggle_pin(gpio_hal_pin_t pin)
|
||||||
{
|
{
|
||||||
if(pin >= GPIO_HAL_PIN_COUNT) {
|
if(pin >= GPIO_HAL_PIN_COUNT) {
|
||||||
|
LOG_ERR("Pin %u out of bounds\n", pin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user