Karl Urban
/
SPI_setup_practice
WORK please
Revision 0:b183b7569045, committed 2020-10-05
- Comitter:
- kurba005
- Date:
- Mon Oct 05 22:06:06 2020 +0000
- Commit message:
- hoping this works, can not view documentation
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 05 22:06:06 2020 +0000 @@ -0,0 +1,12 @@ +/* Program Example: Set up the mbed as SPI master*/ + +#include "mbed.h" +SPI ser_port(p11, p12, p13); // mosi, miso, sclk +char switch_word; //word we will send + +int main() +{ + + ser_port.format(12,1); // Setup the SPI for 12 bit data, Mode 1 operation + ser_port.frequency(4000000); // Clock frequency is 4MHz +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Oct 05 22:06:06 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file