source: rtems/bsps/arm/atsam/include/bsp.h @ ba619b7f

Last change on this file since ba619b7f was ba619b7f, checked in by Joel Sherrill <joel@…>, on 03/01/22 at 21:38:20

bsps/arm/: Scripted embedded brains header file clean up

Updates #4625.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSBSPsARMAtsam
5 */
6
7/*
8 * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
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_BSP_H
16#define LIBBSP_ARM_ATSAM_BSP_H
17
18/**
19 * @defgroup RTEMSBSPsARMAtsam Atmel/Microchip SAM E70, S70, V70 and V71
20 *
21 * @ingroup RTEMSBSPsARM
22 *
23 * @brief Atmel/Microchip SAM E70, S70, V70 and V71 Board Support Package.
24 *
25 * @{
26 */
27
28#include <bspopts.h>
29#include <bsp/default-initial-extension.h>
30#include <sys/ioccom.h>
31
32#include <rtems.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
38#define BSP_FEATURE_IRQ_EXTENSION
39
40#define BSP_ARMV7M_IRQ_PRIORITY_DEFAULT (13 << 4)
41
42#define BSP_ARMV7M_SYSTICK_PRIORITY (14 << 4)
43
44uint32_t atsam_systick_frequency(void);
45
46#define BSP_ARMV7M_SYSTICK_FREQUENCY atsam_systick_frequency()
47
48struct rtems_bsdnet_ifconfig;
49
50int if_atsam_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
51
52#define RTEMS_BSP_NETWORK_DRIVER_NAME "atsam0"
53
54#define RTEMS_BSP_NETWORK_DRIVER_ATTACH if_atsam_attach
55
56/**
57 * @brief Interface driver configuration.
58 */
59typedef struct {
60  /**
61   * @brief Maximum retries for MDIO communication.
62   */
63  uint32_t mdio_retries;
64
65  /**
66   * @brief Address of PHY.
67   *
68   * Use 0xff to search for a PHY.
69   */
70  uint8_t phy_addr;
71} if_atsam_config;
72
73extern char atsam_memory_dtcm_begin[];
74extern char atsam_memory_dtcm_end[];
75extern char atsam_memory_dtcm_size[];
76
77extern char atsam_memory_intflash_begin[];
78extern char atsam_memory_intflash_end[];
79extern char atsam_memory_intflash_size[];
80
81extern char atsam_memory_intsram_begin[];
82extern char atsam_memory_intsram_end[];
83extern char atsam_memory_intsram_size[];
84
85extern char atsam_memory_itcm_begin[];
86extern char atsam_memory_itcm_end[];
87extern char atsam_memory_itcm_size[];
88
89extern char atsam_memory_nocache_begin[];
90extern char atsam_memory_nocache_end[];
91extern char atsam_memory_nocache_size[];
92
93extern char atsam_memory_qspiflash_begin[];
94extern char atsam_memory_qspiflash_end[];
95extern char atsam_memory_qspiflash_size[];
96
97extern char atsam_memory_sdram_begin[];
98extern char atsam_memory_sdram_end[];
99extern char atsam_memory_sdram_size[];
100
101void atsam_rtc_get_time(rtems_time_of_day *tod);
102
103
104
105void bsp_restart( const void *const addr );
106
107/*
108 * This ioctl enables the receive DMA for an UART. The DMA can be usefull if you
109 * loose characters in high interrupt load situations.
110 *
111 * Disabling the DMA again is only possible by closing all file descriptors of
112 * that UART.
113 *
114 * Note that every UART needs one DMA channel and the system has only a limited
115 * amount of DMAs. So only use it if you need it.
116 */
117#define ATSAM_UART_ENABLE_RX_DMA _IO('d', 0)
118
119#ifdef __cplusplus
120}
121#endif /* __cplusplus */
122
123/** @} */
124
125#endif /* LIBBSP_ARM_ATSAM_BSP_H */
Note: See TracBrowser for help on using the repository browser.