PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Blinky_Demo.cpp
Basic usage of the
PropWare::Pin
class to blink an LED four times a second
cmake_minimum_required(VERSION 3.3)
find_package(
PropWare
REQUIRED)
set(MODEL cog)
project(Blinky_Demo)
create_simple_executable(${PROJECT_NAME} ${PROJECT_NAME})
#include <
PropWare/PropWare.h
>
#include <
PropWare/pin.h
>
int
main
() {
PropWare::Pin
led
(
PropWare::Port::P16
,
PropWare::Pin::OUT
);
while
(1) {
led.
toggle
();
waitcnt(CLKFREQ / 4 + CNT);
}
}
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12