23 lines
405 B
C
23 lines
405 B
C
#ifndef __SPI_H
|
|
#define __SPI_H
|
|
|
|
#include <stdint.h>
|
|
|
|
//bufor SPI
|
|
#define SPI_BSIZE 128
|
|
//długość pakietu z suwmiarki
|
|
#define SPI_FRAME_SIZE 3
|
|
//bity w SPI_State
|
|
#define SPI_CONNECTED 0x01
|
|
//wartości zwracane przez SPI_Poll()
|
|
#define SPI_NO_FRAME 0x00
|
|
#define SPI_FRAME_READY 0x01
|
|
|
|
|
|
|
|
int8_t SPI_Initialize(void);
|
|
int8_t SPI_GetState(void);
|
|
uint16_t SPI_Poll(uint8_t *measure,uint16_t length);
|
|
|
|
#endif
|