NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
main.c File Reference

Demo program for the NEORV32 1-Wire interface controller (ONEWIRE). More...

#include <neorv32.h>
#include <string.h>
#include "onewire_aux.h"

Macros

User configuration
#define BAUD_RATE   19200
 

Functions

void show_help (void)
 
void show_1wire_commands (void)
 
void read_byte (void)
 
void write_byte (void)
 
void scan_bus (void)
 
int main ()
 

Variables

const char hex_c [16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}
 

Detailed Description

Demo program for the NEORV32 1-Wire interface controller (ONEWIRE).

Author
Stephan Nolting

Macro Definition Documentation

◆ BAUD_RATE

#define BAUD_RATE   19200

UART BAUD rate

Function Documentation

◆ main()

int main ( void )

Main function

Note
This program requires the ONEWIRE and UART0 modules. Only non-blocking ONEWIRE functions are used.
Returns
!=0 if setup error

◆ read_byte()

void read_byte ( void )

Read full byte from bus.

◆ scan_bus()

void scan_bus ( void )

Scan bus for devices and print IDs.

◆ show_1wire_commands()

void show_1wire_commands ( void )

Show standard 1-wire commands.

◆ show_help()

void show_help ( void )

Show help menu.

◆ write_byte()

void write_byte ( void )

Write full byte to bus.