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);
|
||||
}
|
||||
}
|
7
daisy/blnk/Makefile
Normal file
7
daisy/blnk/Makefile
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Project Name
|
||||
TARGET = Blink
|
||||
|
||||
# Sources
|
||||
CPP_SOURCES = Blink.cpp
|
||||
|
||||
include ../../make/daisy.mk
|
11
daisy/blnk/README.md
Normal file
11
daisy/blnk/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Blink
|
||||
|
||||
## Author
|
||||
|
||||
Shensley
|
||||
|
||||
## Description
|
||||
|
||||
Blinks the Seed's onboard LED at a constant rate.
|
||||
|
||||
[Source Code](https://github.com/electro-smith/DaisyExamples/tree/master/seed/Blink)
|
Loading…
Add table
Add a link
Reference in a new issue