HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
spi.h
Go to the documentation of this file.
1 
13 #ifndef _SPI_H
14 #define _SPI_H
15 
16 #include "user_config.h"
17 
18 #define SPI0_MODE0 0
19 #define SPI0_MODE1 1
20 #define SPI0_MODE2 2
21 #define SPI0_MODE3 3
22 
23 /* spi.c */
24 void SPI0_cs_enable ( uint8_t cs );
25 void SPI0_cs_disable ( uint8_t cs );
26 void SPI0_Speed ( uint32_t speed );
27 uint32_t SPI0_Get_Speed ( void );
28 void SPI0_Mode ( int mode );
29 int SPI0_Get_Mode ( void );
30 void SPI0_Init ( uint32_t speed );
31 uint8_t SPI0_TXRX_Byte ( uint8_t Data );
32 void SPI0_TX ( uint8_t *data , int count );
33 void SPI0_TXRX ( uint8_t *data , int count );
34 void SPI0_RX ( uint8_t *data , int count );
35 #endif
SPI0_TXRX
void SPI0_TXRX(uint8_t *data, int count)
HSPI write and read using FIFO.
Definition: spi.c:281
SPI0_Init
void SPI0_Init(uint32_t speed)
Initialize SPI0 device. See Atmel App Note AVR151 Set default speed, IO pins and mode.
Definition: spi.c:192
SPI0_cs_disable
void SPI0_cs_disable(uint8_t cs)
SPI0_Get_Speed
uint32_t SPI0_Get_Speed(void)
Return previously saved SPI BUS rate in HZ.
Definition: spi.c:128
SPI0_TXRX_Byte
uint8_t SPI0_TXRX_Byte(uint8_t Data)
SPI read/Write byte.
Definition: spi.c:245
SPI0_TX
void SPI0_TX(uint8_t *data, int count)
SPI buffered write functions.
Definition: spi.c:264
SPI0_Speed
void SPI0_Speed(uint32_t speed)
Set AVR SPI bus rate in HZ.
Definition: spi.c:46
user_config.h
Master Include for FatFs, RTC, Timers AVR8 - Part of HP85 disk emulator.
SPI0_RX
void SPI0_RX(uint8_t *data, int count)
HSPI read using FIFO.
Definition: spi.c:297
SPI0_Get_Mode
int SPI0_Get_Mode(void)
Return saved SPI mode as set by SPI0_Mode().
Definition: spi.c:180
SPI0_Mode
void SPI0_Mode(int mode)
Set SPI clock mode.
Definition: spi.c:150
SPI0_cs_enable
void SPI0_cs_enable(uint8_t cs)