first version of m06e01
This commit is contained in:
48
module06/ex01/header.h
Normal file
48
module06/ex01/header.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef HEADER_H
|
||||
#define HEADER_H
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/twi.h>
|
||||
#include <util/delay.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "bitmanip.h"
|
||||
#include "interrupt.h"
|
||||
#include "timer.h"
|
||||
#include "usart.h"
|
||||
#include "adc.h"
|
||||
#include "i2c.h"
|
||||
|
||||
//
|
||||
// GLOBAL
|
||||
//
|
||||
|
||||
//
|
||||
// PROTOTYPES
|
||||
//
|
||||
// main.c
|
||||
void print_hex_value(char c);
|
||||
// i2c.c
|
||||
void i2c_init(void);
|
||||
void i2c_start(void);
|
||||
void i2c_send_addr_w(uint8_t slave_address);
|
||||
void i2c_send_addr_r(uint8_t slave_address);
|
||||
void i2c_write(unsigned char data);
|
||||
void i2c_read(void);
|
||||
void i2c_stop(void);
|
||||
// uart.c
|
||||
void uart_init();
|
||||
void uart_tx(char c);
|
||||
void uart_printstr(const char* str);
|
||||
void uart_printstr_endl(const char* str);
|
||||
void uart_printstr_itoa_base(uint64_t value, uint8_t base);
|
||||
void uart_printstr_itoa_base_endl(uint64_t value, uint8_t base);
|
||||
// math.c
|
||||
void int_to_hex_string(uint64_t value, char *out, uint8_t num_digits);
|
||||
void int_to_string_base(uint64_t value, char *buffer, uint8_t base);
|
||||
|
||||
//
|
||||
// MACROS
|
||||
//
|
||||
|
||||
#endif // HEADER_H
|
||||
Reference in New Issue
Block a user