AFE_NXP_Arduino 2.0.2 Analog Front-End (AFE) device operation sample code for Arduino

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
SPI_for_AFE Class Reference

`#include <SPI_for_AFE.h>`

Inheritance diagram for SPI_for_AFE:

## Public Member Functions
void | txrx (uint8_t *data, int size)
void | write_r16 (uint16_t reg)
void | write_r16 (uint16_t reg, uint16_t val)
uint16_t | read_r16 (uint16_t reg)
void | write_r24 (uint16_t reg, uint32_t val)
int32_t | read_r24 (uint16_t reg)
void | burst (uint32_t *data, int length, int width=3)

## Protected Member Functions
void | init (void)

## Private Member Functions
int32_t | get_data16 (uint8_t *vp)
int32_t | get_data24 (uint8_t *vp)

## Static Private Attributes
static constexpr int | command_length = 2

## Detailed Description

NXP Analog Front End class library for Arduino

Author
  Tedd OKANO

Version
  0.1.1

Date
  27-June-2023

Copyright: 2023 Tedd OKANO Released under the MIT license

A SPI interface class for NXP Analog Front End: NAFE13388

Definition at line 22 of file SPI_for_AFE.h.

## Member Function Documentation

## ◆ burst()

void SPI_for_AFE::burst | ( | uint32_t * | data,
|  | int | length,
|  | int | width = 3 )

Definition at line 59 of file SPI_for_AFE.cpp.

Referenced by NAFE13388_Base::read(), and NAFE33352_Base::read().

## ◆ get_data16()

int32_t SPI_for_AFE::get_data16 | ( | uint8_t * | vp | ) |
| inline private

Definition at line 74 of file SPI_for_AFE.h.

Referenced by read_r16().

## ◆ get_data24()

int32_t SPI_for_AFE::get_data24 | ( | uint8_t * | vp | ) |
| inline private

Definition at line 79 of file SPI_for_AFE.h.

Referenced by burst(), and read_r24().

## ◆ init()

void SPI_for_AFE::init | ( | void |  | ) |
| protected

Definition at line 73 of file SPI_for_AFE.cpp.

Referenced by AFE_base::begin().

## ◆ read_r16()

uint16_t SPI_for_AFE::read_r16 | ( | uint16_t | reg | ) |

Register read, 16 bit

Parameters

  reg | register index

Returns
  data value

Definition at line 29 of file SPI_for_AFE.cpp.

Referenced by NAFE13388_Base::reg(), and NAFE33352_Base::reg().

## ◆ read_r24()

int32_t SPI_for_AFE::read_r24 | ( | uint16_t | reg | ) |

Register read, 24 bit

Parameters

  reg | register index

Returns
  data value

Definition at line 48 of file SPI_for_AFE.cpp.

Referenced by NAFE13388_Base::reg(), and NAFE33352_Base::reg().

## ◆ txrx()

void SPI_for_AFE::txrx | ( | uint8_t * | data,
|  | int | size )

Send data

Parameters

  data | pointer to data buffer
  size | data size

Definition at line 3 of file SPI_for_AFE.cpp.

Referenced by burst(), read_r16(), read_r24(), write_r16(), write_r16(), and write_r24().

## ◆ write_r16() [1/2]

void SPI_for_AFE::write_r16 | ( | uint16_t | reg | ) |

Register write, 8 bit

Parameters

  reg | register index

Definition at line 13 of file SPI_for_AFE.cpp.

Referenced by NAFE13388_Base::command(), NAFE33352_Base::command(), NAFE13388_Base::reg(), and NAFE33352_Base::reg().

## ◆ write_r16() [2/2]

void SPI_for_AFE::write_r16 | ( | uint16_t | reg,
|  | uint16_t | val )

Register write, 16 bit

Parameters

  reg | register index
  val | data value

Definition at line 21 of file SPI_for_AFE.cpp.

## ◆ write_r24()

void SPI_for_AFE::write_r24 | ( | uint16_t | reg,
|  | uint32_t | val )

Register write, 24 bit

Parameters

  reg | register index
  val | data value

Definition at line 40 of file SPI_for_AFE.cpp.

Referenced by NAFE13388_Base::reg(), and NAFE33352_Base::reg().

## Member Data Documentation

## ◆ command_length

int SPI_for_AFE::command_length = 2
| static constexpr private

Definition at line 89 of file SPI_for_AFE.h.

Referenced by burst(), read_r16(), and read_r24().

The documentation for this class was generated from the following files:

- SPI_for_AFE.h
- SPI_for_AFE.cpp