GPIO_NXP_Arduino 0.3.0
GPIO device operation sample code for Arduino
|
#include <GPIO_NXP.h>
Public Types | |
enum | reg_num { Input_Port_0 , Input_Port_1 , Output_Port_0 , Output_Port_1 , Polarity_Inversion_port_0 , Polarity_Inversion_port_1 , Configuration_port_0 , Configuration_port_1 , Output_drive_strength_register_0 =0x40 , Output_drive_strength_register_0B , Output_drive_strength_register_1 , Output_drive_strength_register_1B , Input_latch_register_0 , Input_latch_register_1 , Pull_up_pull_down_enable_register_0 , Pull_up_pull_down_enable_register_1 , Pull_up_pull_down_selection_register_0 , Pull_up_pull_down_selection_register_1 , Interrupt_mask_register_0 , Interrupt_mask_register_1 , Interrupt_status_register_0 , Interrupt_status_register_1 , Output_port_configuration_register } |
![]() | |
enum | board { NONE , ARDUINO_SHIELD } |
Public Member Functions | |
PCAL6416A (uint8_t i2c_address=(0x40 > > 1)+0) | |
![]() | |
PCAL6xxx_base (uint8_t i2c_address, const int nbits, const uint8_t arp[], uint8_t ai) | |
![]() | |
GPIO_base (uint8_t i2c_address, const int nbits, const uint8_t *arp, uint8_t ai) | |
virtual | ~GPIO_base () |
void | begin (board env=NONE) |
void | output (int port, uint8_t value, uint8_t mask=0) |
void | output (uint8_t *vp) |
uint8_t | input (int port) |
uint8_t * | input (uint8_t *vp) |
void | config (int port, uint8_t config, uint8_t mask=0) |
void | config (uint8_t *vp) |
void | write_port (access_word w, uint8_t *vp) |
void | write_port16 (access_word w, uint16_t *vp) |
uint8_t * | read_port (access_word w, uint8_t *vp) |
uint16_t * | read_port16 (access_word w, uint16_t *vp) |
void | write_port (access_word w, uint8_t value, int port_num=0) |
void | write_port16 (access_word w, uint16_t value, int port_num=0) |
uint8_t | read_port (access_word w, int port_num=0) |
uint16_t | read_port16 (access_word w, int port_num=0) |
Static Public Attributes | |
static constexpr uint8_t | access_ref [NUM_access_word] |
Additional Inherited Members | |
![]() | |
static void | print_bin (uint8_t v) |
![]() | |
const int | n_bits |
const int | n_ports |
PCAL6416A class
Definition at line 345 of file GPIO_NXP.h.
enum PCAL6416A::reg_num |
Name of the PCAL6416A registers
Definition at line 349 of file GPIO_NXP.h.
PCAL6416A::PCAL6416A | ( | uint8_t | i2c_address = (0x40 >> 1) + 0 | ) |
Definition at line 232 of file GPIO_NXP.cpp.
|
virtual |
Definition at line 237 of file GPIO_NXP.cpp.
|
staticconstexpr |
Definition at line 367 of file GPIO_NXP.h.