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: mbed
Fork of WaG by
Diff: display.cpp
- Revision:
- 20:d23bcd97f2c5
- Parent:
- 18:0e281922212c
- Child:
- 22:09dd6977576b
--- a/display.cpp Fri Mar 02 22:20:43 2018 +0000
+++ b/display.cpp Tue Mar 06 17:25:48 2018 +0000
@@ -41,21 +41,19 @@
* Outputs:
* Returns: void
*/
-void initial_setup(DigitalOut SS, int data_length, int frequency) {
- SS = 1;
- wag_spi.format(data_length, 0);
- wag_spi.frequency(frequency);
+void initial_setup(struct spi_cfg spi_obj) {
+ spi_obj.spi_ncs = 1;
- spi_send(as1107, 0x0C01);
- spi_send(as1107, 0x090F);
- spi_send(as1107, 0x0F00);
- spi_send(as1107, 0x0A0F);
- spi_send(as1107, 0x0B04);
- spi_send(as1107, 0x0100);
- spi_send(as1107, 0x0200);
- spi_send(as1107, 0x0300);
- spi_send(as1107, 0x0400);
- spi_send(as1107, 0x0500);
+ spi_send(spi_obj, 0x0C01);
+ spi_send(spi_obj, 0x090F);
+ spi_send(spi_obj, 0x0F00);
+ spi_send(spi_obj, 0x0A0F);
+ spi_send(spi_obj, 0x0B04);
+ spi_send(spi_obj, 0x0100);
+ spi_send(spi_obj, 0x0200);
+ spi_send(spi_obj, 0x0300);
+ spi_send(spi_obj, 0x0400);
+ spi_send(spi_obj, 0x0500);
}
