SPI + DMA

#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N])

https://stackoverflow.com/questions/15541290/what-is-the-difference-between-module-init-and-subsys-initcall-while-initializ

The difference relates to timing, or more precisely, order of execution. That is, the procedure declared as subsys_initcall is guaranteed to be executed before the procedure declared as module_init. This ordering ensures that subsystem and platform drivers are initialized before device drivers try to utilize the former's functionality (e.g. a device driver registers as a subsystem device).



EXPORT_SYMBOL_GPL(spi_register_master);

EXPORT_SYMBOL定義的函數對全部kernel代碼公開,不用修改kernel code就可以在您的kernel模組中直接使用。您還可以手動修改kernel code来導出另外的函數,用於重新编譯並加戴新kernel後的測試。

留言

這個網誌中的熱門文章

利用ffmpeg取出ts流中特定的program