Main Project File. Mehr ...
#include <stdio.h>
#include <stdlib.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include "ds18x20.c"
#include "uart.c"
Makrodefinitionen | |
#define | MYVERSION "0.1" |
Version. Mehr ... | |
#define | VERDATUM "15.05.16" |
Versions-Datum. Mehr ... | |
#define | F_CPU 16000000UL |
#define | BAUD 19200UL |
Baudrate. Mehr ... | |
#define | CR "\r\n" |
Funktionen | |
void | uart_int (int16_t i) |
void | puthex_nibble (const unsigned char b) |
void | puthex_byte (const unsigned char b) |
void | print_header (void) |
void | print_rom (uint8_t *data, uint8_t index) |
uint8_t | scan_bus (uint8_t rom_list[10][8], uint8_t cmd) |
void | print_scratchpad (uint8_t *data) |
int | main (void) |
Variablen | |
int8_t | Vor |
Temperatur Vorkommastelle. Mehr ... | |
int8_t | Nach |
Temperatur Nachkommastelle. Mehr ... | |
uint16_t | LoopSoll = 500 |
uint16_t | LoopIst = 0 |
int16_t | mcounter = 0 |
char | spuffer [20] |
uint8_t | rc |
return code Mehr ... | |
static uint8_t | buffer [9] |
read buffer Mehr ... | |
static uint8_t | roms [10][8] |
found ID's Mehr ... | |
static uint8_t | alarm_roms [10][8] |
static uint8_t | dcount |
Count of devices on the busn_bus. Mehr ... | |
Main Project File.
Diese Datei beinhaltet die Funktion main() und führt alles zusammen.
#define BAUD 19200UL |
Baudrate.
#define CR "\r\n" |
#define F_CPU 16000000UL |
#define MYVERSION "0.1" |
Version.
#define VERDATUM "15.05.16" |
Versions-Datum.
int main | ( | void | ) |
MAIN
void print_header | ( | void | ) |
Alle Clients auf dem 1-Wire Bus finden
void print_rom | ( | uint8_t * | data, |
uint8_t | index | ||
) |
ROM ausgeben
void print_scratchpad | ( | uint8_t * | data | ) |
Scratchpad ausgeben
void puthex_byte | ( | const unsigned char | b | ) |
Function: puthex_byte()
Purpose: transmit upper and lower nibble as ASCII-hex to string
Input: byte value
Returns: none
void puthex_nibble | ( | const unsigned char | b | ) |
Function: puthex_nibble()
Purpose: transmit lower nibble as ASCII-hex to string
Input: byte value
Returns: none
uint8_t scan_bus | ( | uint8_t | rom_list[10][8], |
uint8_t | cmd | ||
) |
Alle Clients auf dem 1-Wire Bus finden
void uart_int | ( | int16_t | i | ) |
Integer auf der UART ausgeben
|
static |
|
static |
read buffer
|
static |
Count of devices on the busn_bus.
uint16_t LoopIst = 0 |
uint16_t LoopSoll = 500 |
int16_t mcounter = 0 |
int8_t Nach |
Temperatur Nachkommastelle.
uint8_t rc |
return code
|
static |
found ID's
char spuffer[20] |
int8_t Vor |
Temperatur Vorkommastelle.