File nut/dev/led.c


Included Files


Preprocessor definitions

#define LED_SET_ON 0

#define LED_SET_OFF 1


Typedef LEDEventT

typedef struct {...} LEDEventT
struct  
   {  
      void* next; < Pointer to next LED descriptor.
      uint32_t timOn; < Time the LED is on.
      uint32_t timOff; < Time the LED is off.
      uint32_t tim; < Internal current time of a LED
      int bank; < Port where led is connected
      int pin; < Pin on port, where led is connected
      int state; < Current state
      uint_fast8_t fx; < Selected function of led
   }  

Global Variable first_led

LEDEventT* first_led
Visible in:   nut/dev/led.c
Used in: NutRegisterLed() nut/dev/led.c
  sys_led() nut/dev/led.c

Global Variable led_tmr

HANDLE led_tmr
Visible in:   nut/dev/led.c
Used in: NutRegisterLed() nut/dev/led.c

Global Variable led_evt

HANDLE led_evt
Visible in:   nut/dev/led.c
Used in: NutRegisterLed() nut/dev/led.c

Global Function InitLED()

int InitLED ( LEDEventT* led )
Calls: GpioPinConfigSet() nut/arch/m68k/coldfire/dev/mcf5225x/mcf5225x_gpio.c
  GpioPinSetHigh() nut/arch/avr/dev/gpio_avr.c
Called by: NutRegisterLed() nut/dev/led.c

Global Function NutRegisterLed()

int NutRegisterLed ( HANDLE* ledh, int bank, int pin )
Prototyped in: nut/include/dev/led.h
Calls: InitLED() nut/dev/led.c
  NutThreadCreate() nut/arch/cm3/os/context.c
  malloc() nut/crt/malloc.c
  memset() nut/c/string/memset.c
  NutTimerStart()
References Functions: LedTimerCb() nut/dev/led.c
  sys_led() nut/dev/led.c
References Variables: first_led nut/dev/led.c
  led_evt nut/dev/led.c
  led_tmr nut/dev/led.c

Global Function NutSetLed()

void NutSetLed ( HANDLE ledh, uint_fast8_t fxin, uint32_t timOn, uint32_t timOff )
Prototyped in: nut/include/dev/led.h
Calls: GpioPinSet() nut/arch/avr/dev/gpio_avr.c
Called by: sys_led() nut/dev/led.c

Global Function sys_led()

void sys_led ( void* arg )
Prototyped in: nut/dev/led.c
Calls: NutSetLed() nut/dev/led.c
  NutEventWait(), NutGetMillis(), NutThreadSetPriority()
Used in: NutRegisterLed() nut/dev/led.c
References Variables: first_led nut/dev/led.c

Local Function LedTimerCb()

static void LedTimerCb ( HANDLE timer, void* arg )
Calls: NutEventPostAsync()
Used in: NutRegisterLed() nut/dev/led.c