IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Git Source Tree
Root/
| Source at commit 07b5bfddc052ab98a23cc55c060d07e037f35aae created 6 years 9 months ago. By Werner Almesberger, atusb/atrf.sch: move invisible footprint test, to avoid confusing eeshow | |
|---|---|
| 1 | /* |
| 2 | * fw/spi.h - ATmega8 family SPI I/O |
| 3 | * |
| 4 | * Written 2011, 2013 by Werner Almesberger |
| 5 | * Copyright 2011, 2013 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 | |
| 19 | void spi_begin(void); |
| 20 | uint8_t spi_io(uint8_t v); |
| 21 | void spi_end(void); |
| 22 | void spi_off(void); |
| 23 | void spi_init(void); |
| 24 | |
| 25 | #define spi_send(v) (void) spi_io(v) |
| 26 | #define spi_recv(v) spi_io(0) |
| 27 | |
| 28 | void spi_recv_block(uint8_t *buf, uint8_t n); |
| 29 | |
| 30 | #endif /* !SPI_H */ |
| 31 | |
