Basic ledControl library that control the leds on LPC1768
Dependents: gimbalController_brushless_IMU i2c_MPU6050 i2c_HMC5883L IMU_fusion ... more
ledControl.h@2:1655ee0ec2ca, 2015-07-21 (annotated)
- Committer:
- BaserK
- Date:
- Tue Jul 21 08:19:15 2015 +0000
- Revision:
- 2:1655ee0ec2ca
- Parent:
- 1:7ffaf6e46589
comment update;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
BaserK | 1:7ffaf6e46589 | 1 | /* |
BaserK | 1:7ffaf6e46589 | 2 | * Copyright (c) 2015, Baser Kandehir, baser.kandehir@ieee.metu.edu.tr |
BaserK | 1:7ffaf6e46589 | 3 | * |
BaserK | 1:7ffaf6e46589 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
BaserK | 1:7ffaf6e46589 | 5 | * of this software and associated documentation files (the "Software"), to deal |
BaserK | 1:7ffaf6e46589 | 6 | * in the Software without restriction, including without limitation the rights |
BaserK | 1:7ffaf6e46589 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
BaserK | 1:7ffaf6e46589 | 8 | * copies of the Software, and to permit persons to whom the Software is |
BaserK | 1:7ffaf6e46589 | 9 | * furnished to do so, subject to the following conditions: |
BaserK | 1:7ffaf6e46589 | 10 | * |
BaserK | 1:7ffaf6e46589 | 11 | * The above copyright notice and this permission notice shall be included in |
BaserK | 1:7ffaf6e46589 | 12 | * all copies or substantial portions of the Software. |
BaserK | 1:7ffaf6e46589 | 13 | * |
BaserK | 1:7ffaf6e46589 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
BaserK | 1:7ffaf6e46589 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
BaserK | 1:7ffaf6e46589 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
BaserK | 1:7ffaf6e46589 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
BaserK | 1:7ffaf6e46589 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
BaserK | 1:7ffaf6e46589 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
BaserK | 1:7ffaf6e46589 | 20 | * THE SOFTWARE. |
BaserK | 1:7ffaf6e46589 | 21 | * |
BaserK | 1:7ffaf6e46589 | 22 | */ |
BaserK | 2:1655ee0ec2ca | 23 | |
BaserK | 0:0afc4bd76407 | 24 | #ifndef LEDCONTROL_H // "if not defined": to ensure that header code is only ever included once by the linker. |
BaserK | 0:0afc4bd76407 | 25 | #define LEDCONTROL_H |
BaserK | 0:0afc4bd76407 | 26 | |
BaserK | 0:0afc4bd76407 | 27 | #include "mbed.h" |
BaserK | 0:0afc4bd76407 | 28 | |
BaserK | 0:0afc4bd76407 | 29 | extern DigitalOut led1; // allow led1 to be manipulated by other files |
BaserK | 0:0afc4bd76407 | 30 | extern DigitalOut led2; |
BaserK | 0:0afc4bd76407 | 31 | extern DigitalOut led3; |
BaserK | 0:0afc4bd76407 | 32 | extern DigitalOut led4; |
BaserK | 0:0afc4bd76407 | 33 | |
BaserK | 0:0afc4bd76407 | 34 | void ledControl(int ledNum,int value); // function prototype |
BaserK | 0:0afc4bd76407 | 35 | void ledToggle(int ledNum); |
BaserK | 0:0afc4bd76407 | 36 | |
BaserK | 0:0afc4bd76407 | 37 | #endif |