Merge pull request #402 from g-oikonomou/contrib/gpio/logging

Add some logging to the GPIO HAL
This commit is contained in:
Simon Duquennoy 2018-04-02 22:03:21 +02:00 committed by GitHub
commit 4eabf542be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -40,10 +40,15 @@
#include "contiki.h"
#include "dev/gpio-hal.h"
#include "lib/list.h"
#include "sys/log.h"
#include <stdint.h>
#include <string.h>
/*---------------------------------------------------------------------------*/
/* Log configuration */
#define LOG_MODULE "GPIO HAL"
#define LOG_LEVEL LOG_LEVEL_NONE
/*---------------------------------------------------------------------------*/
LIST(handlers);
/*---------------------------------------------------------------------------*/
void
@ -78,6 +83,7 @@ void
gpio_hal_arch_toggle_pin(gpio_hal_pin_t pin)
{
if(pin >= GPIO_HAL_PIN_COUNT) {
LOG_ERR("Pin %u out of bounds\n", pin);
return;
}