You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
764 B
32 lines
764 B
//
|
|
// Created by MightyPork on 2018/02/03.
|
|
//
|
|
|
|
#ifndef GEX_F072_SPI_INTERNAL_H
|
|
#define GEX_F072_SPI_INTERNAL_H
|
|
|
|
#ifndef SPI_INTERNAL
|
|
#error bad include!
|
|
#endif
|
|
|
|
#include "unit_base.h"
|
|
|
|
/** Private data structure */
|
|
struct priv {
|
|
uint8_t periph_num; //!< 1 or 2
|
|
uint8_t remap; //!< SPI remap option
|
|
|
|
uint16_t prescaller; //!< Clock prescaller, stored as the dividing factor
|
|
bool cpol; //!< CPOL setting
|
|
bool cpha; //!< CPHA setting
|
|
bool tx_only; //!< If true, Enable only the MOSI line
|
|
|
|
bool lsb_first; //!< Option to send LSB first
|
|
char ssn_port_name; //!< SSN port
|
|
uint16_t ssn_pins; //!< SSN pin mask
|
|
|
|
SPI_TypeDef *periph;
|
|
GPIO_TypeDef *ssn_port;
|
|
};
|
|
|
|
#endif //GEX_F072_SPI_INTERNAL_H
|
|
|