Public Documentation
  • Introduction
  • Getting started
    • Introduction
    • 1. Welcome Page
    • 2. Introduction (Beginner's Guide)
  • Portal Tools
    • Blocko
      • Ůvod do blocka
      • Flip-flop
      • REST-API bloček
    • Grid
      • Úvod do GRID
      • Základní Tlačítko (základy GRID)
      • vylepšený Přepínač (stylování a pokročilé možnosti GRID)
      • text generátor button (messeage type, two elements one widget)
      • graf (pokročilé funkce GRID)
      • Slider (User class v GRIDu)
      • Styly a jejich použití
  • Cloud
    • Cloud
    • Instancies
    • Rest-Api
  • General
    • What we plan
  • Hardware a programování
    • Úvod
      • Nahrání prvního programu
    • Konektivita
      • Specifikace zdroje internetu
      • GSM
      • 6LowPAN
      • Komunikace s portálem
      • Přepínání mezi servery
    • Hardware
      • Základní jednotky
        • IODAG3E
          • Rozhraní a periférie
          • Konektor X a Y
          • Napájení
          • Připojení zdroje k VBAT
          • Paměti
          • Technické specifikace
          • Schémata
        • IODAG3L
      • Rozšiřující moduly
        • GSM shield
        • LED shield
        • Relay shield
        • RFID shield
        • Ultrasonic shield
        • Meteo shield
        • Movement shield
        • PIR shield
        • RGB Displej shield
        • Serial shield
      • Ostatní
        • DevKitG3
          • Schéma
        • TK3G
          • Schéma
        • ZPPG3
          • Schéma
        • WEXP
    • Programování HW
      • Architektura FW
        • Aktualizace FW
        • Autobackup
      • Struktura programu
      • Byzance API
        • Vstupy a výstupy do Portálu
        • Callback Busy
        • Odložený restart
        • Callbacky připojení
        • Uživatelská makra
      • MBED API
        • Vstupy a výstupy
        • Komunikační rozhraní
        • Časování
        • RTOS
      • Knihovny
        • DHT
        • DS1820
        • Dali
        • EdgeStruct
        • I2CWrapper
        • Knock
        • MFRC522
        • MFRC522::MIFARE_Key
        • MPU9150
        • ms5637
        • OneWire
        • PCA9536
        • RGB_matrix
        • RollerDrive
        • SHT21
        • ST7565
        • Servo
        • TCA6424A
        • TLC59116
        • TripleSevenSeg
        • MFRC522::Uid
        • WS2812
        • WakeUp
      • Offline programování
        • Vlastní IDE
        • Upload kódu z GUI
        • Upload kódu z konzole
        • Upload kódu Drag&drop
    • Tutoriály
      • Datum a čas (RTC)
      • Komunikace po sériové lince (UART) s PC
        • Konfigurace sériové linky v PC
        • Programování sériové linky
      • Základní tutoriály
        • Digital Read
        • Analog Read/Write
        • PWM Fade
        • Timer/Ticker
        • State Change Detection
        • Ovládání LED modulu
        • BusOut
        • HC-SR04 Senzor
      • Pokročilé
    • Správa a diagnostika
      • Zdroj restartu
      • LED modul
      • Identifikace zařízení
      • Monitoring parametrů
      • Vytížení zařízení
      • Webové rozhraní
        • Základní přehled
        • Správce firmware
        • Vlákna
        • Definované vstupy
        • Konfigurace MQTT
        • Nastavení
      • Bootloader
        • Režimy bootloaderu
        • Command mód
        • Další vlastnosti bootloaderu
      • Webová konzole
      • Konfigurace zařízení
        • Confighash
      • Omezení konfigurace
        • Konfigurace
        • Binárky
        • Omezení MQTT
        • Lowpan
    • Knowledge base
      • Náhodná čísla
      • Watchdog
      • Paměť RAM
Powered by GitBook
On this page
  • Protected Attributes
  • Public Functions
  • Protected Functions
  • Protected Attributes Documentation
  • variable _i2c
  • Public Functions Documentation
  • function PCA9536
  • function set_all_inputs
  • function set_all_outputs
  • function set_output
  • function set_input
  • function set_value
  • function set_value
  • function get_value
  • function get_value
  • Protected Functions Documentation
  • function _write_reg
  • function _read_reg
  1. Hardware a programování
  2. Programování HW
  3. Knihovny

PCA9536

PreviousOneWireNextRGB_matrix

Last updated 6 years ago

Driver for 4-bit I2C IO pin expander.

Protected Attributes

Type

Name

I2C

Public Functions

Type

Name

int

int

int

int

int

int

int

int

Protected Functions

Type

Name

int

int

Protected Attributes Documentation

I2C PCA9536::_i2c;

Public Functions Documentation

PCA9536::PCA9536 (
    PinName sda,
    PinName scl
)
int PCA9536::set_all_inputs ()

Set port as input.

Returns:

0 on success; non-0 on fail

int PCA9536::set_all_outputs ()

Set port as output.

Returns:

0 on success; non-0 on fail

int PCA9536::set_output (
    uint8_t pin
)

Set pin as output.

Parameters:

  • pin pin number to set as output (0 - 3)

Returns:

0 on success; -2 on invalid pin; non-0 on fail

int PCA9536::set_input (
    uint8_t pin
)

Set pin as input.

Parameters:

  • pin pin number to set (0 - 3)

Returns:

0 on success; -2 on invalid pin; non-0 on fail

int PCA9536::set_value (
    uint8_t value
)

Set port value.

Parameters:

  • value value to set on port (0 - F)

Returns:

0 on success; non-0 on fail

int PCA9536::set_value (
    uint8_t pin,
    uint8_t value
)

Set pin value.

Parameters:

  • pin pin number to set (0 - 3)

  • pin value to set (0 or 1)

Returns:

0 on success; -2 on invalid pin; non-0 on fail

int PCA9536::get_value (
    uint8_t * value
)

Get port value.

Parameters:

  • value pointer to byte to read the value in to

Returns:

0 on success; non-0 on fail

int PCA9536::get_value (
    uint8_t pin,
    uint8_t * value
)

Get pin value.

Parameters:

  • pin pin to read

  • value pointer to byte to read the value in to

Returns:

0 on success; -2 on invalid pin; non-0 on fail

Protected Functions Documentation

int PCA9536::_write_reg (
    uint8_t reg,
    uint8_t val
)
int PCA9536::_read_reg (
    uint8_t reg,
    uint8_t * val
)

The documentation for this class was generated from the following file: D:/w/hw-libs/\_libs\_/libraries/PCA9536.h

(PinName sda, PinName scl)

()

()

(uint8_t pin)

(uint8_t pin)

(uint8_t value)

(uint8_t pin, uint8_t value)

(uint8_t * value)

(uint8_t pin, uint8_t * value)

(uint8_t reg, uint8_t val)

(uint8_t reg, uint8_t * val)

variable

function

function

function

function

function

function

function

function

function

function

function

PCA9536
_i2c
PCA9536
set_all_inputs
set_all_outputs
set_output
set_input
set_value
set_value
get_value
get_value
_write_reg
_read_reg
_i2c
PCA9536
set_all_inputs
set_all_outputs
set_output
set_input
set_value
set_value
get_value
get_value
_write_reg
_read_reg