The compiler issues the error: "36 384 Illegal pointer conversion PrintOut.c".
Code: Select all
void PrintHandler(char c)
{
UART_Write(c);
}
void main() {
AD1PCFG = 0xFFFF; // Configure AN pins as digital I/O
UART2_Init(56000); // Initialize Uart at 56000 bps
Delay_ms(100);
PrintOut(PrintHandler, "/*\r\n"
" * Project name:\r\n"
" PrintOutExample (Sample usage of PrintOut() function)\r\n"
" * Copyright:\r\n"
" (c) MikroElektronika, 2011.\r\n"
" * Revision History:\r\n"
" 20110105:\r\n"
" - Initial release\r\n"
" * Description:\r\n"
" Simple demonstration on usage of the PrintOut() function\r\n"
" * Test configuration:\r\n"
" MCU: P32MX795F512L\r\n"
" http://ww1.microchip.com/downloads/en/DeviceDoc/61156G.pdf\r\n"
" Dev.Board: EasyPIC Fusion v7\r\n"
" http://www.mikroe.com/easypic-fusion/\r\n"
" Oscillator: XT-PLL, %6.3fMHz\r\n"
" Ext. Modules: None.\r\n"
" SW: mikroC PRO for PIC32\r\n"
" http://www.mikroe.com/mikroc/pic32/\r\n"
" * NOTES:\r\n"
" - Turn ON UARTA switches at SW12. (board specific)\r\n"
" */\r\n", Get_Fosc_kHz()/1000.);
}