An application, and the run loop which dispatches its events on one or more cores. More...
|
Classes | |
| class | NXAnalogInput |
| An ADC channel, or the internal temperature sensor, which is read at an interval, and which sends a message to a target when its reading changes, as an event source of the application. More... | |
| protocol | <NXApplicationDelegate> |
| What an application tells its delegate. More... | |
| protocol | <NXEvent> |
| Something a run loop dispatches, on one of its workers. More... | |
| protocol | <NXEventSource> |
| Something which produces events, such as a timer, while it's attached to the application with -[NXApplication attachEventSource:]. More... | |
| class | NXInputEvent |
| What an input sends its target, which is an NXKeyEvent, an NXMoveEvent or an NXSensorEvent: one method can take any of them, and check which it is with -kind. More... | |
| class | NXKeyEvent |
| A key pressed, held so it repeats, or released. More... | |
| class | NXMoveEvent |
| A mouse button or a finger pressed, moved while it's pressed, or released, or a mouse's pointer moved with nothing pressed, which a touchscreen doesn't send. More... | |
| class | NXSensorEvent |
| A sensor's reading of one quantity, such as a temperature, which it sends each time it's read. More... | |
| class | NXLight |
| An LED, or a chain of NeoPixels, which is turned on and off, dimmed, colored, or blinked. More... | |
| class | NXPin |
| A pin of picofuse's GPIO: one of a bank's pins, and its level. More... | |
| class | NXDigitalOutput |
| A pin which is driven high or low. More... | |
| class | NXDigitalInput |
| A pin which is read, and which sends a message to a target when its level changes, as an event source of the application. More... | |
| protocol | <NXRunLoopDelegate> |
| What a run loop tells its delegate. More... | |
| class | NXRunLoop |
| Dispatches events which are posted to it, on one or more workers, until it's shut down. More... | |
| class | NXSerialPort |
| A UART, as a stream: a Pico's pins, or a host's serial device. More... | |
| class | NXStreamSource |
| Sends a message to a target when a stream has something to read, or room to write, as an event source of the application. More... | |
| class | NXTimer |
| Sends a message to a target after an interval, once or repeatedly, on the application's run loop. More... | |
Enumerations | |
| enum | NXApplicationFeatures { NXApplicationFeatureNone = 0, NXApplicationFeatureMulticore = (1 << 0), NXApplicationFeatureWatchdog = (1 << 1), NXApplicationFeatureSignals = (1 << 2), NXApplicationFeatureStdioRTT = (1 << 3), NXApplicationFeatureStdioUSB = (1 << 4), NXApplicationFeatureDevices = (1 << 5) } |
| The features NXApplicationMain starts, which can be combined. More... | |
| enum | NXKeyModifiers { NXKeyModifierNone = 0, NXKeyModifierShift = (1 << 0), NXKeyModifierControl = (1 << 1), NXKeyModifierAlt = (1 << 2), NXKeyModifierMeta = (1 << 3), NXKeyModifierCapsLock = (1 << 4) } |
| The modifier keys held, and Caps Lock, of a key event, which can be combined. More... | |
| enum | NXMovePhase { NXMovePhaseBegan = 0, NXMovePhaseMoved, NXMovePhaseEnded, NXMovePhaseHover } |
| How a move went: a mouse button or a finger pressed, moved while it's pressed, or released, or a mouse's pointer moved with nothing pressed. More... | |
| enum | NXInputEventKind { NXInputEventKindKey = 0, NXInputEventKindMove, NXInputEventKindSensor } |
| What kind an input event is, and so which class. More... | |
| enum | NXPinPull { NXPinPullNone = 0, NXPinPullUp, NXPinPullDown } |
| Whether an input is pulled up or down when nothing drives it. More... | |
Functions | |
| int | NXApplicationMain (int argc, char **argv, NXApplicationFeatures features, Class delegateClass) |
| Starts the system, parses the command line, and runs the shared application with a delegate, until it's terminated. More... | |
An application, and the run loop which dispatches its events on one or more cores.
The features NXApplicationMain starts, which can be combined.
| Enumerator | |
|---|---|
| NXApplicationFeatureNone | None. |
| NXApplicationFeatureMulticore | A worker on every core, rather than one. |
| NXApplicationFeatureWatchdog | The watchdog, where there's one, which the run loop feeds as it runs. |
| NXApplicationFeatureSignals | TERM, INT and QUIT terminate it, with 128 + the signal's number. |
| NXApplicationFeatureStdioRTT | Standard input and output over SEGGER RTT. |
| NXApplicationFeatureStdioUSB | Standard input and output over USB. |
| NXApplicationFeatureDevices | The Devices framework's NXDeviceManager, as -[NXApplication deviceManager], with the devices it's built for, from JSON, such as its display, made before the delegate. |
Definition at line 175 of file NXApplication.h.
| enum NXInputEventKind |
What kind an input event is, and so which class.
| Enumerator | |
|---|---|
| NXInputEventKindKey | An NXKeyEvent. |
| NXInputEventKindMove | An NXMoveEvent. |
| NXInputEventKindSensor | An NXSensorEvent. |
Definition at line 39 of file NXInputEvent.h.
| enum NXKeyModifiers |
The modifier keys held, and Caps Lock, of a key event, which can be combined.
Definition at line 14 of file NXInputEvent.h.
| enum NXMovePhase |
How a move went: a mouse button or a finger pressed, moved while it's pressed, or released, or a mouse's pointer moved with nothing pressed.
| Enumerator | |
|---|---|
| NXMovePhaseBegan | Pressed, at its point. |
| NXMovePhaseMoved | Moved, while it's pressed. |
| NXMovePhaseEnded | Released, at its point. |
| NXMovePhaseHover | A pointer moved, with nothing pressed. |
Definition at line 28 of file NXInputEvent.h.
| enum NXPinPull |
Whether an input is pulled up or down when nothing drives it.
| Enumerator | |
|---|---|
| NXPinPullNone | Neither, so it floats when nothing drives it. |
| NXPinPullUp | Pulled up, so it's high when nothing drives it. |
| NXPinPullDown | Pulled down, so it's low when nothing drives it. |
Definition at line 13 of file NXPin.h.
| int NXApplicationMain | ( | int | argc, |
| char ** | argv, | ||
| NXApplicationFeatures | features, | ||
| Class | delegateClass | ||
| ) |
Starts the system, parses the command line, and runs the shared application with a delegate, until it's terminated.
Call it from main() and return what it returns.
| argc | The number of arguments, from main(), which is ignored on a Pico. |
| argv | The arguments, from main(), which are ignored on a Pico. |
| features | The features to start. |
| delegateClass | The class of the delegate, which conforms to NXApplicationDelegate, and is made with alloc and init. Its flags are from +commandLineFlags, to which –help, -h is added, which writes usage: –help unless a flag has that name already, and -h unless a flag has that. |