Pimoroni's Presto: a 480x480 color display, as 240x240 doubled, in SRAM, or 480x480, in two framebuffers in PSRAM which swap, so it doesn't tear, and its touchscreen. More...
#import <Devices/Devices.h>


Instance Methods | |
| (id) | - initWithSize:rotation:clock: |
| Initializes the Presto, as +prestoWithSize:rotation:clock:. | |
| (NXLight *) | - backlight |
| Returns its backlight, which can be dimmed, or turned off. More... | |
| (BOOL) | - setTarget:selector: |
| Sets what's sent each touch, or nil for none, and returns NO, changing nothing, if the selector isn't a method of the target which takes one object. More... | |
Instance Methods inherited from NXDisplay | |
| (id) | - initWithDisplay: |
| Initializes it with its pix display, which it owns from then on. More... | |
| (void) | - deinitDisplay: |
| Frees its pix display, when it's deallocated, with pix_display_deinit(). More... | |
| (pix_display_t *) | - display |
| Returns its pix display. | |
| (NXSize) | - size |
| Returns its size, in pixels. | |
| (BOOL) | - isEPaper |
| Returns YES for e-paper, which keeps its picture, and is slow to change it: its partial refreshes may only draw black and white, so draw in those. | |
| (id< NXDisplayDelegate >) | - delegate |
| Returns the delegate, which isn't retained. | |
| (void) | - setDelegate: |
| Sets the delegate, which isn't retained, and draws all of it again. | |
| (void) | - setInterval: |
| Sets the shortest time between redraws, from 1 ms: 0, the default, for as often as it changes and the device allows. | |
| (void) | - setNeedsDisplay |
| Marks all of it as changed, so it's drawn again. | |
| (void) | - setNeedsDisplayInRect: |
| Marks part of it as changed, so that's drawn again. More... | |
| (BOOL) | - isAttached |
| Returns YES while it's attached to the application. | |
Instance Methods inherited from NXObject | |
| (void) | - dealloc |
| Frees the instance. More... | |
| (NXZone *) | - zone |
| Returns the zone in which the instance was allocated. More... | |
| (id) | - retain |
| Increases the retain count of the receiver. More... | |
| (void) | - release |
| Decreases the retain count of the receiver. More... | |
| (id) | - autorelease |
| Releases the receiver later, when the current autorelease pool of the thread is drained. More... | |
| (id) | - copy |
| Returns a copy which can't be changed by anything else, which the caller owns and has to release. More... | |
| (uintptr_t) | - hash |
| Returns a number for the object, which is the same for objects which are equal by isEqual:. More... | |
| (NXString *) | - description |
| Returns a string which describes the instance, for logging. More... | |
Instance Methods inherited from Object | |
| (id) | - init |
| Initialize the instance, after allocation. More... | |
| (Class) | - class |
| Returns the class of the instance. More... | |
| (Class) | - superclass |
| Returns the superclass of the instance. More... | |
| (BOOL) | - isEqual: |
| Compares the receiver to another object for equality. More... | |
| (BOOL) | - isKindOfClass: |
| Returns a Boolean value that indicates whether the receiver is an instance of a given class. More... | |
| (BOOL) | - conformsTo: |
| Checks if the receiver's class conforms to a protocol. More... | |
Instance Methods inherited from <ObjectProtocol> | |
| (BOOL) | - respondsToSelector: |
| Checks if the receiver responds to a selector. More... | |
Class Methods | |
| (PimoroniPresto *) | + presto |
| Returns the Presto, 240x240 and upright, at the system clock as it is, or nil if it isn't a Presto, or it's in use. | |
| (PimoroniPresto *) | + prestoWithSize:rotation:clock: |
| Returns the Presto at a size, 240 or 480, a rotation, 0 or 180, and a system clock, or nil if they aren't allowed, it isn't a Presto, or it's in use. | |
Class Methods inherited from NXObject | |
| (id) | + alloc |
| Allocates a new instance in the default zone, or if there isn't one, with sys_calloc(). More... | |
| (id) | + allocWithZone: |
| Allocates a new instance in a specific zone. More... | |
| (id) | + new |
| Allocates and initializes a new instance, as [[cls alloc] init] does. More... | |
| (NXString *) | + description |
| Returns the name of the class. | |
Class Methods inherited from Object | |
| (void) | + initialize |
| Performs one-time initialization for the class. More... | |
| (Class) | + class |
| Returns the class object. More... | |
| (Class) | + superclass |
| Returns the superclass of the class. More... | |
| (const char *) | + name |
| Returns the name of the class. More... | |
| (BOOL) | + conformsTo: |
| Checks if the class conforms to a protocol. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Object | |
| Class | isa |
| A pointer to the object's class structure. More... | |
Pimoroni's Presto: a 480x480 color display, as 240x240 doubled, in SRAM, or 480x480, in two framebuffers in PSRAM which swap, so it doesn't tear, and its touchscreen.
Its backlight is on when it's made, and can be changed with -backlight. With a target, set with -setTarget:selector:, each touch while it's attached with -[NXApplication attachDisplay:] is an NXMoveEvent, in the display's pixels, for up to two fingers, in slots 0 and 1. Setting the system clock changes the clock of peripherals such as UARTs, SPI and PWM, so make it before they're set up.
The display runs from interrupts on the core which makes it, which only that core can stop, so the Presto, and its backlight, which retains it, must be released on the same core, or picofuse panics. An application with one worker, as by default, always is.
Definition at line 39 of file PimoroniPresto.h.
| - (NXLight *) backlight |
Returns its backlight, which can be dimmed, or turned off.
The light retains the Presto, so it's there while the light is.
Sets what's sent each touch, or nil for none, and returns NO, changing nothing, if the selector isn't a method of the target which takes one object.
The touchscreen's set up once it's attached with a target, and if it doesn't answer, it's still drawn, and this returns NO if it's attached.
| target | What the message is sent to, which is retained, or nil. |
| selector | A method of the target which has an NXInputEvent as its one argument. |