Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
sif_pi4ioe5v6408.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "cascoda-bm/cascoda_interface.h"
#include "cascoda-bm/cascoda_sensorif.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda-bm/cascoda_wait.h"
#include "cascoda-util/cascoda_time.h"
#include "ca821x_api.h"
#include "sif_pi4ioe5v6408.h"
Include dependency graph for sif_pi4ioe5v6408.c:

Functions

bool SIF_PI4IOE5V6408_IsInterruptActive (void)
 Device initialisation. More...
 
uint8_t SIF_PI4IOE5V6408_Initialise (void)
 Device initialisation. More...
 
uint8_t SIF_PI4IOE5V6408_ReadDeviceId (uint8_t *chip_id, uint8_t *rev_id)
 Read chip id and revision id. More...
 
uint8_t SIF_PI4IOE5V6408_SenseInput (uint8_t io, uint8_t *val)
 sense specific input More...
 
uint8_t SIF_PI4IOE5V6408_SenseOutput (uint8_t io, uint8_t *val)
 sense specific output More...
 
uint8_t SIF_PI4IOE5V6408_SenseAllInputs (uint8_t *port)
 sense all inputs (0-7) for port More...
 
uint8_t SIF_PI4IOE5V6408_SetOutput (uint8_t io, uint8_t val)
 set specific output More...
 
uint8_t SIF_PI4IOE5V6408_ConfigureInput (uint8_t io, uint8_t irq_on, uint8_t pullup_on)
 configure input More...
 
uint8_t SIF_PI4IOE5V6408_ConfigureOutput (uint8_t io)
 configure output More...
 

Variables

uint8_t SIF_PI4IOE5V6408_HasInterrupt = 0
 

Function Documentation

◆ SIF_PI4IOE5V6408_ConfigureInput()

uint8_t SIF_PI4IOE5V6408_ConfigureInput ( uint8_t  io,
uint8_t  irq_on,
uint8_t  pullup_on 
)

configure input

Parameters
io- port bit number (0-7)
irq_on- irq enabled when (1)
pullup_on- pull-up enabled when (1)
Returns
pi4ioe5v6408_status

◆ SIF_PI4IOE5V6408_ConfigureOutput()

uint8_t SIF_PI4IOE5V6408_ConfigureOutput ( uint8_t  io)

configure output

Parameters
io- port bit number (0-7)
Returns
pi4ioe5v6408_status

◆ SIF_PI4IOE5V6408_Initialise()

uint8_t SIF_PI4IOE5V6408_Initialise ( void  )

Device initialisation.

Returns
pi4ioe5v6408_status

◆ SIF_PI4IOE5V6408_IsInterruptActive()

bool SIF_PI4IOE5V6408_IsInterruptActive ( void  )

Device initialisation.

Returns
true if active, false if not

◆ SIF_PI4IOE5V6408_ReadDeviceId()

uint8_t SIF_PI4IOE5V6408_ReadDeviceId ( uint8_t *  chip_id,
uint8_t *  rev_id 
)

Read chip id and revision id.

Parameters
chip_id- device id code
rev_id- firmware revision
Returns
pi4ioe5v6408_status

◆ SIF_PI4IOE5V6408_SenseAllInputs()

uint8_t SIF_PI4IOE5V6408_SenseAllInputs ( uint8_t *  port)

sense all inputs (0-7) for port

Parameters
port- returned i/o states
Returns
pi4ioe5v6408_status

◆ SIF_PI4IOE5V6408_SenseInput()

uint8_t SIF_PI4IOE5V6408_SenseInput ( uint8_t  io,
uint8_t *  val 
)

sense specific input

Parameters
io- port bit number (0-7)
val- returned i/o state
Returns
pi4ioe5v6408_status

◆ SIF_PI4IOE5V6408_SenseOutput()

uint8_t SIF_PI4IOE5V6408_SenseOutput ( uint8_t  io,
uint8_t *  val 
)

sense specific output

Parameters
io- port bit number (0-7)
val- returned i/o state
Returns
pi4ioe5v6408_status

◆ SIF_PI4IOE5V6408_SetOutput()

uint8_t SIF_PI4IOE5V6408_SetOutput ( uint8_t  io,
uint8_t  val 
)

set specific output

Parameters
io- port bit number (0-7)
val- i/o state
Returns
pi4ioe5v6408_status

Variable Documentation

◆ SIF_PI4IOE5V6408_HasInterrupt

uint8_t SIF_PI4IOE5V6408_HasInterrupt = 0