Other Parts Discussed in Thread: OMAP3530
Hello,
Omap3530 has 4 Spi, and when i use spi 1 in this manner:
#define SPI_DEVICE_NAME L"SPI1:"
HANDLE hDevice;
DEVICE_CONTEXT_SPI *pContext = NULL;
hDevice = CreateFile(SPI_DEVICE_NAME, (GENERIC_READ|GENERIC_WRITE),
(FILE_SHARE_READ|FILE_SHARE_WRITE), 0, OPEN_EXISTING, 0, 0);
if (hDevice == INVALID_HANDLE_VALUE){
AfxMessageBox(_T("INVALID_HANDLE_VALUE"),0,0);
goto clean;
}
the program display messageBox that it says handle is invalid!
why createFile return null?
the spi2 is correct in the board (Devkit8000). It used for touch lcd. and when i createFile for that, it has not any error and return handle.
how can i fix this problem?! have u any suggestion, share it with me?
best regards