NEORV32 - Software Framework Documentation
Loading...
Searching...
No Matches
neorv32_onewire.h
Go to the documentation of this file.
1// #################################################################################################
2// # << NEORV32: neorv32_onewire.h - 1-Wire Interface Controller HW Driver (Header) >> #
3// # ********************************************************************************************* #
4// # BSD 3-Clause License #
5// # #
6// # Copyright (c) 2022, Stephan Nolting. All rights reserved. #
7// # #
8// # Redistribution and use in source and binary forms, with or without modification, are #
9// # permitted provided that the following conditions are met: #
10// # #
11// # 1. Redistributions of source code must retain the above copyright notice, this list of #
12// # conditions and the following disclaimer. #
13// # #
14// # 2. Redistributions in binary form must reproduce the above copyright notice, this list of #
15// # conditions and the following disclaimer in the documentation and/or other materials #
16// # provided with the distribution. #
17// # #
18// # 3. Neither the name of the copyright holder nor the names of its contributors may be used to #
19// # endorse or promote products derived from this software without specific prior written #
20// # permission. #
21// # #
22// # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS #
23// # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF #
24// # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE #
25// # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
26// # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE #
27// # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED #
28// # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING #
29// # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED #
30// # OF THE POSSIBILITY OF SUCH DAMAGE. #
31// # ********************************************************************************************* #
32// # The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting #
33// #################################################################################################
34
35
36/**********************************************************************/
43#ifndef neorv32_onewire_h
44#define neorv32_onewire_h
45
46// prototypes - setup/management
48int neorv32_onewire_setup(uint32_t t_base);
49void neorv32_onewire_enable(void);
51int neorv32_onewire_sense(void);
52
53// prototypes - non-blocking access
54int neorv32_onewire_busy(void);
55void neorv32_onewire_reset(void);
59void neorv32_onewire_write_bit(uint8_t bit);
62void neorv32_onewire_write_byte(uint8_t byte);
63
64// prototypes - blocking access
70
71#endif // neorv32_onewire_h
int neorv32_onewire_busy(void)
Definition: neorv32_onewire.c:156
void neorv32_onewire_read_byte(void)
Definition: neorv32_onewire.c:260
int neorv32_onewire_sense(void)
Definition: neorv32_onewire.c:133
int neorv32_onewire_setup(uint32_t t_base)
Definition: neorv32_onewire.c:69
void neorv32_onewire_write_byte(uint8_t byte)
Definition: neorv32_onewire.c:291
void neorv32_onewire_reset(void)
Definition: neorv32_onewire.c:173
int neorv32_onewire_reset_get_presence(void)
Definition: neorv32_onewire.c:187
void neorv32_onewire_write_bit(uint8_t bit)
Definition: neorv32_onewire.c:240
uint8_t neorv32_onewire_read_byte_get(void)
Definition: neorv32_onewire.c:277
void neorv32_onewire_write_bit_blocking(uint8_t bit)
Definition: neorv32_onewire.c:353
uint8_t neorv32_onewire_read_byte_blocking(void)
Definition: neorv32_onewire.c:370
void neorv32_onewire_disable(void)
Definition: neorv32_onewire.c:122
int neorv32_onewire_available(void)
Definition: neorv32_onewire.c:52
uint8_t neorv32_onewire_read_bit_get(void)
Definition: neorv32_onewire.c:221
void neorv32_onewire_read_bit(void)
Definition: neorv32_onewire.c:204
void neorv32_onewire_write_byte_blocking(uint8_t byte)
Definition: neorv32_onewire.c:390
uint8_t neorv32_onewire_read_bit_blocking(void)
Definition: neorv32_onewire.c:333
void neorv32_onewire_enable(void)
Definition: neorv32_onewire.c:113
int neorv32_onewire_reset_blocking(void)
Definition: neorv32_onewire.c:313