LPC176x: Expand HW SPI class
This commit is contained in:
@ -23,9 +23,9 @@
|
||||
#ifndef HARDWARE_SERIAL_H_
|
||||
#define HARDWARE_SERIAL_H_
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#include "../../feature/emergency_parser.h"
|
||||
#include "../../../feature/emergency_parser.h"
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
|
@ -31,13 +31,16 @@
|
||||
|
||||
class SPISettings {
|
||||
public:
|
||||
SPISettings(int a, int b, int c) {};
|
||||
SPISettings(uint32_t speed, int, int) : spi_speed(speed) {};
|
||||
uint32_t spiRate() { return spi_speed; }
|
||||
private:
|
||||
uint32_t spi_speed;
|
||||
};
|
||||
|
||||
class SPIClass {
|
||||
public:
|
||||
void begin();
|
||||
void beginTransaction(SPISettings foo) {};
|
||||
void beginTransaction(SPISettings);
|
||||
void endTransaction() {};
|
||||
uint8_t transfer(uint8_t data);
|
||||
uint16_t transfer16(uint16_t data);
|
||||
|
@ -36,8 +36,8 @@
|
||||
// Includes
|
||||
//
|
||||
//#include <WInterrupts.h>
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../Delay.h"
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
#include "../../Delay.h"
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <Arduino.h>
|
||||
|
Reference in New Issue
Block a user