Merge branch 'develop' into contrib/project-conf-fix
This commit is contained in:
commit
5c9997519b
@ -71,13 +71,6 @@
|
||||
* @{
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_YELLOW 2 /**< LED2 (Yellow) -> PC1 */
|
||||
#define LEDS_GREEN 4 /**< LED3 (Green) -> PC2 */
|
||||
#define LEDS_ORANGE 8 /**< LED4 (Orange) -> PC3 */
|
||||
|
@ -87,8 +87,6 @@
|
||||
#define NBR_TABLE_CONF_MAX_NEIGHBORS 300
|
||||
#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
|
||||
|
||||
#define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1
|
||||
|
||||
#ifndef UIP_CONF_IPV6_QUEUE_PKT
|
||||
#define UIP_CONF_IPV6_QUEUE_PKT 1
|
||||
#endif /* UIP_CONF_IPV6_QUEUE_PKT */
|
||||
|
@ -63,13 +63,6 @@
|
||||
* @{
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 16 /**< LED1 (Red) -> PC4 */
|
||||
#define LEDS_YELLOW 64 /**< LED2 (Yellow) -> PC6 */
|
||||
#define LEDS_GREEN 128 /**< LED3 (Green) -> PC7 */
|
||||
|
@ -60,13 +60,6 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1
|
||||
#define LEDS_GREEN 2
|
||||
#define LEDS_YELLOW LEDS_GREEN
|
||||
|
@ -60,13 +60,6 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1
|
||||
#define LEDS_GREEN 2
|
||||
#define LEDS_YELLOW LEDS_GREEN
|
||||
|
@ -60,13 +60,6 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1
|
||||
#define LEDS_GREEN 2
|
||||
#define LEDS_YELLOW LEDS_GREEN
|
||||
|
@ -63,13 +63,6 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1
|
||||
#define LEDS_GREEN LEDS_RED
|
||||
#define LEDS_YELLOW LEDS_RED
|
||||
|
@ -63,13 +63,6 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1
|
||||
#define LEDS_GREEN 2
|
||||
#define LEDS_YELLOW LEDS_GREEN
|
||||
|
@ -63,13 +63,6 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1 /**< LED1 (Red) */
|
||||
#define LEDS_YELLOW 2 /**< LED2 (Yellow) */
|
||||
#define LEDS_GREEN 4 /**< LED3 (Green) */
|
||||
|
@ -63,13 +63,6 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1 /**< LED1 (Red) */
|
||||
#define LEDS_YELLOW 2 /**< LED2 (Yellow) */
|
||||
#define LEDS_GREEN 4 /**< LED3 (Green) */
|
||||
|
@ -98,14 +98,6 @@
|
||||
* @{
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_BLUE
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
|
||||
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
|
||||
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
|
||||
|
@ -98,14 +98,6 @@
|
||||
* @{
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_BLUE
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
|
||||
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
|
||||
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
|
||||
|
@ -67,14 +67,6 @@
|
||||
* @{
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_BLUE
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
|
||||
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
|
||||
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
|
||||
|
@ -102,14 +102,6 @@
|
||||
* @{
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Some files include leds.h before us, so we need to get rid of defaults in
|
||||
* leds.h before we provide correct definitions */
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_BLUE
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
/* In leds.h the LEDS_BLUE is defined by LED_YELLOW definition */
|
||||
#define LEDS_GREEN (1 << 4) /**< LED1 (Green) -> PD4 */
|
||||
#define LEDS_BLUE (1 << 3) /**< LED2 (Blue) -> PD3 */
|
||||
|
@ -105,12 +105,6 @@
|
||||
* @{
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#undef LEDS_GREEN
|
||||
#undef LEDS_YELLOW
|
||||
#undef LEDS_BLUE
|
||||
#undef LEDS_RED
|
||||
#undef LEDS_CONF_ALL
|
||||
|
||||
#define LEDS_RED 1 /**< LED1 (Red) -> PD4 */
|
||||
#define LEDS_RED_PIN_MASK (1 << 4)
|
||||
#define LEDS_RED_PORT_BASE GPIO_D_BASE
|
||||
|
@ -115,6 +115,4 @@
|
||||
#define LOG_CONF_LEVEL_6TOP LOG_LEVEL_DBG
|
||||
#define TSCH_LOG_CONF_PER_SLOT 1
|
||||
|
||||
#define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 0
|
||||
|
||||
#endif /* __PROJECT_CONF_H__ */
|
||||
|
@ -33,19 +33,11 @@
|
||||
#include "dev/leds.h"
|
||||
#include "sys/clock.h"
|
||||
|
||||
static unsigned char leds;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static inline void
|
||||
show_leds(unsigned char new_leds)
|
||||
{
|
||||
leds_arch_set(new_leds);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
leds_init(void)
|
||||
{
|
||||
leds_arch_init();
|
||||
leds = 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
@ -53,7 +45,7 @@ leds_blink(void)
|
||||
{
|
||||
/* Blink all leds that were initially off. */
|
||||
unsigned char blink;
|
||||
blink = ~leds;
|
||||
blink = ~leds_arch_get();
|
||||
leds_toggle(blink);
|
||||
|
||||
clock_delay(400);
|
||||
@ -69,24 +61,24 @@ leds_get(void) {
|
||||
void
|
||||
leds_set(unsigned char ledv)
|
||||
{
|
||||
show_leds(ledv);
|
||||
leds_arch_set(ledv);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
leds_on(unsigned char ledv)
|
||||
{
|
||||
show_leds(leds | ledv);
|
||||
leds_arch_set(leds_arch_get() | ledv);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
leds_off(unsigned char ledv)
|
||||
{
|
||||
show_leds(leds & ~ledv);
|
||||
leds_arch_set(leds_arch_get() & ~ledv);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
leds_toggle(unsigned char ledv)
|
||||
{
|
||||
show_leds(leds ^ ledv);
|
||||
leds_arch_set(leds_arch_get() ^ ledv);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user