objc

LED.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include <runtime-hw/hw.h>
9 
11 // CLASS DEFINITIONS
12 
27 @interface LED : NXObject {
28 @private
29  hw_led_t _led;
30  hw_pwm_t _pwm;
31 }
32 
41 + (LED *)status;
42 
49 + (LED *)binaryOnPin:(uint8_t)pin;
50 
56 + (LED *)linearOnPin:(uint8_t)pin;
57 
63 - (BOOL)setState:(BOOL)on;
64 
72 - (BOOL)setBrightness:(uint8_t)brightness;
73 
80 - (BOOL)blinkWithDuration:(NXTimeInterval)duration repeats:(BOOL)repeats;
81 
88 - (BOOL)fadeWithDuration:(NXTimeInterval)duration repeats:(BOOL)repeats;
89 
90 @end
LED * status()
Returns the on-board status LED.
Hardware interface abstraction layer.
PWM structure representing a PWM instance.
Definition: pwm.h:56
int64_t NXTimeInterval
Time interval type representing nanoseconds as a 64-bit signed integer.
bool BOOL
A Boolean value.
Definition: runtime.h:60
The LED class.
Definition: LED.h:27
The base class for objects in the Foundation framework.
Definition: NXObject.h:21
LED structure definition for hardware control.
Definition: led.h:30