led.c
/*******************************************************************************
* examples/led.c *
* ============== *
* *
* Version: 1.0.2 *
* Date : 01.11.17 *
* Author : Peter Weissig *
*******************************************************************************/
//*********************************<Included files>*****************************
#include <tucbot/tucbot.h>
//*********************************<Methods>************************************
void testLed(void);
int main(void);
//*********************************[testLed]***********************************
void testLed(void) {
while (1) {
mdelay(100);
mdelay(100);
mdelay(100);
mdelay(100);
mdelay(100);
mdelay(100);
mdelay(100);
mdelay(100);
}
}
//*********************************[main]***************************************
int main (void) {
init_tucbot(0xFF);
testLed();
return (0);
}
leds_set
void leds_set(eLedMask bitmask, uint8_t bool)
Sets the selected leds on or off.
kLedOn
@ kLedOn
constant (0xFF): turn leds on
Definition: leds.h:63
kLedRight
@ kLedRight
bit mask (0x04): right led
Definition: leds.h:46
kLedLeft
@ kLedLeft
bit mask (0x10): left led
Definition: leds.h:42
kLedMiddle
@ kLedMiddle
bit mask (0x08): middle led
Definition: leds.h:44
kLedOff
@ kLedOff
constant (0x00): turn leds off
Definition: leds.h:61
init_tucbot
void init_tucbot(uint8_t enable_interrupts)
Initiates the TUC-Bot.
mdelay
void mdelay(uint16_t mseconds)
Waits for the given time in milliseconds.