Loading...
Searching...
No Matches
kw2xrf_spi.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 PHYTEC Messtechnik GmbH
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
18#ifndef KW2XRF_SPI_H
19#define KW2XRF_SPI_H
20
21#include <stdio.h>
22#include "board.h"
23#include "cpu.h"
24#include "periph/spi.h"
25#include "periph_conf.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
39
47void kw2xrf_write_dreg(kw2xrf_t *dev, uint8_t addr, uint8_t value);
48
56uint8_t kw2xrf_read_dreg(kw2xrf_t *dev, uint8_t addr);
57
66void kw2xrf_write_dregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length);
67
76void kw2xrf_read_dregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length);
77
85void kw2xrf_write_ireg(kw2xrf_t *dev, uint8_t addr, uint8_t value);
86
95uint8_t kw2xrf_read_ireg(kw2xrf_t *dev, uint8_t addr);
96
105void kw2xrf_write_iregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length);
106
115void kw2xrf_read_iregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length);
116
124void kw2xrf_write_fifo(kw2xrf_t *dev, uint8_t *data, uint8_t data_length);
125
133void kw2xrf_read_fifo(kw2xrf_t *dev, uint8_t *data, uint8_t data_length);
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif /* KW2XRF_SPI_H */
void kw2xrf_write_ireg(kw2xrf_t *dev, uint8_t addr, uint8_t value)
Writes to a byte from the kw2xrf indirect register.
uint8_t kw2xrf_read_dreg(kw2xrf_t *dev, uint8_t addr)
Reads a byte from the kw2xrf register.
void kw2xrf_read_fifo(kw2xrf_t *dev, uint8_t *data, uint8_t data_length)
Reads multiple bytes from the kw2xrf fifo.
void kw2xrf_write_iregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length)
Writes to kw2xrf indirect registers.
void kw2xrf_read_dregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length)
Reads a byte from the kw2xrf indirect register.
uint8_t kw2xrf_read_ireg(kw2xrf_t *dev, uint8_t addr)
Reads a byte from the kw2xrf indirect register.
void kw2xrf_write_dregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length)
Writes to kw2xrf direct registers.
void kw2xrf_write_dreg(kw2xrf_t *dev, uint8_t addr, uint8_t value)
Writes a byte to the kw2xrf register.
void kw2xrf_read_iregs(kw2xrf_t *dev, uint8_t addr, uint8_t *buf, uint8_t length)
Reads a byte from the kw2xrf indirect register.
int kw2xrf_spi_init(kw2xrf_t *dev)
SPI interface initialization.
void kw2xrf_write_fifo(kw2xrf_t *dev, uint8_t *data, uint8_t data_length)
Writes multiple bytes to the kw2xrf fifo.
Low-level SPI peripheral driver interface definition.
stdio wrapper to extend the C libs stdio
Device descriptor for KW2XRF radio devices.
Definition kw2xrf.h:119