Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MX12 ServoRingBuffer mbed-src
Fork of SpindleBot by
SSPI.h
00001 #ifndef SSPI_H 00002 #define SSPI_H 00003 00004 #include "mbed.h" 00005 00006 /* var=target variable, pos=bit number to act upon 0-n */ 00007 #define CHECK_BIT(var,pos) ((var) & (1<<(pos))) 00008 #define BIT_SET(var,pos) ((var) |= (1<<(pos))) 00009 #define BIT_CLEAR(var,pos) ((var) &= ~(1<<(pos))) 00010 #define BIT_FLIP(var,pos) ((var) ^= (1<<(pos))) 00011 00012 #define SCLK_DELAY_US 1 00013 00014 00015 class SSPI { 00016 00017 public: 00018 SSPI(PinName mosi, PinName miso, PinName sclk); 00019 unsigned char write(unsigned char data); 00020 00021 private: 00022 DigitalOut MOSI; 00023 DigitalIn MISO; 00024 DigitalOut SCLK; 00025 }; 00026 00027 00028 #endif //SSPI_H
Generated on Thu Jul 14 2022 07:15:41 by
1.7.2
