1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- // kspi.h :
- //
- #if !defined(AGD_KSPI_H__C0C2E2F9_77AA_4807_9B26_08F970CFD563__INCLUDED_)
- #define AGD_KSPI_H__C0C2E2F9_77AA_4807_9B26_08F970CFD563__INCLUDED_
- #include <linux/kernel.h>
- #include <linux/spi/spidev.h>
- #include <linux/syscalls.h>
- #include "defines.h"
- #ifdef __cplusplus
- extern "C" {
- #endif // __cplusplus
- /////////////////////////////////////////////////////////////////////////////
- // kspi.h - Declarations:
- int kspi_write_mode (struct file *pf, unsigned char mode);
- int kspi_read_mode (struct file *pf, unsigned char *mode);
- int kspi_write_bits_per_word(struct file *pf, unsigned char bits);
- int kspi_read_bits_per_word (struct file *pf, unsigned char *bits);
- int kspi_write_max_speed_hz (struct file *pf, unsigned int speed);
- int kspi_read_max_speed_hz (struct file *pf, unsigned int *speed);
- /////////////////////////////////////////////////////////////////////////////
- int kspi_tx (struct file *pf, const void *pData, size_t nCbData);
- int kspi_rx (struct file *pf, void *pData, size_t nCbData);
- int kspi_tx_rx (struct file *pf, const void *pTx, void *pRx, size_t nCb);
- int kspi_rx_byte (struct file *pf, unsigned char *rx);
- int kspi_tx_byte (struct file *pf, unsigned char tx);
- int kspi_tx_rx_byte (struct file *pf, unsigned char tx, unsigned char *rx);
- /////////////////////////////////////////////////////////////////////////////
- bool KSpiInit(struct file *pf);
- void KSpiExit(void);
- /////////////////////////////////////////////////////////////////////////////
- #ifdef __cplusplus
- }
- #endif // __cplusplus
- #endif // !defined(AGD_KSPI_H__C0C2E2F9_77AA_4807_9B26_08F970CFD563__INCLUDED_)
|