![](/media/cache/group/drone_pigeon.jpg.50x50_q85.jpg)
Testé pour projet BTS SN
Dependencies: MODMAX7456 mbed
Fork of MAX7456_HelloWorld by
main.cpp
- Committer:
- cdupaty
- Date:
- 2016-04-30
- Revision:
- 0:11828abc1244
- Child:
- 2:e25ed18fa668
File content as of revision 0:11828abc1244:
#include "mbed.h" #include "OSD7456.h" #include "stdio.h" #define PCBAUD 9600 #define MAX7456_MOSI SPI_MOSI #define MAX7456_MISO SPI_MISO #define MAX7456_SCLK SPI_SCK #define MAX7456_CS SPI_CS #define MAX7456_RST PA_0 #define MAX7456_VSYNC PA_1 // with SPI1 activated don't use LED1 DigitalOut led1(PA_2); OSD7456 *osd; int main() { printf("Test MAX7456\r\n"); osd = new OSD7456(MAX7456_MOSI, MAX7456_MISO, MAX7456_SCLK, MAX7456_CS, MAX7456_RST, MAX7456_VSYNC); // Set the character "local background" to 42% //osd->max7456->backGround(MAX7456::Percent_42); // Set the blink rate to 133ms with a duty cycle of 3:1 //osd->max7456->blinkRate(MAX7456::ms_133, MAX7456::BT3_BT); osd->print(1,2,"Bonjour STM32"); //osd->print(7, 4, "Positioned text"); //osd->print(7, 6, "Positioned text", MAX7456::LocalBG); //osd->print(3, 8, "Positioned text blinks", MAX7456::Blink | MAX7456::LocalBG); //osd->print(4, 10, " Blinks and inverse ", MAX7456::Blink | MAX7456::LocalBG | MAX7456::Inverse); printf("Fin du test\r\n"); while(1); }