Noch das Testprogramm dazu:
Code:
/*****************************************************************************/
// Includes:
#include "RP6M256Lib.h" // The RP6 M256 Library.
// Always needs to be included!
/*****************************************************************************/
// Defines:
// Only define UART_TEST, if the serial interface is connected to the M256!
#define UART_TEST
/*****************************************************************************/
// Main function - The program starts here:
int main(void)
{
initRP6M256(); // Always call this first! The Processor will not work
// correctly otherwise.
setLEDs(0b1111);
mSleep(500);
setLEDs(0b0000);
#ifdef UART_TEST
// Write a text message to the UART:
writeString_P("\nShow the RP6 serial terminal character set:\n\n");
#endif
// Write a text message via WIFI:
writeString_P_WIFI("\nShow the RP6 WIFI terminal character set:\n\n");
// Define a counting variable:
uint8_t i;
// ---------------------------------------
#ifdef UART_TEST
// UART:
writeString_P("Chars 32..63:\n");
for (i = 32; i <= 63; i++) {
writeChar(i);
}
writeChar('\n');
writeString_P("Chars 64..95:\n");
for (i = 64; i <= 95; i++) {
writeChar(i);
}
writeChar('\n');
writeString_P("Chars 96..127:\n");
for (i = 96; i <= 127; i++) {
writeChar(i);
}
writeChar('\n');
writeString_P("Chars 160..191:\n");
for (i = 160; i <= 191; i++) {
writeChar(i);
}
writeChar('\n');
writeString_P("Chars 192..223:\n");
for (i = 192; i <= 223; i++) {
writeChar(i);
}
writeChar('\n');
writeString_P("Chars 224..255:\n");
for (i = 224; i <= 254; i++) {
writeChar(i);
}
writeChar(255);
writeChar('\n');
#endif
// WIFI:
writeString_P_WIFI("Chars 32..63:\n");
for (i = 32; i <= 63; i++) {
writeChar_WIFI(i);
}
writeChar_WIFI('\n');
writeString_P_WIFI("Chars 64..95:\n");
for (i = 64; i <= 95; i++) {
writeChar_WIFI(i);
}
writeChar_WIFI('\n');
writeString_P_WIFI("Chars 96..127:\n");
for (i = 96; i <= 127; i++) {
writeChar_WIFI(i);
}
writeChar_WIFI('\n');
writeString_P_WIFI("Chars 160..191:\n");
for (i = 160; i <= 191; i++) {
writeChar_WIFI(i);
}
writeChar_WIFI('\n');
writeString_P_WIFI("Chars 192..223:\n");
for (i = 192; i <= 223; i++) {
writeChar_WIFI(i);
}
writeChar_WIFI('\n');
writeString_P_WIFI("Chars 224..255:\n");
for (i = 224; i <= 254; i++) {
writeChar_WIFI(i);
}
writeChar_WIFI(255);
writeChar_WIFI('\n');
while(true) {
}
// End of main program!
// ---------------------------------------
return 0;
}
Lesezeichen