RTEMS: bsps/arm/atsam/include/bsp/atsam-spi.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
atsam-spi.h
1/*
2 * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
3 *
4 * embedded brains GmbH
5 * Dornierstr. 4
6 * 82178 Puchheim
7 * Germany
8 * <info@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef LIBBSP_ARM_ATSAM_ATSAM_SPI_H
16#define LIBBSP_ARM_ATSAM_ATSAM_SPI_H
17
18#include <libchip/chip.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24 typedef struct {
25 uint8_t spi_peripheral_id;
26 const Pin *pins;
27 Spi *spi_regs;
28 size_t pin_count;
29 bool chip_select_decode;
30
31 /* Delay before SCLK in ns */
32 uint32_t dlybs_in_ns[4];
33
34 /* Delay before consecutive word transfers in ns */
35 uint32_t dlybct_in_ns[4];
36} atsam_spi_config;
37
38int spi_bus_register_atsam(
39 const char *bus_path,
40 const atsam_spi_config *config
41);
42
43#ifdef __cplusplus
44}
45#endif /* __cplusplus */
46
47#endif /* LIBBSP_ARM_ATSAM_ATSAM_SPI_H */
Spi
Spi hardware registers.
Definition: component_spi.h:41
_Pin
Definition: pio.h:172
atsam_spi_config
Definition: atsam-spi.h:24
config_s
Definition: deflate.c:115