Contiki-NG
Loading...
Searching...
No Matches
at86rf215-arch.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023, ComLab, Jozef Stefan Institute - https://e6.ijs.si/
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the copyright holder nor the names of its
14 * contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28 * OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30/*---------------------------------------------------------------------------*/
31/**
32 * \file
33 * Header file for the at86rf215-arch.c - architecture dependent code.
34 * \author
35 * Grega Morano <grega.morano@ijs.si>
36 */
37/*---------------------------------------------------------------------------*/
38#ifndef AT86RF215_ARCH_H_
39#define AT86RF215_ARCH_H_
40
41#include <stdint.h>
42
43/**
44 * \brief Initialize the radio's I/O periphery
45 *
46 * The function has to accomplish the following tasks:
47 * - Configure RST pin
48 * - Configure IRQ pin and setup the interrupt
49 * - Configure CSn pin
50 * - Enable and configure SPI
51 */
52void at86rf215_arch_init(void);
53
54/**
55 * \brief Reset the radio
56 *
57 * The radio Reset is triggered by pulling the pin RSTN to low, keeping it
58 * low for 625ns and than release it to high.
59 */
61
62/**
63 * \brief Release the radio from the reset mode
64 */
66
67/**
68 * \brief Enable the radio's IRQ line
69 */
71
72/**
73 * \brief Disable the radio's IRQ line
74 */
76
77/**
78 * \brief Select the radio's SPI chip select
79 */
81
82/**
83 * \brief Deselect the radio's SPI chip select
84 */
86
87/**
88 * \brief Transfer and receive a single byte over SPI
89 * \param b Byte to be sent
90 * \return Byte received
91 */
92uint8_t at86rf215_arch_spi_txrx(uint8_t b);
93
94/**
95 * \brief Interrupt routine
96 *
97 * To be called by the hardware interrupt handler - part of at86rf215-arch.c
98 */
99void at86rf215_isr(void);
100
101#endif /* AT86RF215_ARCH_H */
void at86rf215_arch_clear_RSTN(void)
Release the radio from the reset mode.
void at86rf215_arch_enable_EXTI(void)
Enable the radio's IRQ line.
void at86rf215_arch_spi_select(void)
Select the radio's SPI chip select.
void at86rf215_isr(void)
Interrupt routine.
Definition at86rf215.c:811
void at86rf215_arch_disable_EXTI(void)
Disable the radio's IRQ line.
void at86rf215_arch_init(void)
Initialize the radio's I/O periphery.
uint8_t at86rf215_arch_spi_txrx(uint8_t b)
Transfer and receive a single byte over SPI.
void at86rf215_arch_set_RSTN(void)
Reset the radio.
void at86rf215_arch_spi_deselect(void)
Deselect the radio's SPI chip select.