Revision 3bd564a7
Testing sync i2c
scout_avr/bom/Makefile | ||
---|---|---|
5 | 5 |
MCU=attiny85 |
6 | 6 |
|
7 | 7 |
PROG=avrispMKII |
8 |
TARGET ?= bom.hex |
|
8 | 9 |
|
9 | 10 |
F_CPU=1000000 |
10 | 11 |
|
... | ... | |
23 | 24 |
%.s: %.c |
24 | 25 |
avr-gcc $(FLAGS) -S $< -o $@ |
25 | 26 |
|
26 |
program: bom.hex |
|
27 |
avrdude -p $(PART) -c $(PROG) -P usb -B 5 -U flash:w:bom.hex |
|
27 |
program: $(TARGET) |
|
28 |
avrdude -p $(PART) -c $(PROG) -P usb -B 5 -U flash:w:$(TARGET) |
|
29 |
|
|
30 |
test.elf: test.c tiny-twi-sync.c tiny-twi-sync.h |
|
31 |
avr-g++ $(FLAGS) test.c tiny-twi-sync.c -o $@ |
|
32 |
|
scout_avr/bom/tiny-twi-sync.h | ||
---|---|---|
1 | 1 |
#ifndef TINY_TWI_SYNC_H |
2 | 2 |
#define TINY_TWI_SYNC_H |
3 | 3 |
|
4 |
#define BOM_I2C_SEND 1 |
|
5 |
|
|
4 | 6 |
#include <stdint.h> |
5 | 7 |
|
6 | 8 |
typedef void (*slave_rx_t)(uint8_t*, int); |
Also available in: Unified diff