#include "user.h" #include //for Linux mdelay //#include /** * Variable of critical section */ Dword User_memoryCopy ( IN Demodulator* demodulator, IN void* dest, IN void* src, IN Dword count ) { /* * ToDo: Add code here * * //Pseudo code * memcpy(dest, src, (size_t)count); * return (0); */ return (Error_NO_ERROR); } Dword User_delay ( IN Demodulator* demodulator, IN Dword dwMs ) { /* * ToDo: Add code here * * //Pseudo code * delay(dwMs); * return (0); */ mdelay(dwMs); // for Linux //sleep(dwMs); return (Error_NO_ERROR); } Dword User_enterCriticalSection ( IN Demodulator* demodulator ) { /* * ToDo: Add code here * * //Pseudo code * return (0); */ return (Error_NO_ERROR); } Dword User_leaveCriticalSection ( IN Demodulator* demodulator ) { /* * ToDo: Add code here * * //Pseudo code * return (0); */ return (Error_NO_ERROR); } Dword User_mpegConfig ( IN Demodulator* demodulator ) { /* * ToDo: Add code here * */ return (Error_NO_ERROR); } Dword User_busTx ( IN Demodulator* demodulator, IN Dword bufferLength, IN Byte* buffer ) { /* * ToDo: Add code here * * //Pseudo code * short i; * * start(); * write_i2c(uc2WireAddr); * ack(); * for (i = 0; i < bufferLength; i++) { * write_i2c(*(ucpBuffer + i)); * ack(); * } * stop(); * * // If no error happened return 0, else return error code. * return (0); */ return (Error_NO_ERROR); } Dword User_busRx ( IN Demodulator* demodulator, IN Dword bufferLength, OUT Byte* buffer ) { /* * ToDo: Add code here * * //Pseudo code * short i; * * start(); * write_i2c(uc2WireAddr | 0x01); * ack(); * for (i = 0; i < bufferLength - 1; i++) { * read_i2c(*(ucpBuffer + i)); * ack(); * } * read_i2c(*(ucpBuffer + bufferLength - 1)); * nack(); * stop(); * * // If no error happened return 0, else return error code. * return (0); */ return (Error_NO_ERROR); } Dword User_busRxData ( IN Demodulator* demodulator, IN Dword bufferLength, OUT Byte* buffer ) { return (Error_NO_ERROR); }