A library for interfacing with the Pixy color recognition camera
Dependents: PixyCamera MbedOS_Robot_Team ManualControlFinal PlayBack ... more
PixyInterfaceSPI Class Reference
An interface for communicating between the Pixy via an SPI interface. More...
#include <TPixyInterface.h>
Inherits TPixyInterface.
Public Member Functions | |
PixyInterfaceSPI (SPI *interface) | |
Constructs a PixyInterfaceSPI object. | |
virtual void | init () |
Initializes the PixyInterfaceSPI. | |
virtual uint16_t | getWord () |
Reads a word from the interface. | |
virtual uint8_t | getByte () |
Reads a byte from the interface. | |
virtual int8_t | send (uint8_t *data, uint8_t len) |
Sends the given data to the Pixy with a given data length. | |
virtual void | setArg (uint16_t arg) |
Sets an argument for the interface to use [unused]. |
Detailed Description
An interface for communicating between the Pixy via an SPI interface.
Definition at line 80 of file TPixyInterface.h.
Constructor & Destructor Documentation
PixyInterfaceSPI | ( | SPI * | interface ) |
Constructs a PixyInterfaceSPI object.
- Parameters:
-
interface the SPI pointer
Definition at line 3 of file TPixyInterface.cpp.
Member Function Documentation
uint8_t getByte | ( | ) | [virtual] |
Reads a byte from the interface.
- Returns:
- the byte read from the interface
Implements TPixyInterface.
Definition at line 21 of file TPixyInterface.cpp.
uint16_t getWord | ( | ) | [virtual] |
Reads a word from the interface.
- Returns:
- the word read from the interface
Implements TPixyInterface.
Definition at line 10 of file TPixyInterface.cpp.
void init | ( | ) | [virtual] |
Initializes the PixyInterfaceSPI.
Implements TPixyInterface.
Definition at line 5 of file TPixyInterface.cpp.
int8_t send | ( | uint8_t * | data, |
uint8_t | len | ||
) | [virtual] |
Sends the given data to the Pixy with a given data length.
- Parameters:
-
data the data to send len the length of the data to send
- Returns:
- the interface return signal
Implements TPixyInterface.
Definition at line 27 of file TPixyInterface.cpp.
void setArg | ( | uint16_t | arg ) | [virtual] |
Sets an argument for the interface to use [unused].
- Parameters:
-
arg the argument to use
Implements TPixyInterface.
Definition at line 41 of file TPixyInterface.cpp.
Generated on Tue Jul 12 2022 18:15:33 by 1.7.2