PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Propeller GCC Demos
toggle
xmm_toggle
toggle.c
1
/*
2
This shows an example for creating an LMM program and Makefile.
3
It simply toggles the pins at 1Hz rate.
4
5
Copyright (c) 2011 Parallax, Inc.
6
MIT Licensed.
7
8
+--------------------------------------------------------------------
9
¦ TERMS OF USE: MIT License
10
+--------------------------------------------------------------------
11
Permission is hereby granted, free of charge, to any person obtaining
12
a copy of this software and associated documentation files
13
(the "Software"), to deal in the Software without restriction,
14
including without limitation the rights to use, copy, modify, merge,
15
publish, distribute, sublicense, and/or sell copies of the Software,
16
and to permit persons to whom the Software is furnished to do so,
17
subject to the following conditions:
18
19
The above copyright notice and this permission notice shall be
20
included in all copies or substantial portions of the Software.
21
22
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
26
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
+--------------------------------------------------------------------
30
*/
31
32
#include "propeller.h"
33
34
int
main
(
int
argc,
char
* argv[])
35
{
36
int
mask = 0x3fffffff;
37
int
freq = CLKFREQ>>1;
38
DIRA = mask;
39
for
(;;) {
40
OUTA ^= DIRA;
41
waitcnt(freq+CNT);
42
}
43
}
44
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12