NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations
nhal_spi_types.h File Reference

Defines common types and structures for the SPI Hardware Abstraction Layer (HAL). More...

#include <stddef.h>
#include <stdint.h>
#include "nhal_common.h"

Go to the source code of this file.

Data Structures

struct  nhal_spi_config
 
struct  nhal_spi_context
 Base SPI context - always present, minimal footprint. More...
 
struct  nhal_spi_daisy_device
 
struct  nhal_spi_daisy_config
 
struct  nhal_spi_daisy_context
 

Typedefs

typedef uint8_t nhal_spi_bus_id
 

Enumerations

enum  nhal_spi_mode_t { NHAL_SPI_MODE_0 = 0 , NHAL_SPI_MODE_1 , NHAL_SPI_MODE_2 , NHAL_SPI_MODE_3 }
 
enum  nhal_spi_bit_order_t { NHAL_SPI_BIT_ORDER_MSB_FIRST = 0 , NHAL_SPI_BIT_ORDER_LSB_FIRST }
 

Detailed Description

Defines common types and structures for the SPI Hardware Abstraction Layer (HAL).

This header file provides opaque types, enumerations, and structures used across the SPI HAL API to facilitate communication over SPI buses.

Definition in file nhal_spi_types.h.

Typedef Documentation

◆ nhal_spi_bus_id

typedef uint8_t nhal_spi_bus_id

Definition at line 16 of file nhal_spi_types.h.

Enumeration Type Documentation

◆ nhal_spi_bit_order_t

Enumerator
NHAL_SPI_BIT_ORDER_MSB_FIRST 

Most significant bit first.

NHAL_SPI_BIT_ORDER_LSB_FIRST 

Least significant bit first.

Definition at line 26 of file nhal_spi_types.h.

◆ nhal_spi_mode_t

Enumerator
NHAL_SPI_MODE_0 

CPOL=0, CPHA=0: Clock idle low, data sampled on rising edge.

NHAL_SPI_MODE_1 

CPOL=0, CPHA=1: Clock idle low, data sampled on falling edge.

NHAL_SPI_MODE_2 

CPOL=1, CPHA=0: Clock idle high, data sampled on falling edge.

NHAL_SPI_MODE_3 

CPOL=1, CPHA=1: Clock idle high, data sampled on rising edge.

Definition at line 19 of file nhal_spi_types.h.