NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
1-Wire Interface Controller (ONEWIRE) HW driver header file. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | neorv32_onewire_t |
Functions | |
Prototypes | |
int | neorv32_onewire_available (void) |
int | neorv32_onewire_setup (uint32_t t_base) |
void | neorv32_onewire_enable (void) |
void | neorv32_onewire_disable (void) |
int | neorv32_onewire_sense (void) |
int | neorv32_onewire_busy (void) |
void | neorv32_onewire_reset (void) |
int | neorv32_onewire_reset_get_presence (void) |
void | neorv32_onewire_read_bit (void) |
uint8_t | neorv32_onewire_read_bit_get (void) |
void | neorv32_onewire_write_bit (uint8_t bit) |
void | neorv32_onewire_read_byte (void) |
uint8_t | neorv32_onewire_read_byte_get (void) |
void | neorv32_onewire_write_byte (uint8_t byte) |
int | neorv32_onewire_reset_blocking (void) |
uint8_t | neorv32_onewire_read_bit_blocking (void) |
void | neorv32_onewire_write_bit_blocking (uint8_t bit) |
uint8_t | neorv32_onewire_read_byte_blocking (void) |
void | neorv32_onewire_write_byte_blocking (uint8_t byte) |
IO Device: 1-Wire Interface Controller (ONEWIRE) | |
#define | NEORV32_ONEWIRE ((neorv32_onewire_t*) (NEORV32_ONEWIRE_BASE)) |
enum | NEORV32_ONEWIRE_CTRL_enum { ONEWIRE_CTRL_EN = 0 , ONEWIRE_CTRL_PRSC0 = 1 , ONEWIRE_CTRL_PRSC1 = 2 , ONEWIRE_CTRL_CLKDIV0 = 3 , ONEWIRE_CTRL_CLKDIV1 = 4 , ONEWIRE_CTRL_CLKDIV2 = 5 , ONEWIRE_CTRL_CLKDIV3 = 6 , ONEWIRE_CTRL_CLKDIV4 = 7 , ONEWIRE_CTRL_CLKDIV5 = 8 , ONEWIRE_CTRL_CLKDIV6 = 9 , ONEWIRE_CTRL_CLKDIV7 = 10 , ONEWIRE_CTRL_TRIG_RST = 11 , ONEWIRE_CTRL_TRIG_BIT = 12 , ONEWIRE_CTRL_TRIG_BYTE = 13 , ONEWIRE_CTRL_SENSE = 29 , ONEWIRE_CTRL_PRESENCE = 30 , ONEWIRE_CTRL_BUSY = 31 } |
enum | NEORV32_ONEWIRE_DATA_enum { ONEWIRE_DATA_LSB = 0 , ONEWIRE_DATA_MSB = 7 } |
1-Wire Interface Controller (ONEWIRE) HW driver header file.
#define NEORV32_ONEWIRE ((neorv32_onewire_t*) (NEORV32_ONEWIRE_BASE)) |
ONEWIRE module hardware access (neorv32_onewire_t)
ONEWIRE control register bits
int neorv32_onewire_available | ( | void | ) |
Check if ONEWIRE controller was synthesized.
int neorv32_onewire_busy | ( | void | ) |
Check if ONEWIRE module is busy.
void neorv32_onewire_disable | ( | void | ) |
Disable ONEWIRE controller.
void neorv32_onewire_enable | ( | void | ) |
Enable ONEWIRE controller.
void neorv32_onewire_read_bit | ( | void | ) |
Initiate single-bit read.
uint8_t neorv32_onewire_read_bit_blocking | ( | void | ) |
Read single bit.
uint8_t neorv32_onewire_read_bit_get | ( | void | ) |
Get bit from previous single-bit read operation
void neorv32_onewire_read_byte | ( | void | ) |
Initiate read byte.
uint8_t neorv32_onewire_read_byte_blocking | ( | void | ) |
Read byte.
uint8_t neorv32_onewire_read_byte_get | ( | void | ) |
Get data from previous read byte operation.
void neorv32_onewire_reset | ( | void | ) |
Initiate reset pulse.
int neorv32_onewire_reset_blocking | ( | void | ) |
Generate reset pulse and check if any bus device is present.
int neorv32_onewire_reset_get_presence | ( | void | ) |
Get bus presence (after RESET).
int neorv32_onewire_sense | ( | void | ) |
Get current bus state.
int neorv32_onewire_setup | ( | uint32_t | t_base | ) |
Reset, configure and enable ONEWIRE interface controller.
[in] | t_base | Base tick time in ns. |
void neorv32_onewire_write_bit | ( | uint8_t | bit | ) |
Initiate single-bit write.
[in] | bit | Bit to be send. |
void neorv32_onewire_write_bit_blocking | ( | uint8_t | bit | ) |
Write single bit.
[in] | bit | Bit to be send. |
void neorv32_onewire_write_byte | ( | uint8_t | byte | ) |
Initiate write byte.
[in] | byte | Byte to be send. |
void neorv32_onewire_write_byte_blocking | ( | uint8_t | byte | ) |
Write byte.
[in] | byte | Byte to be send. |