Contiki-NG
Toggle main menu visibility
Loading...
Searching...
No Matches
soc.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016, Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
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
*
14
* 3. Neither the name of the copyright holder nor the names of its
15
* contributors may be used to endorse or promote products derived
16
* from this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29
* OF THE POSSIBILITY OF SUCH DAMAGE.
30
*/
31
/**
32
* \addtogroup cc2538
33
* @{
34
*
35
* \defgroup cc2538-soc cc2538 SoC
36
*
37
* Driver for the cc2538 SoC
38
* @{
39
*
40
* \file
41
* Header file with macro and function declarations for the cc2538 SoC
42
*/
43
#ifndef SOC_H_
44
#define SOC_H_
45
46
#include "contiki.h"
47
48
#include <stdint.h>
49
/*----------------------------------------------------------------------------*/
50
/** \name SoC features
51
* @{
52
*/
53
#define SOC_FEATURE_AES_SHA 0x00000002
/**< Security HW AES/SHA */
54
#define SOC_FEATURE_ECC_RSA 0x00000001
/**< Security HW ECC/RSA */
55
/** @} */
56
/*----------------------------------------------------------------------------*/
57
/** \name SoC functions
58
* @{
59
*/
60
61
/** \brief Gets the SoC revision
62
* \return The SoC revision as a byte with nibbles representing the major and
63
* minor revisions
64
*/
65
uint8_t
soc_get_rev
(
void
);
66
67
/** \brief Gets the SRAM size of the SoC
68
* \return The SRAM size in bytes
69
*/
70
uint32_t
soc_get_sram_size
(
void
);
71
72
/** \brief Gets the hardware features of the SoC that are enabled
73
* \return The enabled hardware features as a bitmask of \c SOC_FEATURE_x values
74
*/
75
uint32_t
soc_get_features
(
void
);
76
77
/** \brief Prints SoC information */
78
void
soc_print_info
(
void
);
79
80
/** \brief Common initialisation routine for all CC2538-based platforms */
81
void
soc_init
(
void
);
82
83
/** @} */
84
85
#endif
/* SOC_H_ */
86
87
/**
88
* @}
89
* @}
90
*/
soc_print_info
void soc_print_info(void)
Prints SoC information.
Definition
soc.c:98
soc_init
void soc_init()
Common initialisation routine for all CC2538-based platforms.
Definition
soc.c:120
soc_get_rev
uint8_t soc_get_rev(void)
Gets the SoC revision.
Definition
soc.c:72
soc_get_sram_size
uint32_t soc_get_sram_size(void)
Gets the SRAM size of the SoC.
Definition
soc.c:83
soc_get_features
uint32_t soc_get_features(void)
Gets the hardware features of the SoC that are enabled.
Definition
soc.c:92
arch
cpu
cc2538
soc.h
Generated on
for Contiki-NG by
1.17.0