-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18b2bf1
commit 4f06fd1
Showing
4 changed files
with
60 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* @file miso_spi.h | ||
* @author Francisco | ||
* @brief | ||
* @date 2024-03-08 | ||
* | ||
* @copyright Copyright (c) 2024 | ||
* | ||
*/ | ||
|
||
#ifndef __MISO_SPI_H__ | ||
#define __MISO_SPI_H__ | ||
|
||
#include "miso.h" | ||
|
||
/** | ||
* @brief Miso Generic SPI error | ||
*/ | ||
#define MISO_SPI_ERROR ((ssize_t)-127) | ||
|
||
/** | ||
* @brief Forward declaration of miso spi device | ||
* | ||
*/ | ||
typedef struct miso_spi_dev_s * miso_spi_t; | ||
|
||
/** | ||
* @brief Miso SPI send data | ||
* | ||
* @param dev Miso SPI device | ||
* | ||
* @param data Data to send | ||
* | ||
* @param size Size of data to send | ||
* | ||
* @return Number of bytes sent. Negative value on error | ||
*/ | ||
ssize_t miso_spi_send(miso_spi_t dev, const void * data, size_t nBytes); | ||
|
||
/** | ||
* @brief Miso SPI receive data | ||
* | ||
* | ||
*/ | ||
ssize_t miso_spi_receive(miso_spi_t dev, void * data, size_t nBytes); | ||
|
||
|
||
|
||
#endif // __MISO_SPI_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters