no-OS
Loading...
Searching...
No Matches
maxim_gpio_spi.h File Reference

Bit-banged (GPIO) SPI master for MAX78000, no_os_spi platform ops. More...

#include <stdint.h>
#include <stdbool.h>
#include "no_os_spi.h"
Include dependency graph for maxim_gpio_spi.h:

Classes

struct  max_gpio_spi_init_param
 Pin map and options for a bit-banged SPI bus, passed via no_os_spi_init_param.extra. More...
 

Variables

const struct no_os_spi_platform_ops max_gpio_spi_ops
 Bit-banged SPI platform ops (no_os_spi backend).
 

Detailed Description

Bit-banged (GPIO) SPI master for MAX78000, no_os_spi platform ops.

Author
Victor Pascu (victo.nosp@m.r.pa.nosp@m.scu@a.nosp@m.nalo.nosp@m.g.com)

Copyright 2026(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Variable Documentation

◆ max_gpio_spi_ops

const struct no_os_spi_platform_ops max_gpio_spi_ops
extern

Bit-banged SPI platform ops (no_os_spi backend).

Performance: pin registers and masks are resolved once at init and the bit loop toggles the raw GPIO out_set/out_clr / reads in directly, so it runs at the same speed as hand-written register bit-banging (no per-bit no_os_gpio call overhead).

Bus-ownership contract (single-driver discipline): CS is a persistent output owned only by this descriptor. SCLK+MOSI are driven (push-pull) only for the duration of a transfer and returned to high-Z inputs afterwards; MISO is always an input. The transfer routine assumes the caller holds any cross-core bus lock for the whole transfer – it does not lock internally, keeping the lock policy an application concern.

Supported: SPI mode 3 (CPOL=1, CPHA=1), MSB-first. Other modes/orders are rejected at init with -ENOTSUP.

Bit-banged SPI platform ops (no_os_spi backend).