initcommit osclsk prototype
This commit is contained in:
commit
4ade3a5f00
19 changed files with 1780 additions and 0 deletions
34
daisy/blnk/Blink.cpp
Normal file
34
daisy/blnk/Blink.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include "daisy_seed.h"
|
||||
|
||||
// Use the daisy namespace to prevent having to type
|
||||
// daisy:: before all libdaisy functions
|
||||
using namespace daisy;
|
||||
|
||||
// Declare a DaisySeed object called hardware
|
||||
DaisySeed hardware;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Declare a variable to store the state we want to set for the LED.
|
||||
bool led_state;
|
||||
led_state = true;
|
||||
|
||||
// Configure and Initialize the Daisy Seed
|
||||
// These are separate to allow reconfiguration of any of the internal
|
||||
// components before initialization.
|
||||
hardware.Configure();
|
||||
hardware.Init();
|
||||
|
||||
// Loop forever
|
||||
for(;;)
|
||||
{
|
||||
// Set the onboard LED
|
||||
hardware.SetLed(led_state);
|
||||
|
||||
// Toggle the LED state for the next time around.
|
||||
led_state = !led_state;
|
||||
|
||||
// Wait 500ms
|
||||
System::Delay(500);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue