![]() |
LibDriver PCF8575
|
driver pcf8575 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | pcf8575_handle_s |
| pcf8575 handle structure definition More... | |
| struct | pcf8575_info_s |
| pcf8575 information structure definition More... | |
Macros | |
| #define | DRIVER_PCF8575_LINK_INIT(HANDLE, STRUCTURE) |
| initialize pcf8575_handle_t structure | |
| #define | DRIVER_PCF8575_LINK_IIC_INIT(HANDLE, FUC) |
| link iic_init function | |
| #define | DRIVER_PCF8575_LINK_IIC_DEINIT(HANDLE, FUC) |
| link iic_deinit function | |
| #define | DRIVER_PCF8575_LINK_IIC_READ_COMMAND(HANDLE, FUC) |
| link iic_read_cmd function | |
| #define | DRIVER_PCF8575_LINK_IIC_WRITE_COMMAND(HANDLE, FUC) |
| link iic_write_cmd function | |
| #define | DRIVER_PCF8575_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_PCF8575_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
Typedefs | |
| typedef struct pcf8575_handle_s | pcf8575_handle_t |
| pcf8575 handle structure definition | |
| typedef struct pcf8575_info_s | pcf8575_info_t |
| pcf8575 information structure definition | |
Enumerations | |
| enum | pcf8575_address_t { PCF8575_ADDRESS_A000 = 0 , PCF8575_ADDRESS_A001 = 1 , PCF8575_ADDRESS_A010 = 2 , PCF8575_ADDRESS_A011 = 3 , PCF8575_ADDRESS_A100 = 4 , PCF8575_ADDRESS_A101 = 5 , PCF8575_ADDRESS_A110 = 6 , PCF8575_ADDRESS_A111 = 7 } |
| pcf8575 address enumeration definition More... | |
| enum | pcf8575_pin_t { PCF8575_PIN_00 = 0x08 , PCF8575_PIN_01 = 0x09 , PCF8575_PIN_02 = 0x0A , PCF8575_PIN_03 = 0x0B , PCF8575_PIN_04 = 0x0C , PCF8575_PIN_05 = 0x0D , PCF8575_PIN_06 = 0x0E , PCF8575_PIN_07 = 0x0F , PCF8575_PIN_10 = 0x00 , PCF8575_PIN_11 = 0x01 , PCF8575_PIN_12 = 0x02 , PCF8575_PIN_13 = 0x03 , PCF8575_PIN_14 = 0x04 , PCF8575_PIN_15 = 0x05 , PCF8575_PIN_16 = 0x06 , PCF8575_PIN_17 = 0x07 } |
| pcf8575 pin enumeration definition More... | |
| enum | pcf8575_pin_level_t { PCF8575_PIN_LEVEL_LOW = 0x00 , PCF8575_PIN_LEVEL_HIGH = 0x01 } |
| pcf8575 pin enumeration definition More... | |
Functions | |
| uint8_t | pcf8575_info (pcf8575_info_t *info) |
| get chip's information | |
| uint8_t | pcf8575_set_addr_pin (pcf8575_handle_t *handle, pcf8575_address_t addr_pin) |
| set the address pin | |
| uint8_t | pcf8575_get_addr_pin (pcf8575_handle_t *handle, pcf8575_address_t *addr_pin) |
| get the address pin | |
| uint8_t | pcf8575_init (pcf8575_handle_t *handle) |
| initialize the chip | |
| uint8_t | pcf8575_deinit (pcf8575_handle_t *handle) |
| close the chip | |
| uint8_t | pcf8575_read (pcf8575_handle_t *handle, pcf8575_pin_t pin, pcf8575_pin_level_t *level) |
| read the pin | |
| uint8_t | pcf8575_write (pcf8575_handle_t *handle, pcf8575_pin_t pin, pcf8575_pin_level_t level) |
| write the pin | |
| uint8_t | pcf8575_set_reg (pcf8575_handle_t *handle, uint8_t *buf, uint16_t len) |
| set the chip register | |
| uint8_t | pcf8575_get_reg (pcf8575_handle_t *handle, uint8_t *buf, uint16_t len) |
| get the chip register | |
driver pcf8575 header file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description |
|---|---|---|---|
| 2025/07/29 | 1.0 | Shifeng Li | first upload |
Definition in file driver_pcf8575.h.