18#ifndef neorv32_onewire_h
19#define neorv32_onewire_h
29typedef volatile struct __attribute__((packed,aligned(4))) {
35#define NEORV32_ONEWIRE ((neorv32_onewire_t*) (NEORV32_ONEWIRE_BASE))
70#define ONEWIRE_CMD_NOP (0b00)
71#define ONEWIRE_CMD_BIT (0b01)
72#define ONEWIRE_CMD_BYTE (0b10)
73#define ONEWIRE_CMD_RESET (0b11)
int neorv32_onewire_busy(void)
Definition neorv32_onewire.c:142
void neorv32_onewire_read_byte(void)
Definition neorv32_onewire.c:245
void neorv32_onewire_flush(void)
Definition neorv32_onewire.c:116
int neorv32_onewire_sense(void)
Definition neorv32_onewire.c:127
int neorv32_onewire_setup(uint32_t t_base)
Definition neorv32_onewire.c:55
void neorv32_onewire_write_byte(uint8_t byte)
Definition neorv32_onewire.c:273
void neorv32_onewire_reset(void)
Definition neorv32_onewire.c:164
int neorv32_onewire_get_fifo_depth(void)
Definition neorv32_onewire.c:42
int neorv32_onewire_reset_get_presence(void)
Definition neorv32_onewire.c:178
void neorv32_onewire_write_bit(uint8_t bit)
Definition neorv32_onewire.c:228
uint8_t neorv32_onewire_read_byte_get(void)
Definition neorv32_onewire.c:259
void neorv32_onewire_write_bit_blocking(uint8_t bit)
Definition neorv32_onewire.c:332
uint8_t neorv32_onewire_read_byte_blocking(void)
Definition neorv32_onewire.c:352
void neorv32_onewire_disable(void)
Definition neorv32_onewire.c:107
int neorv32_onewire_available(void)
Definition neorv32_onewire.c:26
uint8_t neorv32_onewire_read_bit_get(void)
Definition neorv32_onewire.c:209
void neorv32_onewire_read_bit(void)
Definition neorv32_onewire.c:195
NEORV32_ONEWIRE_DCMD_enum
Definition neorv32_onewire.h:56
@ ONEWIRE_DCMD_DATA_LSB
Definition neorv32_onewire.h:57
@ ONEWIRE_DCMD_DATA_MSB
Definition neorv32_onewire.h:58
@ ONEWIRE_DCMD_PRESENCE
Definition neorv32_onewire.h:61
@ ONEWIRE_DCMD_CMD_LO
Definition neorv32_onewire.h:59
@ ONEWIRE_DCMD_CMD_HI
Definition neorv32_onewire.h:60
void neorv32_onewire_write_byte_blocking(uint8_t byte)
Definition neorv32_onewire.c:372
uint8_t neorv32_onewire_read_bit_blocking(void)
Definition neorv32_onewire.c:312
NEORV32_ONEWIRE_CTRL_enum
Definition neorv32_onewire.h:38
@ ONEWIRE_CTRL_FIFO_MSB
Definition neorv32_onewire.h:47
@ ONEWIRE_CTRL_FIFO_LSB
Definition neorv32_onewire.h:46
@ ONEWIRE_CTRL_TX_FULL
Definition neorv32_onewire.h:49
@ ONEWIRE_CTRL_RX_AVAIL
Definition neorv32_onewire.h:50
@ ONEWIRE_CTRL_CLKDIV7
Definition neorv32_onewire.h:44
@ ONEWIRE_CTRL_BUSY
Definition neorv32_onewire.h:52
@ ONEWIRE_CTRL_EN
Definition neorv32_onewire.h:39
@ ONEWIRE_CTRL_PRSC0
Definition neorv32_onewire.h:41
@ ONEWIRE_CTRL_CLKDIV0
Definition neorv32_onewire.h:43
@ ONEWIRE_CTRL_CLEAR
Definition neorv32_onewire.h:40
@ ONEWIRE_CTRL_PRSC1
Definition neorv32_onewire.h:42
@ ONEWIRE_CTRL_SENSE
Definition neorv32_onewire.h:51
void neorv32_onewire_enable(void)
Definition neorv32_onewire.c:98
int neorv32_onewire_reset_blocking(void)
Definition neorv32_onewire.c:292
Definition neorv32_onewire.h:29
uint32_t CTRL
Definition neorv32_onewire.h:30
uint32_t DCMD
Definition neorv32_onewire.h:31