Root/atusb/fw/spi.h

Source at commit 1dcc83391e51890c76fc8e11aeb24300a99412a2 created 8 years 10 months ago.
By Werner Almesberger, atusb/fw/Makefile: put -mmcu into CFLAGS so that DEPEND uses it, too
1/*
2 * fw/spi.h - ATmega8 family SPI I/O
3 *
4 * Written 2011 by Werner Almesberger
5 * Copyright 2011 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef SPI_H
14#define SPI_H
15
16#include <stdint.h>
17
18
19void spi_begin(void);
20uint8_t spi_io(uint8_t v);
21void spi_end(void);
22void spi_init(void);
23
24#define spi_send(v) (void) spi_io(v)
25#define spi_recv(v) spi_io(0)
26
27#endif /* !SPI_H */
28

Archive Download this file



interactive