GPIO_NXP_Arduino 0.4.2
GPIO device operation sample code for Arduino
Loading...
Searching...
No Matches
GPIO_NXP.h
1
8#ifndef ARDUINO_GPIO_NXP_ARD_H
9#define ARDUINO_GPIO_NXP_ARD_H
10
11#include <Arduino.h>
12#include <stdint.h>
13
14#include <I2C_device.h>
15
21enum access_word : uint8_t
22{
23 IN,
24 OUT,
25 POLARITY,
26 CONFIG,
27 DRIVE_STRENGTH,
28 LATCH,
29 PULL_UD_EN,
30 PULL_UD_SEL,
31 INT_MASK,
32 INT_STATUS,
33 OUTPUT_PORT_CONFIG,
34 NUM_access_word,
35};
36
44class GPIO_base : public I2C_device
45{
46public:
47 enum board {
48 NONE,
49 ARDUINO_SHIELD,
50 };
51
53 const int n_bits;
54
56 const int n_ports;
57
65 GPIO_base( uint8_t i2c_address, const int nbits, const uint8_t* arp, uint8_t ai );
66
75 GPIO_base( TwoWire& wire, uint8_t i2c_address, const int nbits, const uint8_t* arp, uint8_t ai );
76
78 virtual ~GPIO_base();
79
89 void begin( board env = NONE );
90
99 void output( int port, uint8_t value, uint8_t mask = 0 );
100
107 void output( uint8_t *vp );
108
116 uint8_t input( int port );
117
125 uint8_t* input( uint8_t *vp );
126
135 void config( int port, uint8_t config, uint8_t mask = 0 );
136
143 void config( uint8_t* vp );
144
152 void write_port( access_word w, uint8_t* vp );
153
161 void write_port16( access_word w, uint16_t* vp );
162
171 uint8_t* read_port( access_word w, uint8_t* vp );
172
181 uint16_t* read_port16( access_word w, uint16_t* vp );
182
191 void write_port( access_word w, uint8_t value, int port_num = 0 );
192
201 void write_port16( access_word w, uint16_t value, int port_num = 0 );
202
211 uint8_t read_port( access_word w, int port_num = 0 );
212
221 uint16_t read_port16( access_word w, int port_num = 0 );
222
223 static void print_bin( uint8_t v );
224
225private:
226 const uint8_t* arp;
227 const uint8_t auto_increment;
228 bool endian;
229
230 static constexpr int RESET_PIN = 8;
231 static constexpr int ADDR_PIN = 9;
232
233 void init( void );
234};
235
240class PCA9554 : public GPIO_base
241{
242public:
244 enum reg_num {
245 Input_Port,
246 Output_Port,
247 Polarity_Inversion,
248 Configuration,
249 };
250
255 PCA9554( uint8_t i2c_address = (0x40 >> 1) + 0 );
256
262 PCA9554( TwoWire& wire, uint8_t i2c_address = (0x40 >> 1) + 0 );
263
265 virtual ~PCA9554();
266
267 static constexpr uint8_t access_ref[ NUM_access_word ] = {
268 Input_Port, // IN,
269 Output_Port, // OUT
270 Polarity_Inversion, // POLARITY
271 Configuration, // CONFIG
272 0xFF, // DRIVE_STRENGTH ** CANNOT BE USED **
273 0xFF, // LATCHLATCH ** CANNOT BE USED **
274 0xFF, // PULL_UD_EN ** CANNOT BE USED **
275 0xFF, // PULL_UD_SEL ** CANNOT BE USED **
276 0xFF, // INT_MASK ** CANNOT BE USED **
277 0xFF, // INT_STATUS ** CANNOT BE USED **
278 0xFF, // OUTPUT_PORT_CONFIG ** CANNOT BE USED **
279 };
280
281#if DOXYGEN_ONLY
283 enum board {
284 NONE,
285 ARDUINO_SHIELD,
286 };
287
289 const int n_bits;
290
292 const int n_ports;
293
303 void begin( board env = NONE );
304
313 void output( int port, uint8_t value, uint8_t mask = 0 );
314
321 void output( uint8_t *vp );
322
330 uint8_t input( int port );
331
339 uint8_t* input( uint8_t *vp );
340
349 void config( int port, uint8_t config, uint8_t mask = 0 );
350
357 void config( uint8_t* vp );
358
366 void write_port( access_word w, uint8_t* vp );
367
375 void write_port16( access_word w, uint16_t* vp );
376
385 uint8_t* read_port( access_word w, uint8_t* vp );
386
395 uint16_t* read_port16( access_word w, uint16_t* vp );
396
405 void write_port( access_word w, uint8_t value, int port_num = 0 );
406
415 void write_port16( access_word w, uint16_t value, int port_num = 0 );
416
425 uint8_t read_port( access_word w, int port_num = 0 );
426
435 uint16_t read_port16( access_word w, int port_num = 0 );
436#endif // DOXYGEN_ONLY
437
438};
439
444class PCA9555 : public GPIO_base
445{
446public:
448 enum reg_num {
449 Input_Port_0, Input_Port_1,
450 Output_Port_0, Output_Port_1,
451 Polarity_Inversion_Port_0, Polarity_Inversion_Port_1,
452 Configuration_Port_0, Configuration_Port_1,
453 };
454
459 PCA9555( uint8_t i2c_address = (0x40 >> 1) + 0 );
460
466 PCA9555( TwoWire& wire, uint8_t i2c_address = (0x40 >> 1) + 0 );
467
469 virtual ~PCA9555();
470
471 static constexpr uint8_t access_ref[ NUM_access_word ] = {
472 Input_Port_0, // IN,
473 Output_Port_0, // OUT
474 Polarity_Inversion_Port_0, // POLARITY
475 Configuration_Port_0, // CONFIG
476 0xFF, // DRIVE_STRENGTH ** CANNOT BE USED **
477 0xFF, // LATCHLATCH ** CANNOT BE USED **
478 0xFF, // PULL_UD_EN ** CANNOT BE USED **
479 0xFF, // PULL_UD_SEL ** CANNOT BE USED **
480 0xFF, // INT_MASK ** CANNOT BE USED **
481 0xFF, // INT_STATUS ** CANNOT BE USED **
482 0xFF, // OUTPUT_PORT_CONFIG ** CANNOT BE USED **
483 };
484
485#if DOXYGEN_ONLY
487 enum board {
488 NONE,
489 ARDUINO_SHIELD,
490 };
491
493 const int n_bits;
494
496 const int n_ports;
497
507 void begin( board env = NONE );
508
517 void output( int port, uint8_t value, uint8_t mask = 0 );
518
525 void output( uint8_t *vp );
526
534 uint8_t input( int port );
535
543 uint8_t* input( uint8_t *vp );
544
553 void config( int port, uint8_t config, uint8_t mask = 0 );
554
561 void config( uint8_t* vp );
562
570 void write_port( access_word w, uint8_t* vp );
571
579 void write_port16( access_word w, uint16_t* vp );
580
589 uint8_t* read_port( access_word w, uint8_t* vp );
590
599 uint16_t* read_port16( access_word w, uint16_t* vp );
600
609 void write_port( access_word w, uint8_t value, int port_num = 0 );
610
619 void write_port16( access_word w, uint16_t value, int port_num = 0 );
620
629 uint8_t read_port( access_word w, int port_num = 0 );
630
639 uint16_t read_port16( access_word w, int port_num = 0 );
640#endif // DOXYGEN_ONLY
641};
642
651{
652public:
653 PCAL6xxx_base( uint8_t i2c_address, const int nbits, const uint8_t arp[], uint8_t ai );
654 PCAL6xxx_base( TwoWire& wire, uint8_t i2c_address, const int nbits, const uint8_t arp[], uint8_t ai );
655 virtual ~PCAL6xxx_base();
656};
657
658
664{
665public:
667 enum reg_num {
668 Input_Port,
669 Output_Port,
670 Polarity_Inversion,
671 Configuration,
672 Output_drive_strength_0 = 0x40,
673 Output_drive_strength_1,
674 Input_latch,
675 Pull_up_pull_down_enable,
676 Pull_up_pull_down_selection,
677 Interrupt_mask,
678 Interrupt_status,
679 Output_port_configuration,
680 };
681
686 PCAL6408A( uint8_t i2c_address = (0x40 >> 1) + 0 );
687
693 PCAL6408A( TwoWire& wire, uint8_t i2c_address = (0x40 >> 1) + 0 );
694
696 virtual ~PCAL6408A();
697
698 static constexpr uint8_t access_ref[ NUM_access_word ] = {
699 Input_Port, // IN,
700 Output_Port, // OUT
701 Polarity_Inversion, // POLARITY
702 Configuration, // CONFIG
703 Output_drive_strength_0, // DRIVE_STRENGTH
704 Input_latch, // LATCHLATCH
705 Pull_up_pull_down_enable, // PULL_UD_EN
706 Pull_up_pull_down_selection, // PULL_UD_SEL
707 Interrupt_mask, // INT_MASK
708 Interrupt_status, // INT_STATUS
709 Output_port_configuration, // OUTPUT_PORT_CONFIG
710 };
711
712#if DOXYGEN_ONLY
714 enum board {
715 NONE,
716 ARDUINO_SHIELD,
717 };
718
720 const int n_bits;
721
723 const int n_ports;
724
734 void begin( board env = NONE );
735
744 void output( int port, uint8_t value, uint8_t mask = 0 );
745
752 void output( uint8_t *vp );
753
761 uint8_t input( int port );
762
770 uint8_t* input( uint8_t *vp );
771
780 void config( int port, uint8_t config, uint8_t mask = 0 );
781
788 void config( uint8_t* vp );
789
797 void write_port( access_word w, uint8_t* vp );
798
806 void write_port16( access_word w, uint16_t* vp );
807
816 uint8_t* read_port( access_word w, uint8_t* vp );
817
826 uint16_t* read_port16( access_word w, uint16_t* vp );
827
836 void write_port( access_word w, uint8_t value, int port_num = 0 );
837
846 void write_port16( access_word w, uint16_t value, int port_num = 0 );
847
856 uint8_t read_port( access_word w, int port_num = 0 );
857
866 uint16_t read_port16( access_word w, int port_num = 0 );
867#endif // DOXYGEN_ONLY
868};
869
875{
876public:
878 enum reg_num {
879 Input_Port_0, Input_Port_1,
880 Output_Port_0, Output_Port_1,
881 Polarity_Inversion_port_0, Polarity_Inversion_port_1,
882 Configuration_port_0, Configuration_port_1,
883 Output_drive_strength_register_0=0x40, Output_drive_strength_register_0B,
884 Output_drive_strength_register_1, Output_drive_strength_register_1B,
885 Input_latch_register_0, Input_latch_register_1,
886 Pull_up_pull_down_enable_register_0, Pull_up_pull_down_enable_register_1,
887 Pull_up_pull_down_selection_register_0, Pull_up_pull_down_selection_register_1,
888 Interrupt_mask_register_0, Interrupt_mask_register_1,
889 Interrupt_status_register_0, Interrupt_status_register_1,
890 Output_port_configuration_register,
891 };
892
897 PCAL6416A( uint8_t i2c_address = (0x40 >> 1) + 0 );
898
904 PCAL6416A( TwoWire& wire, uint8_t i2c_address = (0x40 >> 1) + 0 );
905
907 virtual ~PCAL6416A();
908
909 static constexpr uint8_t access_ref[ NUM_access_word ] = {
910 Input_Port_0, // IN,
911 Output_Port_0, // OUT
912 Polarity_Inversion_port_0, // POLARITY
913 Configuration_port_0, // CONFIG
914 Output_drive_strength_register_0, // DRIVE_STRENGTH
915 Input_latch_register_0, // LATCHLATCH
916 Pull_up_pull_down_enable_register_0, // PULL_UD_EN
917 Pull_up_pull_down_selection_register_0, // PULL_UD_SEL
918 Interrupt_mask_register_0, // INT_MASK
919 Interrupt_status_register_0, // INT_STATUS
920 Output_port_configuration_register, // OUTPUT_PORT_CONFIG
921 };
922
923#if DOXYGEN_ONLY
925 enum board {
926 NONE,
927 ARDUINO_SHIELD,
928 };
929
931 const int n_bits;
932
934 const int n_ports;
935
945 void begin( board env = NONE );
946
955 void output( int port, uint8_t value, uint8_t mask = 0 );
956
963 void output( uint8_t *vp );
964
972 uint8_t input( int port );
973
981 uint8_t* input( uint8_t *vp );
982
991 void config( int port, uint8_t config, uint8_t mask = 0 );
992
999 void config( uint8_t* vp );
1000
1008 void write_port( access_word w, uint8_t* vp );
1009
1017 void write_port16( access_word w, uint16_t* vp );
1018
1027 uint8_t* read_port( access_word w, uint8_t* vp );
1028
1037 uint16_t* read_port16( access_word w, uint16_t* vp );
1038
1047 void write_port( access_word w, uint8_t value, int port_num = 0 );
1048
1057 void write_port16( access_word w, uint16_t value, int port_num = 0 );
1058
1067 uint8_t read_port( access_word w, int port_num = 0 );
1068
1077 uint16_t read_port16( access_word w, int port_num = 0 );
1078#endif // DOXYGEN_ONLY
1079};
1080
1086{
1087public:
1089 enum reg_num {
1090 Input_Port_0, Input_Port_1, Input_Port_2, reserved0,
1091 Output_Port_0, Output_Port_1, Output_Port_2, reserved1,
1092 Polarity_Inversion_port_0, Polarity_Inversion_port_1, Polarity_Inversion_port_2, reserved2,
1093 Configuration_port_0, Configuration_port_1, Configuration_port_2,
1094 Output_drive_strength_register_port_0A=0x40, Output_drive_strength_register_port_0B,
1095 Output_drive_strength_register_port_1A, Output_drive_strength_register_port_1B,
1096 Output_drive_strength_register_port_2A, Output_drive_strength_register_port_2B,
1097 reserved3, reserved4,
1098 Input_latch_register_port_0, Input_latch_register_port_1, Input_latch_register_port_2, reserved5,
1099 Pull_up_pull_down_enable_register_port_0, Pull_up_pull_down_enable_register_port_1, Pull_up_pull_down_enable_register_port_2, reserved6,
1100 Pull_up_pull_down_selection_register_port_0, Pull_up_pull_down_selection_register_port_1, Pull_up_pull_down_selection_register_port_2, reserved7,
1101 Interrupt_mask_register_port_0, Interrupt_mask_register_port_1, Interrupt_mask_register_port_2, reserved8,
1102 Interrupt_status_register_port_0, Interrupt_status_register_port_1, Interrupt_status_register_port_2, reserved9,
1103 Output_port_configuration_register, reserved10, reserved11, reserved12,
1104 Interrupt_edge_register_port_0A, Interrupt_edge_register_port_0B,
1105 Interrupt_edge_register_port_1A, Interrupt_edge_register_port_1B,
1106 Interrupt_edge_register_port_2A, Interrupt_edge_register_port_2B,
1107 reserved13, reserved14,
1108 Interrupt_clear_register_port_0, Interrupt_clear_register_port_1, Interrupt_clear_register_port_2, reserved15,
1109 Input_status_port_0, Input_status_port_1, Input_status_port_2, reserved16,
1110 Individual_pin_output_port_0_configuration_register, Individual_pin_output_port_1_configuration_register, Individual_pin_output_port_2_configuration_register, reserved17,
1111 Switch_debounce_enable_0, Switch_debounce_enable_1, Switch_debounce_count,
1112 };
1113
1118 PCAL6524( uint8_t i2c_address = (0x44 >> 1) + 0 );
1119
1125 PCAL6524( TwoWire& wire, uint8_t i2c_address = (0x44 >> 1) + 0 );
1126
1128 virtual ~PCAL6524();
1129
1130 static constexpr uint8_t access_ref[ NUM_access_word ] = {
1131 Input_Port_0, // IN,
1132 Output_Port_0, // OUT
1133 Polarity_Inversion_port_0, // POLARITY
1134 Configuration_port_0, // CONFIG
1135 Output_drive_strength_register_port_0A, // DRIVE_STRENGTH
1136 Input_latch_register_port_0, // LATCHLATCH
1137 Pull_up_pull_down_enable_register_port_0, // PULL_UD_EN
1138 Pull_up_pull_down_selection_register_port_0, // PULL_UD_SEL
1139 Interrupt_mask_register_port_0, // INT_MASK
1140 Interrupt_status_register_port_0, // INT_STATUS
1141 Output_port_configuration_register, // OUTPUT_PORT_CONFIG
1142 };
1143
1144#if DOXYGEN_ONLY
1146 enum board {
1147 NONE,
1148 ARDUINO_SHIELD,
1149 };
1150
1152 const int n_bits;
1153
1155 const int n_ports;
1156
1166 void begin( board env = NONE );
1167
1176 void output( int port, uint8_t value, uint8_t mask = 0 );
1177
1184 void output( uint8_t *vp );
1185
1193 uint8_t input( int port );
1194
1202 uint8_t* input( uint8_t *vp );
1203
1212 void config( int port, uint8_t config, uint8_t mask = 0 );
1213
1220 void config( uint8_t* vp );
1221
1229 void write_port( access_word w, uint8_t* vp );
1230
1238 void write_port16( access_word w, uint16_t* vp );
1239
1248 uint8_t* read_port( access_word w, uint8_t* vp );
1249
1258 uint16_t* read_port16( access_word w, uint16_t* vp );
1259
1268 void write_port( access_word w, uint8_t value, int port_num = 0 );
1269
1278 void write_port16( access_word w, uint16_t value, int port_num = 0 );
1279
1288 uint8_t read_port( access_word w, int port_num = 0 );
1289
1298 uint16_t read_port16( access_word w, int port_num = 0 );
1299#endif // DOXYGEN_ONLY
1300};
1301
1307{
1308public:
1310 enum reg_num {
1311 Input_Port_0, Input_Port_1, Input_Port_2, Input_Port_3, Input_Port_4,
1312 Output_Port_0, Output_Port_1, Output_Port_2, Output_Port_3, Output_Port_4,
1313 Polarity_Inversion_port_0, Polarity_Inversion_port_1, Polarity_Inversion_port_2, Polarity_Inversion_port_3, Polarity_Inversion_port_4,
1314 Configuration_port_0, Configuration_port_1, Configuration_port_2, Configuration_port_3, Configuration_port_4,
1315 Output_drive_strength_register_port_0A = 0x30, Output_drive_strength_register_port_0B,
1316 Output_drive_strength_register_port_1A, Output_drive_strength_register_port_1B,
1317 Output_drive_strength_register_port_2A, Output_drive_strength_register_port_2B,
1318 Output_drive_strength_register_port_3A, Output_drive_strength_register_port_3B,
1319 Output_drive_strength_register_port_4A, reserved0,
1320 Input_latch_register_port_0, Input_latch_register_port_1, Input_latch_register_port_2, Input_latch_register_port_3, Input_latch_register_port_4,
1321 Pull_up_pull_down_enable_register_port_0, Pull_up_pull_down_enable_register_port_1, Pull_up_pull_down_enable_register_port_2, Pull_up_pull_down_enable_register_port_3, Pull_up_pull_down_enable_register_port_4,
1322 Pull_up_pull_down_selection_register_port_0, Pull_up_pull_down_selection_register_port_1, Pull_up_pull_down_selection_register_port_2, Pull_up_pull_down_selection_register_port_3, Pull_up_pull_down_selection_register_port_4,
1323 Interrupt_mask_register_port_0, Interrupt_mask_register_port_1, Interrupt_mask_register_port_2, Interrupt_mask_register_port_3, Interrupt_mask_register_port_4,
1324 Interrupt_status_register_port_0, Interrupt_status_register_port_1, Interrupt_status_register_port_2, Interrupt_status_register_port_3, Interrupt_status_register_port_4,
1325 Output_port_configuration_register,
1326 Interrupt_edge_register_port_0A, Interrupt_edge_register_port_0B,
1327 Interrupt_edge_register_port_1A, Interrupt_edge_register_port_1B,
1328 Interrupt_edge_register_port_2A, Interrupt_edge_register_port_2B,
1329 Interrupt_edge_register_port_3A, Interrupt_edge_register_port_3B,
1330 Interrupt_edge_register_port_4A, reserved1,
1331 Interrupt_clear_register_port_0, Interrupt_clear_register_port_1, Interrupt_clear_register_port_2, Interrupt_clear_register_port_3, Interrupt_clear_register_port_4,
1332 Input_status_port_0, Input_status_port_1, Input_status_port_2, Input_status_port_3, Input_status_port_4,
1333 Individual_pin_output_port_0_configuration_register, Individual_pin_output_port_1_configuration_register, Individual_pin_output_port_2_configuration_register, Individual_pin_output_port_3_configuration_register, Individual_pin_output_port_4_configuration_register,
1334 Switch_debounce_enable_0, Switch_debounce_enable_1,
1335 Switch_debounce_count,
1336 };
1337
1342 PCAL6534( uint8_t i2c_address = (0x44 >> 1) + 0 );
1343
1349 PCAL6534( TwoWire& wire, uint8_t i2c_address = (0x44 >> 1) + 0 );
1350
1352 virtual ~PCAL6534();
1353
1354 static constexpr uint8_t access_ref[ NUM_access_word ] = {
1355 Input_Port_0, // IN,
1356 Output_Port_0, // OUT
1357 Polarity_Inversion_port_0, // POLARITY
1358 Configuration_port_0, // CONFIG
1359 Output_drive_strength_register_port_0A, // DRIVE_STRENGTH
1360 Input_latch_register_port_0, // LATCHLATCH
1361 Pull_up_pull_down_enable_register_port_0, // PULL_UD_EN
1362 Pull_up_pull_down_selection_register_port_0, // PULL_UD_SEL
1363 Interrupt_mask_register_port_0, // INT_MASK
1364 Interrupt_status_register_port_0, // INT_STATUS
1365 Output_port_configuration_register, // OUTPUT_PORT_CONFIG
1366 };
1367
1368#if DOXYGEN_ONLY
1370 enum board {
1371 NONE,
1372 ARDUINO_SHIELD,
1373 };
1374
1376 const int n_bits;
1377
1379 const int n_ports;
1380
1390 void begin( board env = NONE );
1391
1400 void output( int port, uint8_t value, uint8_t mask = 0 );
1401
1408 void output( uint8_t *vp );
1409
1417 uint8_t input( int port );
1418
1426 uint8_t* input( uint8_t *vp );
1427
1436 void config( int port, uint8_t config, uint8_t mask = 0 );
1437
1444 void config( uint8_t* vp );
1445
1453 void write_port( access_word w, uint8_t* vp );
1454
1462 void write_port16( access_word w, uint16_t* vp );
1463
1472 uint8_t* read_port( access_word w, uint8_t* vp );
1473
1482 uint16_t* read_port16( access_word w, uint16_t* vp );
1483
1492 void write_port( access_word w, uint8_t value, int port_num = 0 );
1493
1502 void write_port16( access_word w, uint16_t value, int port_num = 0 );
1503
1512 uint8_t read_port( access_word w, int port_num = 0 );
1513
1522 uint16_t read_port16( access_word w, int port_num = 0 );
1523#endif // DOXYGEN_ONLY
1524};
1525
1526#endif // ARDUINO_GPIO_NXP_ARD_H
uint16_t * read_port16(access_word w, uint16_t *vp)
Definition GPIO_NXP.cpp:138
const int n_bits
Definition GPIO_NXP.h:53
void config(int port, uint8_t config, uint8_t mask=0)
Definition GPIO_NXP.cpp:80
const int n_ports
Definition GPIO_NXP.h:56
virtual ~GPIO_base()
Definition GPIO_NXP.cpp:33
void write_port16(access_word w, uint16_t *vp)
Definition GPIO_NXP.cpp:104
void output(int port, uint8_t value, uint8_t mask=0)
Definition GPIO_NXP.cpp:55
void write_port(access_word w, uint8_t *vp)
Definition GPIO_NXP.cpp:93
void begin(board env=NONE)
Definition GPIO_NXP.cpp:37
uint8_t input(int port)
Definition GPIO_NXP.cpp:68
uint8_t * read_port(access_word w, uint8_t *vp)
Definition GPIO_NXP.cpp:125
const int n_bits
Definition GPIO_NXP.h:289
void write_port16(access_word w, uint16_t value, int port_num=0)
void write_port(access_word w, uint8_t *vp)
void write_port16(access_word w, uint16_t *vp)
void config(uint8_t *vp)
const int n_ports
Definition GPIO_NXP.h:292
uint16_t read_port16(access_word w, int port_num=0)
void output(int port, uint8_t value, uint8_t mask=0)
uint16_t * read_port16(access_word w, uint16_t *vp)
void output(uint8_t *vp)
void config(int port, uint8_t config, uint8_t mask=0)
uint8_t * input(uint8_t *vp)
void begin(board env=NONE)
uint8_t * read_port(access_word w, uint8_t *vp)
uint8_t input(int port)
void write_port(access_word w, uint8_t value, int port_num=0)
uint8_t read_port(access_word w, int port_num=0)
virtual ~PCA9554()
Definition GPIO_NXP.cpp:203
uint8_t * read_port(access_word w, uint8_t *vp)
void write_port16(access_word w, uint16_t *vp)
void config(int port, uint8_t config, uint8_t mask=0)
uint16_t read_port16(access_word w, int port_num=0)
virtual ~PCA9555()
Definition GPIO_NXP.cpp:222
void write_port(access_word w, uint8_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)
void output(int port, uint8_t value, uint8_t mask=0)
void output(uint8_t *vp)
void config(uint8_t *vp)
const int n_bits
Definition GPIO_NXP.h:493
uint16_t * read_port16(access_word w, uint16_t *vp)
uint8_t * input(uint8_t *vp)
uint8_t input(int port)
const int n_ports
Definition GPIO_NXP.h:496
void begin(board env=NONE)
uint8_t read_port(access_word w, int port_num=0)
void write_port(access_word w, uint8_t *vp)
uint16_t * read_port16(access_word w, uint16_t *vp)
void write_port16(access_word w, uint16_t *vp)
const int n_bits
Definition GPIO_NXP.h:720
uint8_t * input(uint8_t *vp)
void write_port16(access_word w, uint16_t value, int port_num=0)
void begin(board env=NONE)
void config(uint8_t *vp)
uint16_t read_port16(access_word w, int port_num=0)
uint8_t * read_port(access_word w, uint8_t *vp)
const int n_ports
Definition GPIO_NXP.h:723
uint8_t read_port(access_word w, int port_num=0)
void config(int port, uint8_t config, uint8_t mask=0)
void write_port(access_word w, uint8_t value, int port_num=0)
virtual ~PCAL6408A()
Definition GPIO_NXP.cpp:258
void output(int port, uint8_t value, uint8_t mask=0)
void output(uint8_t *vp)
uint8_t input(int port)
void write_port16(access_word w, uint16_t *vp)
uint16_t read_port16(access_word w, int port_num=0)
void write_port(access_word w, uint8_t *vp)
void output(int port, uint8_t value, uint8_t mask=0)
void begin(board env=NONE)
uint8_t read_port(access_word w, int port_num=0)
uint8_t * input(uint8_t *vp)
void config(uint8_t *vp)
uint8_t * read_port(access_word w, uint8_t *vp)
uint16_t * read_port16(access_word w, uint16_t *vp)
uint8_t input(int port)
void output(uint8_t *vp)
void config(int port, uint8_t config, uint8_t mask=0)
const int n_ports
Definition GPIO_NXP.h:934
virtual ~PCAL6416A()
Definition GPIO_NXP.cpp:277
void write_port16(access_word w, uint16_t value, int port_num=0)
const int n_bits
Definition GPIO_NXP.h:931
void write_port(access_word w, uint8_t value, int port_num=0)
uint8_t read_port(access_word w, int port_num=0)
virtual ~PCAL6524()
Definition GPIO_NXP.cpp:296
void write_port16(access_word w, uint16_t *vp)
void config(int port, uint8_t config, uint8_t mask=0)
uint8_t * input(uint8_t *vp)
const int n_ports
Definition GPIO_NXP.h:1155
void begin(board env=NONE)
uint8_t * read_port(access_word w, uint8_t *vp)
void config(uint8_t *vp)
void output(uint8_t *vp)
void write_port(access_word w, uint8_t *vp)
uint16_t * read_port16(access_word w, uint16_t *vp)
void output(int port, uint8_t value, uint8_t mask=0)
void write_port16(access_word w, uint16_t value, int port_num=0)
uint16_t read_port16(access_word w, int port_num=0)
void write_port(access_word w, uint8_t value, int port_num=0)
const int n_bits
Definition GPIO_NXP.h:1152
uint8_t input(int port)
void config(uint8_t *vp)
void write_port16(access_word w, uint16_t value, int port_num=0)
uint8_t * read_port(access_word w, uint8_t *vp)
const int n_ports
Definition GPIO_NXP.h:1379
uint16_t read_port16(access_word w, int port_num=0)
virtual ~PCAL6534()
Definition GPIO_NXP.cpp:315
void write_port(access_word w, uint8_t *vp)
uint8_t read_port(access_word w, int port_num=0)
void write_port(access_word w, uint8_t value, int port_num=0)
void begin(board env=NONE)
uint16_t * read_port16(access_word w, uint16_t *vp)
void config(int port, uint8_t config, uint8_t mask=0)
uint8_t * input(uint8_t *vp)
uint8_t input(int port)
void output(int port, uint8_t value, uint8_t mask=0)
void output(uint8_t *vp)
const int n_bits
Definition GPIO_NXP.h:1376
void write_port16(access_word w, uint16_t *vp)