LibJuno 1.0.1
LibJuno is a lightweight C11 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
31#ifndef JUNO_SPI_IO_API_H
32#define JUNO_SPI_IO_API_H
33#include "juno/status.h"
34#include "juno/module.h"
35#include <stdbool.h>
36#include <stdint.h>
37#include <stddef.h>
38#ifdef __cplusplus
39extern "C"
40{
41#endif
42
44typedef struct JUNO_SPI_IO_ROOT_TAG JUNO_SPI_IO_ROOT_T;
45
47
48
50{
57 JUNO_STATUS_T (*Transaction)(JUNO_SPI_IO_ROOT_T *ptIo, char *pcReadBuff, size_t zReadBuffSize, const void *pvWriteBuff, size_t zWriteBuffSize);
58};
59
60#ifdef __cplusplus
61}
62#endif
63#endif // JUNO_SPI_IO_API_H
#define JUNO_MODULE_EMPTY
Helper for module definitions with no additional members.
Definition module.h:86
#define JUNO_MODULE_ROOT(API_T,...)
Implement a module root struct containing ptApi and failure fields.
Definition module.h:126
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
Module system and dependency injection primitives for LibJuno.
struct JUNO_SPI_IO_ROOT_TAG JUNO_SPI_IO_ROOT_T
Definition spi_io_api.h:44
Status codes and failure-handling helpers for LibJuno.
Definition spi_io_api.h:50
JUNO_STATUS_T(* Transaction)(JUNO_SPI_IO_ROOT_T *ptIo, char *pcReadBuff, size_t zReadBuffSize, const void *pvWriteBuff, size_t zWriteBuffSize)
Perform an SPI transaction.
Definition spi_io_api.h:57