Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
M
 Macros
 Macros and Variables
 MAKE_BITFIELD_AT
 MCP23018 IOCON Bit Numbers
 MCP23018 Register Addresses
 mcp23018.h
 MCP23018_BANK
 mcp23018_begin_read
 mcp23018_begin_write
 MCP23018_DEFVALx
 MCP23018_GPINTENx
 MCP23018_GPIOx
 MCP23018_GPPUx
 MCP23018_INTCAPx
 MCP23018_INTCC
 MCP23018_INTCONx
 MCP23018_INTFx
 MCP23018_INTPOL
 MCP23018_IOCON
 MCP23018_IODIRx
 MCP23018_IPOLx
 mcp23018_is_valid_reg
 MCP23018_MAX_BANK
 MCP23018_MAX_PAIR
 MCP23018_MIRROR
 MCP23018_NOT_A_REG
 MCP23018_ODR
 MCP23018_OLATx
 mcp23018_poll_read
 mcp23018_read
 mcp23018_reg
 MCP23018_REG_MASK
 MCP23018_SEQOP
 mcp23018_write
 mcp4x.h
 MCP4X_P0
 MCP4X_P1
 mcp4x_set_wiper
 mcp4x_shutdown
 memmon.h
 memmon_add
 memmon_cptr
 memmon_drop_count
 memmon_free_ram
 memmon_get_free_ram
 memmon_header
 memmon_init
 MEMMON_MAKE_CPTR
 MEMMON_MAKE_PTR
 memmon_max_monitors
 MEMMON_MAX_SIZE
 memmon_msg_count
 memmon_n_monitors
 memmon_ptr
 memmon_remove
 memmon_remove_ptr
 memmon_shutdown
 memmon_spec
 Message Lengths and Type Checking
 Message Types
 mon_i, memmon_header
 msg_id, ttlv_s_inm_header
 MUSECS_TO_CYCLES
Maps a field size, a field offset and an arbitary integer to an integer that has a bitfield with the specified size at the specified offset, containing bits from the arbitrary integer.
An MCP23018 can be reconfigured by setting these bits in the IOCON register.
These registers are used to configure and perform I/O with an MCP23018 via I2C.
Helper module for controlling an MCP23018 I/O expander via I2C.
register bank mode enable, 0: registers paired, 1: registers in banks
i2c_state mcp23018_begin_read(i2c_slave_addr addr,
mcp23018_reg r)
Starts an asynchronous register read operation.
i2c_state mcp23018_begin_write(i2c_slave_addr addr,
mcp23018_reg r,
uint8_t v)
Starts an asynchronous register write operation.
[RW] reference value for level-triggered interrupts
[RW] interrupt trigger enable, 0: disabled, 1: enabled
[RW] I/O port register
[RW] I/O pull-up enable, 0: disabled, 1: enabled
[R] interrupt capture register
interrupt clearing control, 0: clear on GPIO read, 1: clear on INTCAP read
[RW] interrupt mode select, 0: edge-triggered, 1: level-triggered
[R] interrupt flag register, 0: no interrupt, 1: interrupt pending
interrupt output polarity, 0: active-low, 1: active-high
[RW] configuration register
[RW] I/O direction, 0: output, 1: input
[RW] input polarity, 0: same, 1: inverted
uint8_t mcp23018_is_valid_reg(mcp23018_reg r)
Register address validator.
The largest valid register bank address.
The largest valid register pair address.
mirrored interrupt output enable, 0: outputs separate, 1: outputs mirrored
guaranteed to NOT be a valid register address
open-drain interrupt output enable, 0: active driver, 1: open-drain
[RW] output latch register
i2c_state mcp23018_poll_read(uint8_t *v)
Tests whether there is an ongoing I2C operation.
i2c_state mcp23018_read(i2c_slave_addr addr,
mcp23018_reg r,
uint8_t *v)
Performs a synchronous register read operation.
typedef uint8_t mcp23018_reg
The type of MCP23018 register addresses.
Bit mask for the valid bits of an MCP23018 register address.
sequential operation disable, 0: address auto-incremented, 1: address retained
i2c_state mcp23018_write(i2c_slave_addr addr,
mcp23018_reg r,
uint8_t v)
Performs a synchronous register write operation.
Control functions for the MCP4x series of digitally controlled potentiometers.
Numeric identifier of the P0 potentiometer in an MCP4x device.
Numeric identifier of the P1 potentiometer in an MCP4x device.
uint8_t mcp4x_set_wiper(uint8_t pot_bits,
uint8_t pos)
Updates potentiometer wiper settings in the selected MCP4x device.
uint8_t mcp4x_shutdown(uint8_t pot_bits)
Disables potentiometers in the selected MCP4x device.
A memory monitor module that uses the task_sched.h scheduler to periodically execute a task that sends messages about the content of specified memory locations via the task_tlv.h module.
uint8_t memmon_add(const memmon_spec *mon)
Registers a memory monitor.
typedef const uint8_t *memmon_cptr
The type of pointers to constant memory locations in the memory monitor API.
extern uint16_t memmon_drop_count
Number of failed notification attempts made by the memory monitor task.
extern ptrdiff_t memmon_free_ram
Available unused RAM in bytes.
ptrdiff_t memmon_get_free_ram(void)
Obtains the amount of available unused RAM.
typedef struct __attribute__ ((__packed__)) memmon_header
Specifies the byte format of a memory monitor notification header.
void memmon_init(uint8_t task_num_cat,
uint8_t max_mon,
memmon_spec *mon_array,
sched_time delay,
uint8_t tlv_typ,
uint8_t inm_dstadr)
Initializes the memory monitor module.
Converts a pointer to an arbitrary type into a pointer-to-constant that is compatible with the memory monitor API (a memmon_cptr), without triggering compiler warnings.
Converts a pointer to an arbitrary type into a pointer that is compatible with the memory monitor API (a memmon_ptr), without triggering compiler warnings.
extern uint8_t memmon_max_monitors
The maximum number of simultaneously registered memory monitors.
Maximum size in bytes of a monitored memory location.
extern uint16_t memmon_msg_count
Number of notification attempts made by the memory monitor task.
extern uint8_t memmon_n_monitors
The number of registered memory monitors.
typedef uint8_t *memmon_ptr
The type of pointers to memory locations in the memory monitor API.
uint8_t memmon_remove(uint8_t mon_i)
Unregisters a memory monitor with a specified index number.
uint8_t memmon_remove_ptr(memmon_cptr mon_ptr)
Unregisters a memory monitor monitoring a specified location.
void memmon_shutdown(void)
Shuts down the memory monitor module.
typedef struct memmon_spec
Specifies a memory monitor.
uint8_t mon_i
Index number of the memory monitor.
uint16_t msg_id
Identification number of the INM message.
Converts a duration in microseconds to the number of CPU clock cycles performed during that time at the current clock frequency (given by the F_CPU macro).
Close