picofuse-objc

Instance Methods | Class Methods | List of all members
PimoroniDisplayPack Class Reference

Pimoroni's Pico Display Pack, 1.14" or 2.8", on a Pico: a 135x240 or 240x320 color display. More...

#import <Devices/Devices.h>

Inheritance diagram for PimoroniDisplayPack:
Inheritance graph
[legend]
Collaboration diagram for PimoroniDisplayPack:
Collaboration graph
[legend]

Instance Methods

(id) - initWithRotation:
 Initializes the 1.14" pack at a rotation, as +displayPackWithRotation:.
 
(id) - initWithSize:rotation:
 Initializes a pack of a size at a rotation, as +displayPackWithSize:rotation:.
 
(NXLight *) - light
 Returns its RGB LED, which can be colored and dimmed. More...
 
(NXLight *) - backlight
 Returns its backlight, which can be dimmed, or turned off. More...
 
(BOOL) - setTarget:selector:
 Sets what its buttons, A, B, X and Y, are sent to while it's attached, as NXKeyEvents, or nil for nowhere. 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

(PimoroniDisplayPack *) + displayPack
 Returns the 1.14" pack, in landscape, 240x135, or nil if it isn't a Pico, or its pins are in use.
 
(PimoroniDisplayPack *) + displayPackWithRotation:
 Returns the 1.14" pack at a rotation, in degrees clockwise from portrait: 0, 90, 180 or 270. More...
 
(PimoroniDisplayPack *) + displayPackWithSize:rotation:
 Returns a pack of a size at a rotation, in degrees clockwise from portrait: 0, 90, 180 or 270. More...
 
- 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...
 

Detailed Description

Pimoroni's Pico Display Pack, 1.14" or 2.8", on a Pico: a 135x240 or 240x320 color display.

Its backlight is on, and its RGB LED off, when it's made, and both can be changed with -backlight and -light. Its buttons A, B, X and Y, on GP12 to GP15, pressed low, are sent to its target as keys, KEYCODE_A and so on, while it's attached (see -setTarget:selector:), or can be read with NXDigitalInput, pulled up.

Definition at line 30 of file PimoroniDisplayPack.h.

Method Documentation

◆ backlight()

- (NXLight *) backlight

Returns its backlight, which can be dimmed, or turned off.

The light retains the pack, so it's there while the light is.

◆ displayPackWithRotation:()

+ (PimoroniDisplayPack *) displayPackWithRotation: (uint16_t)  rotation

Returns the 1.14" pack at a rotation, in degrees clockwise from portrait: 0, 90, 180 or 270.

90 and 270 are landscape.

◆ displayPackWithSize:rotation:()

+ (PimoroniDisplayPack *) displayPackWithSize: (PimoroniDisplayPackSize)  size
rotation: (uint16_t)  rotation 

Returns a pack of a size at a rotation, in degrees clockwise from portrait: 0, 90, 180 or 270.

90 and 270 are landscape: 240x135 for the 1.14", and 320x240 for the 2.8".

◆ light()

- (NXLight *) light

Returns its RGB LED, which can be colored and dimmed.

The light retains the pack, so it's there while the light is.

◆ setTarget:selector:()

- (BOOL) setTarget: (id)  target
selector: (SEL)  selector 

Sets what its buttons, A, B, X and Y, are sent to while it's attached, as NXKeyEvents, or nil for nowhere.

Returns
YES, or NO if the selector isn't a method of the target which takes one object, or the buttons can't be read.

The documentation for this class was generated from the following file: