LibJuno
0.42.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
spi_io_api.h
Go to the documentation of this file.
1
/*
2
MIT License
3
4
Copyright (c) 2025 Robin A. Onsay
5
6
Permission is hereby granted, free of charge, to any person obtaining
7
a copy of this software and associated documentation files
8
(the "Software"), to deal in the Software without restriction,
9
including without limitation the rights to use, copy, modify, merge,
10
publish, distribute, sublicense, and/or sell copies of the Software,
11
and to permit persons to whom the Software is furnished to do so,
12
subject to the following conditions:
13
14
The above copyright notice and this permission notice shall be
15
included in all copies or substantial portions of the Software.
16
*/
17
27
#ifndef JUNO_SPI_IO_API_H
28
#define JUNO_SPI_IO_API_H
29
#include "
juno/status.h
"
30
#include "
juno/module.h
"
31
#include "
juno/time/time_api.h
"
32
#include <stdbool.h>
33
#include <stdint.h>
34
#ifdef __cplusplus
35
extern
"C"
36
{
37
#endif
38
39
typedef
struct
JUNO_SPI_IO_API_TAG
JUNO_SPI_IO_API_T
;
40
typedef
union
JUNO_SPI_IO_TAG
JUNO_SPI_IO_T
;
41
typedef
struct
JUNO_SPI_IO_ROOT_TAG
JUNO_SPI_IO_ROOT_T
;
42
43
struct
JUNO_SPI_IO_ROOT_TAG
JUNO_MODULE_ROOT
(
JUNO_SPI_IO_API_T
,
JUNO_MODULE_EMPTY
);
44
45
46
struct
JUNO_SPI_IO_API_TAG
47
{
49
JUNO_STATUS_T
(*
Transaction
)(
JUNO_SPI_IO_T
*ptIo,
char
*pcReadBuff,
size_t
zReadBuffSize,
const
void
*pvWriteBuff,
size_t
zWriteBuffSize);
50
};
51
52
#ifdef __cplusplus
53
}
54
#endif
55
#endif
// JUNO_SPI_IO_API_H
module.h
JUNO_MODULE_EMPTY
#define JUNO_MODULE_EMPTY
Definition
module.h:126
JUNO_MODULE_ROOT
#define JUNO_MODULE_ROOT(API_T,...)
Definition
module.h:182
JUNO_SPI_IO_ROOT_T
struct JUNO_SPI_IO_ROOT_TAG JUNO_SPI_IO_ROOT_T
Definition
spi_io_api.h:41
JUNO_SPI_IO_T
union JUNO_SPI_IO_TAG JUNO_SPI_IO_T
Definition
spi_io_api.h:40
status.h
JUNO_STATUS_T
int32_t JUNO_STATUS_T
Definition
status.h:23
JUNO_SPI_IO_API_TAG
Definition
spi_io_api.h:47
JUNO_SPI_IO_API_TAG::Transaction
JUNO_STATUS_T(* Transaction)(JUNO_SPI_IO_T *ptIo, char *pcReadBuff, size_t zReadBuffSize, const void *pvWriteBuff, size_t zWriteBuffSize)
Perform an SPI transaction.
Definition
spi_io_api.h:49
time_api.h
include
juno
io
spi_io_api.h
Generated by
1.9.8