WPILibC++ 2026.2.2
Loading...
Searching...
No Matches
SPITypes.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <stdint.h>
8
9#include "hal/Types.h"
10
11/**
12 * @defgroup hal_spi SPI Functions
13 * @ingroup hal_capi
14 * @{
15 */
16
17/** SPI port. */
19 /** Invalid port number. */
21 /** Onboard SPI bus port CS0. */
23 /** Onboard SPI bus port CS1. */
25 /** Onboard SPI bus port CS2. */
27 /** Onboard SPI bus port CS3. */
29 /** MXP (roboRIO MXP) SPI bus port. */
31};
32
33/** SPI mode. */
35 /** Clock idle low, data sampled on rising edge. */
37 /** Clock idle low, data sampled on falling edge. */
39 /** Clock idle high, data sampled on falling edge. */
41 /** Clock idle high, data sampled on rising edge. */
43};
44/** @} */
HAL_SPIMode
SPI mode.
Definition SPITypes.h:34
HAL_SPIPort
SPI port.
Definition SPITypes.h:18
@ HAL_SPI_kMode0
Clock idle low, data sampled on rising edge.
Definition SPITypes.h:36
@ HAL_SPI_kMode1
Clock idle low, data sampled on falling edge.
Definition SPITypes.h:38
@ HAL_SPI_kMode2
Clock idle high, data sampled on falling edge.
Definition SPITypes.h:40
@ HAL_SPI_kMode3
Clock idle high, data sampled on rising edge.
Definition SPITypes.h:42
@ HAL_SPI_kMXP
MXP (roboRIO MXP) SPI bus port.
Definition SPITypes.h:30
@ HAL_SPI_kOnboardCS0
Onboard SPI bus port CS0.
Definition SPITypes.h:22
@ HAL_SPI_kInvalid
Invalid port number.
Definition SPITypes.h:20
@ HAL_SPI_kOnboardCS2
Onboard SPI bus port CS2.
Definition SPITypes.h:26
@ HAL_SPI_kOnboardCS1
Onboard SPI bus port CS1.
Definition SPITypes.h:24
@ HAL_SPI_kOnboardCS3
Onboard SPI bus port CS3.
Definition SPITypes.h:28
#define HAL_ENUM(name)
Definition Types.h:76