
#ifndef _leds_h
#define _leds_h

#include "RBPXPLRTERM_config.h"

#include "timeouts.h"

// blink program commands
#define   BLC_ON    801    // turn LED on and then delay <param> ticks (=milliseconds)
#define   BLC_OFF   802    // turn LED off and then delay <param> ticks (=milliseconds)
#define   BLC_BRR   803    // branch relative by <param> program locations

// blink program entry points
#define   BLE_INIT          0         // entry to INIT      blink pattern in blink program
#define   BLE_CONN          6         // entry to CONNected blink pattern in blink program
#define   BLE_NOTCONN      12         // entry to NOTOCNN   blink pattern in blink program
#define   BLE_IDLE         18         // entry to IDLE      blink pattern in blink program
#define   BLE_SOS          24         // entry to SOS       blink pattern in blink program
#define   BLE_CONFUSED     60         // entry to CONFUSED  blink pattern in blink program

// neoPixel definitions
//
// utility functions
//
#define SEQ_ALLOFF 0
#define SEQ_ALLON 1

extern void setLED(bool newLEDstate);              // set the LED: true=ON / false=OFF
extern void setBlinkStep(int newBlinkStep);
extern int getBlinkStep();
extern void initLEDs();

#endif
