#include <stdint.h>
#include <neo6502.h>
Go to the source code of this file.
|
void | neo_uext_init (void) |
| Initialise the UExt I/O system. More...
|
|
void | neo_uext_gpio_write (uint8_t pin, uint8_t value) |
| Write the specified value to the output latch for the specified UEXT pin. More...
|
|
uint8_t | neo_uext_gpio_read (uint8_t pin) |
| Reads the value on the specified UEXT pin. More...
|
|
void | neo_uext_gpio_set_direction (uint8_t pin, uint8_t direction) |
| Set the direction of the specified UEXT pin. More...
|
|
void | neo_uext_i2c_write (uint8_t device, uint8_t reg, uint8_t value) |
| Write to an I2C device. More...
|
|
uint8_t | neo_uext_i2c_read (uint8_t device, uint8_t reg) |
| Read from an I2C device. More...
|
|
uint16_t | neo_uext_analogue_read (uint8_t pin) |
| Read from an analogue input pin. More...
|
|
uint8_t | neo_uext_i2c_status (uint8_t device) |
| Query the I2C device status. More...
|
|
void | neo_uext_i2c_block_read (uint8_t device, void *dest, uint16_t len) |
| Read a block from an I2C device. More...
|
|
void | neo_uext_i2c_block_write (uint8_t device, const void *src, uint16_t len) |
| Write a block to an I2C device. More...
|
|
void | neo_uext_spi_block_read (uint8_t device, void *dest, uint16_t len) |
| Read a block from an SPI device. More...
|
|
void | neo_uext_spi_block_write (uint8_t device, const void *src, uint16_t len) |
| Write a block to an SPI device. More...
|
|
◆ neo_uext_direction_t
◆ neo_uext_direction
Enumerator |
---|
NEO_UEXT_INPUT | |
NEO_UEXT_OUTPUT | |
NEO_UEXT_ANALOGUE_INPUT | |
◆ neo_uext_analogue_read()
uint16_t neo_uext_analogue_read |
( |
uint8_t |
pin | ) |
|
Read from an analogue input pin.
Check errors with
- See also
- neo_api_error
◆ neo_uext_gpio_read()
uint8_t neo_uext_gpio_read |
( |
uint8_t |
pin | ) |
|
Reads the value on the specified UEXT pin.
If the pin is set to input, this will read the level on the pin. If the pin is set to output, this will read the value set on the output latch.
- See also
- neo_uext_gpio_write
Check errors with
- See also
- neo_api_error
◆ neo_uext_gpio_set_direction()
void neo_uext_gpio_set_direction |
( |
uint8_t |
pin, |
|
|
uint8_t |
direction |
|
) |
| |
◆ neo_uext_gpio_write()
void neo_uext_gpio_write |
( |
uint8_t |
pin, |
|
|
uint8_t |
value |
|
) |
| |
Write the specified value to the output latch for the specified UEXT pin.
This will only be output if the pin is enabled and its direction set to output.
Check errors with
- See also
- neo_api_error
◆ neo_uext_i2c_block_read()
void neo_uext_i2c_block_read |
( |
uint8_t |
device, |
|
|
void * |
dest, |
|
|
uint16_t |
len |
|
) |
| |
Read a block from an I2C device.
Check errors with
- See also
- neo_api_error
◆ neo_uext_i2c_block_write()
void neo_uext_i2c_block_write |
( |
uint8_t |
device, |
|
|
const void * |
src, |
|
|
uint16_t |
len |
|
) |
| |
Write a block to an I2C device.
Check errors with
- See also
- neo_api_error
◆ neo_uext_i2c_read()
uint8_t neo_uext_i2c_read |
( |
uint8_t |
device, |
|
|
uint8_t |
reg |
|
) |
| |
◆ neo_uext_i2c_status()
uint8_t neo_uext_i2c_status |
( |
uint8_t |
device | ) |
|
Query the I2C device status.
Check errors with
- See also
- neo_api_error
- Returns
- Non-zero if present.
◆ neo_uext_i2c_write()
void neo_uext_i2c_write |
( |
uint8_t |
device, |
|
|
uint8_t |
reg, |
|
|
uint8_t |
value |
|
) |
| |
◆ neo_uext_init()
void neo_uext_init |
( |
void |
| ) |
|
Initialise the UExt I/O system.
Set all UEXT pins to I/O pins, inputs and enabled.
◆ neo_uext_spi_block_read()
void neo_uext_spi_block_read |
( |
uint8_t |
device, |
|
|
void * |
dest, |
|
|
uint16_t |
len |
|
) |
| |
Read a block from an SPI device.
Check errors with
- See also
- neo_api_error
◆ neo_uext_spi_block_write()
void neo_uext_spi_block_write |
( |
uint8_t |
device, |
|
|
const void * |
src, |
|
|
uint16_t |
len |
|
) |
| |
Write a block to an SPI device.
Check errors with
- See also
- neo_api_error