text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```objective-c
/*your_sha256_hash-------------
* Name: CV_Config.h
* Purpose: CV Config header
*your_sha256_hash------------
*your_sha256_hash------------*/
#ifndef __CV_CONFIG_H
#define __CV_CONFIG_H
#include "RTE_Components.h"
#include CMSIS_device_header
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h> Common Test Settings
// <o> Print Output Format <0=> Plain Text <1=> XML
// <i> Set the test results output format to plain text or XML
#ifndef PRINT_XML_REPORT
#define PRINT_XML_REPORT 1
#endif
// <o> Buffer size for assertions results
// <i> Set the buffer size for assertions results buffer
#define BUFFER_ASSERTIONS 128U
// </h>
// <h> Disable Test Cases
// <i> Uncheck to disable an individual test case
// <q0> TC_CoreInstr_NOP
#define TC_COREINSTR_NOP_EN 1
// <q0> TC_CoreInstr_SEV
#define TC_COREINSTR_SEV_EN 1
// <q0> TC_CoreInstr_BKPT
#define TC_COREINSTR_BKPT_EN 1
// <q0> TC_CoreInstr_ISB
#define TC_COREINSTR_ISB_EN 1
// <q0> TC_CoreInstr_DSB
#define TC_COREINSTR_DSB_EN 1
// <q0> TC_CoreInstr_DMB
#define TC_COREINSTR_DMB_EN 1
// <q0> TC_CoreInstr_WFI
#define TC_COREINSTR_WFI_EN 0
// <q0> TC_CoreInstr_WFE
#define TC_COREINSTR_WFE_EN 0
// <q0> TC_CoreInstr_REV
#define TC_COREINSTR_REV_EN 1
// <q0> TC_CoreInstr_REV16
#define TC_COREINSTR_REV16_EN 1
// <q0> TC_CoreInstr_REVSH
#define TC_COREINSTR_REVSH_EN 1
// <q0> TC_CoreInstr_ROR
#define TC_COREINSTR_ROR_EN 1
// <q0> TC_CoreInstr_RBIT
#define TC_COREINSTR_RBIT_EN 1
// <q0> TC_CoreInstr_CLZ
#define TC_COREINSTR_CLZ_EN 1
// <q0> TC_CoreInstr_SSAT
#define TC_COREINSTR_SSAT_EN 1
// <q0> TC_CoreInstr_USAT
#define TC_COREINSTR_USAT_EN 1
// <q0> TC_CoreInstr_RRX
#define TC_COREINSTR_RRX_EN 1
// <q0> TC_CoreInstr_LoadStoreExlusive
#define TC_COREINSTR_LOADSTOREEXCLUSIVE_EN 1
// <q0> TC_CoreInstr_LoadStoreUnpriv
#define TC_COREINSTR_LOADSTOREUNPRIV_EN 1
// <q0> TC_CoreInstr_LoadStoreAcquire
#define TC_COREINSTR_LOADSTOREACQUIRE_EN 1
// <q0> TC_CoreInstr_LoadStoreAcquireExclusive
#define TC_COREINSTR_LOADSTOREACQUIREEXCLUSIVE_EN 1
// <q0> TC_CoreSimd_SatAddSub
#define TC_CORESIMD_SATADDSUB_EN 1
// <q0> TC_CoreSimd_ParSat16
#define TC_CORESIMD_PARSAT16_EN 1
// <q0> TC_CoreSimd_PackUnpack
#define TC_CORESIMD_PACKUNPACK_EN 1
// <q0> TC_CoreSimd_ParSel
#define TC_CORESIMD_PARSEL_EN 1
// <q0> TC_CoreSimd_ParAddSub8
#define TC_CORESIMD_PARADDSUB8_EN 1
// <q0> TC_CoreSimd_AbsDif8
#define TC_CORESIMD_ABSDIF8_EN 1
// <q0> TC_CoreSimd_ParAddSub16
#define TC_CORESIMD_PARADDSUB16_EN 1
// <q0> TC_CoreSimd_ParMul16
#define TC_CORESIMD_PARMUL16_EN 1
// <q0> TC_CoreSimd_Pack16
#define TC_CORESIMD_PACK16_EN 1
// <q0> TC_CoreSimd_MulAcc32
#define TC_CORESIMD_MULACC32_EN 1
// <q0> TC_CoreFunc_EnDisIRQ
#define TC_COREFUNC_ENDISIRQ_EN 1
// <q0> TC_CoreFunc_IRQPrio
#define TC_COREFUNC_IRQPRIO_EN 1
// <q0> TC_CoreFunc_EncDecIRQPrio
#define TC_COREFUNC_ENCDECIRQPRIO_EN 1
// <q0> TC_CoreFunc_IRQVect
#define TC_COREFUNC_IRQVECT_EN 1
// <q0> TC_CoreFunc_Control
#define TC_COREFUNC_CONTROL_EN 1
// <q0> TC_CoreFunc_IPSR
#define TC_COREFUNC_IPSR_EN 1
// <q0> TC_CoreFunc_APSR
#define TC_COREFUNC_APSR_EN 1
// <q0> TC_CoreFunc_PSP
#define TC_COREFUNC_PSP_EN 1
// <q0> TC_CoreFunc_MSP
#define TC_COREFUNC_MSP_EN 1
// <q0> TC_CoreFunc_PSPLIM
#define TC_COREFUNC_PSPLIM_EN 1
// <q0> TC_CoreFunc_PSPLIM_NS
#define TC_COREFUNC_PSPLIM_NS_EN 1
// <q0> TC_CoreFunc_MSPLIM
#define TC_COREFUNC_MSPLIM_EN 1
// <q0> TC_CoreFunc_MSPLIM_NS
#define TC_COREFUNC_MSPLIM_NS_EN 1
// <q0> TC_CoreFunc_PRIMASK
#define TC_COREFUNC_PRIMASK_EN 1
// <q0> TC_CoreFunc_FAULTMASK
#define TC_COREFUNC_FAULTMASK_EN 1
// <q0> TC_CoreFunc_BASEPRI
#define TC_COREFUNC_BASEPRI_EN 1
// <q0> TC_CoreFunc_FPUType
#define TC_COREFUNC_FPUTYPE_EN 1
// <q0> TC_CoreFunc_FPSCR
#define TC_COREFUNC_FPSCR_EN 1
// <q0> TC_MPU_SetClear
#define TC_MPU_SETCLEAR_EN 1
// <q0> TC_MPU_Load
#define TC_MPU_LOAD_EN 1
// <q0> TC_CML1Cache_EnDisableICache
#define TC_CML1CACHE_ENDISABLE_ICACHE 1
// <q0> TC_CML1Cache_EnDisableDCache
#define TC_CML1CACHE_ENDISABLE_DCACHE 1
// <q0> TC_CML1Cache_CleanDCacheByAddrWhileDisabled
#define TC_CML1CACHE_CLEANDCACHEBYADDRWHILEDISABLED 1
// </h>
#endif /* __CV_CONFIG_H */
``` | /content/code_sandbox/CMSIS/CoreValidation/Source/Config/CV_Config_template.h | objective-c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,548 |
```shell
#!/bin/bash
# Version: 1.1
# Date: 2020-04-29
# This bash script generates a CMSIS Software Pack:
#
# Pre-requisites:
# - bash shell (for Windows: install git for Windows)
# - 7z in path (zip archiving utility)
# e.g. Ubuntu: sudo apt-get install p7zip-full p7zip-rar)
# - PackChk in path with execute permission
# (see CMSIS-Pack: CMSIS/Utilities/<os>/PackChk)
# - xmllint in path (XML schema validation)
# e.g. Ubuntu: sudo apt-get install libxml2-utils
# Windows: download from path_to_url
############### EDIT BELOW ###############
# Extend Path environment variable locally
#
if [ `uname -s` = "Linux" ]
then
CMSIS_PACK_PATH="/home/$USER/.arm/Packs/ARM/CMSIS/5.7.0/"
PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
else
CMSIS_PACK_PATH="$LOCALAPPDATA/Arm/Packs/ARM/CMSIS/5.7.0"
PATH_TO_ADD="/C/Program Files/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
fi
[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
echo $PATH_TO_ADD appended to PATH
echo " "
# Pack warehouse directory - destination
PACK_WAREHOUSE=output/
# Temporary pack build directory
PACK_BUILD=build/
# Specify directories included in pack relative to base directory
# All directories:
PACK_DIRS=`ls -d */`
# Do not include the build directory if it is local
PACK_DIRS=${PACK_DIRS//$PACK_BUILD/}
PACK_DIRS=${PACK_DIRS//$PACK_WAREHOUSE/}
# alternative: specify directory names to be added to pack base directory
# PACK_DIRS="
# Source
# Include
#"
# Specify file names to be added to pack base directory
PACK_BASE_FILES="
README.md
"
############ DO NOT EDIT BELOW ###########
echo Starting CMSIS-Pack Generation: `date`
# Zip utility check
ZIP=7z
type -a $ZIP
errorlevel=$?
if [ $errorlevel -gt 0 ]
then
echo "Error: No 7zip Utility found"
echo "Action: Add 7zip to your path"
echo " "
exit
fi
# Pack checking utility check
PACKCHK=PackChk
type -a $PACKCHK
errorlevel=$?
if [ $errorlevel != 0 ]
then
echo "Error: No PackChk Utility found"
echo "Action: Add PackChk to your path"
echo "Hint: Included in CMSIS Pack:"
echo "<pack_root_dir>/ARM/CMSIS/<version>/CMSIS/Utilities/<os>/"
echo " "
exit
fi
echo " "
# XML syntax checking utility check
XMLLINT=xmllint
type -a $XMLLINT
errorlevel=$?
if [ $errorlevel != 0 ]
then
echo "Error: No xmllint found"
echo "Action: Add xmllint to your path"
echo " "
exit
fi
echo " "
# Locate Package Description file
# check whether there is more than one pdsc file
NUM_PDSCS=`ls -1 *.pdsc | wc -l`
PACK_DESCRIPTION_FILE=`ls *.pdsc`
if [ $NUM_PDSCS -lt 1 ]
then
echo "Error: No *.pdsc file found in current directory"
echo " "
elif [ $NUM_PDSCS -gt 1 ]
then
echo "Error: Only one PDSC file allowed in directory structure:"
echo "Found:"
echo "$PACK_DESCRIPTION_FILE"
echo "Action: Delete unused pdsc files"
echo " "
exit
fi
SAVEIFS=$IFS
IFS=.
set $PACK_DESCRIPTION_FILE
# Pack Vendor
PACK_VENDOR=$1
# Pack Name
PACK_NAME=$2
echo Generating Pack Version: for $PACK_VENDOR.$PACK_NAME
echo " "
IFS=$SAVEIFS
#if $PACK_BUILD directory does not exist, create it.
if [ ! -d $PACK_BUILD ]; then
mkdir -p $PACK_BUILD
fi
# Copy files into build base directory: $PACK_BUILD
# pdsc file is mandatory in base directory:
cp -f ./$PACK_VENDOR.$PACK_NAME.pdsc ${PACK_BUILD}
# directories
echo Adding directories to pack:
echo $PACK_DIRS
echo " "
for d in ${PACK_DIRS}
do
cp -r "$d" ${PACK_BUILD}
done
# files for base directory
echo Adding files to pack:
echo $PACK_BASE_FILES
echo " "
for f in $PACK_BASE_FILES
do
cp -f "$f" $PACK_BUILD/
done
# Run Schema Check (for Linux only):
# sudo apt-get install libxml2-utils
echo Running schema check for $PACK_VENDOR.$PACK_NAME.pdsc
$XMLLINT --noout --schema ${CMSIS_PACK_PATH}/CMSIS/Utilities/PACK.xsd $PACK_BUILD/$PACK_VENDOR.$PACK_NAME.pdsc
errorlevel=$?
if [ $errorlevel -ne 0 ]; then
echo "build aborted: Schema check of $PACK_VENDOR.$PACK_NAME.pdsc against PACK.xsd failed"
echo " "
exit
fi
# Run Pack Check and generate PackName file with version
$PACKCHK $PACK_BUILD/$PACK_VENDOR.$PACK_NAME.pdsc -n PackName.txt -x M362
errorlevel=$?
if [ $errorlevel -ne 0 ]; then
echo "build aborted: pack check failed"
echo " "
exit
fi
PACKNAME=`cat PackName.txt`
rm -rf PackName.txt
# Archiving
# $ZIP a $PACKNAME
echo creating pack file $PACKNAME
#if $PACK_WAREHOUSE directory does not exist create it
if [ ! -d $PACK_WAREHOUSE ]; then
mkdir -p $PACK_WAREHOUSE
fi
pushd $PACK_WAREHOUSE
PACK_WAREHOUSE=`pwd`
popd
pushd $PACK_BUILD
"$ZIP" a $PACK_WAREHOUSE/$PACKNAME -tzip
popd
errorlevel=$?
if [ $errorlevel -ne 0 ]; then
echo "build aborted: archiving failed"
exit
fi
echo "build of pack succeeded"
# Clean up
echo "cleaning up ..."
rm -rf $PACK_BUILD
echo " "
echo Completed CMSIS-Pack Generation: `date`
``` | /content/code_sandbox/CMSIS/Pack/Bash/gen_pack.sh | shell | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,450 |
```objective-c
``` | /content/code_sandbox/CMSIS/Pack/Bash/Include/component.h | objective-c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1 |
```c
``` | /content/code_sandbox/CMSIS/Pack/Bash/Source/component.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1 |
```shell
#!/bin/bash
# Version: 1.0
# Date: 2021-05-05
# This bash script generates CMSIS Documentation:
#
# Pre-requisites:
# - bash shell (for Windows: install git for Windows)
# - doxygen 1.8.6
# - mscgen 0.20
set -o pipefail
DIRNAME=$(dirname $(readlink -f $0))
DOXYGEN=$(which doxygen)
MSCGEN=$(which mscgen)
REGEN=0
ALLPARTS=($(find ${DIRNAME} -mindepth 1 -maxdepth 1 -type d -exec basename {} \;))
PARTS=()
if [[ -z "$*" ]]; then
REGEN=1
else
for part in "$*"; do
if [[ " ${ALLPARTS[@]} " =~ " $part " ]]; then
PARTS+=($part)
fi
done
fi
if [[ ! -f "${DOXYGEN}" ]]; then
echo "Doxygen not found!" >&2
echo "Did you miss to add it to PATH?"
exit 1
else
version=$("${DOXYGEN}" --version)
echo "DOXYGEN is ${DOXYGEN} at version ${version}"
if [[ "${version}" != "1.8.6" ]]; then
echo " >> Version is different from 1.8.6 !" >&2
fi
fi
if [[ ! -f "${MSCGEN}" ]]; then
echo "mscgen not found!" >&2
echo "Did you miss to add it to PATH?"
exit 1
else
version=$("${MSCGEN}" 2>/dev/null | grep "Mscgen version" | sed -r -e 's/Mscgen version ([^,]+),.*/\1/')
echo "MSCGEN is ${MSCGEN} at version ${version}"
if [[ "${version}" != "0.20" ]]; then
echo " >> Version is different from 0.20 !" >&2
fi
fi
function doxygen {
partname=$(basename $(dirname $1))
if [[ $REGEN != 0 ]] || [[ " ${PARTS[@]} " =~ " ${partname} " ]]; then
pushd "$(dirname $1)" > /dev/null
echo "${DOXYGEN} $1"
"${DOXYGEN}" $(basename "$1")
popd > /dev/null
if [[ $2 != 0 ]]; then
cp -f "${DIRNAME}/Doxygen_Templates/search.css" "${DIRNAME}/../Documentation/${partname}/html/search/"
fi
projectName=$(grep -E "PROJECT_NAME\s+=" $1 | sed -r -e 's/[^"]*"([^"]+)"/\1/')
projectNumber=$(grep -E "PROJECT_NUMBER\s+=" $1 | sed -r -e 's/[^"]*"([^"]+)"/\1/')
datetime=$(date -u +'%a %b %e %Y %H:%M:%S')
sed -e "s/{datetime}/${datetime}/" "${DIRNAME}/Doxygen_Templates/cmsis_footer.js" \
| sed -e "s/{projectName}/${projectName}/" \
| sed -e "s/{projectNumber}/${projectNumber}/" \
> "${DIRNAME}/../Documentation/${partname}/html/cmsis_footer.js"
fi
}
if [[ $REGEN != 0 ]]; then
echo "Cleaning existing documentation ..."
find "${DIRNAME}/../Documentation/" -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} +
fi
echo "Generating documentation ..."
echo "Copying Build html"
mkdir -p "${DIRNAME}/../Documentation/Build/"
cp -r "${DIRNAME}/Build/html/" "${DIRNAME}/../Documentation/Build/"
doxygen "${DIRNAME}/Core/core.dxy" 1
doxygen "${DIRNAME}/Core_A/core_A.dxy" 1
doxygen "${DIRNAME}/DAP/dap.dxy" 1
doxygen "${DIRNAME}/Driver/Driver.dxy" 1
echo "Copying DSP html"
mkdir -p "${DIRNAME}/../Documentation/DSP/"
cp -r "${DIRNAME}/DSP/html" "${DIRNAME}/../Documentation/DSP/"
doxygen "${DIRNAME}/General/general.dxy" 0
doxygen "${DIRNAME}/DAP/dap.dxy" 1
echo "Copying NN html"
mkdir -p "${DIRNAME}/../Documentation/NN/"
cp -r "${DIRNAME}/NN/html" "${DIRNAME}/../Documentation/NN/"
echo "Copying Pack html"
mkdir -p "${DIRNAME}/../Documentation/Pack/"
cp -r "${DIRNAME}/Pack/html" "${DIRNAME}/../Documentation/Pack/"
doxygen "${DIRNAME}/RTOS/rtos.dxy" 1
doxygen "${DIRNAME}/RTOS2/rtos.dxy" 1
doxygen "${DIRNAME}/SVD/svd.dxy" 0
doxygen "${DIRNAME}/Zone/zone.dxy" 1
exit 0
``` | /content/code_sandbox/CMSIS/DoxyGen/gen_doc.sh | shell | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,108 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<title>Redirect to the CMSIS main page after 0 seconds</title>
<meta http-equiv="refresh" content="0; URL=../Documentation/General/html/index.html">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If the automatic redirection is failing, click <a href="../Documentation/General/html/index.html">open CMSIS Documentation</a>.
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/index.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 117 |
```objective-c
// ==== RTX Extensions ====
/// Suspend the RTX task scheduler.
/// \return number of ticks, for how long the system can sleep or power-down.
uint32_t os_suspend (void);
/// Resume the RTX task scheduler.
/// \param[in] sleep_time specifies how long the system was in sleep or power-down mode.
void os_resume (uint32_t sleep_time);
/// OS idle demon (running when no other thread is ready to run).
__NO_RETURN void os_idle_demon (void);
/// OS error callback (called when a runtime error is detected).
/// \param[in] error_code actual error code that has been detected.
__NO_RETURN void os_error (uint32_t error_code);
``` | /content/code_sandbox/CMSIS/DoxyGen/RTOS/src/RTX/cmsis_os_rtx_extensions.h | objective-c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 153 |
```javascript
var strgURL = location.pathname; // path of current component
// constuctor for the array of objects
function tabElement(id, folderName, tabTxt ) {
this.id = id; // elementID as needed in html;
this.folderName = folderName; // folder name of the component
this.tabTxt = tabTxt; // Text displayed as menu on the web
this.currentListItem = '<li id="' + this.id + '" class="current"> <a href="../..' + this.folderName + 'index.html"><span>' + this.tabTxt + '</span></a></li>';
this.listItem = '<li id="' + this.id + '"> <a href="../..' + this.folderName + 'index.html"><span>' + this.tabTxt + '</span></a></li>';
};
// array of objects
var arr = [];
// fill array
arr.push( new tabElement( "GEN", "/General/html/", "General") );
arr.push( new tabElement( "CORE_A", "/Core_A/html/", "Core(A)") );
arr.push( new tabElement( "CORE_M", "/Core/html/", "Core(M)") );
arr.push( new tabElement( "DRV", "/Driver/html/", "Driver") );
arr.push( new tabElement( "DSP&ML", "/DSP/html/", "DSP") );
arr.push( new tabElement( "NN", "/NN/html/", "NN") );
arr.push( new tabElement( "RTOSv1", "/RTOS/html/", "RTOS v1") );
arr.push( new tabElement( "RTOSv2", "/RTOS2/html/", "RTOS v2") );
arr.push( new tabElement( "PACK", "/Pack/html/", "Pack") );
arr.push( new tabElement( "Build", "/Build/html/", "Build") );
arr.push( new tabElement( "SVD", "/SVD/html/", "SVD") );
arr.push( new tabElement( "DAP", "/DAP/html/", "DAP") );
arr.push( new tabElement( "ZONE", "/Zone/html/", "Zone") );
// write tabs
// called from the header file.
function writeComponentTabs() {
for ( var i=0; i < arr.length; i++ ) {
if (strgURL.search(arr[i].folderName) > 0) { // if this is the current folder
document.write(arr[i].currentListItem); // then print and hightlight the tab
} else {
document.write(arr[i].listItem); // else, print the tab
}
}
};
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/printComponentTabs.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 595 |
```css
.tabs, .tabs1, .tabs2, .tabs3 {
background-image: url('tab_b.png');
width: 100%;
z-index: 101;
font-size: 10px;
}
.tabs1 {
background-image: url('tab_topnav.png');
font-size: 12px;
}
.tabs2 {
font-size: 10px;
}
.tabs3 {
font-size: 9px;
}
.tablist {
margin: 0;
padding: 0;
display: table;
line-height: 24px;
}
.tablist li {
float: left;
display: table-cell;
background-image: url('tab_b.png');
list-style: none;
}
.tabs1 .tablist li {
float: left;
display: table-cell;
background-image: url('tab_topnav.png');
list-style: none;
}
.tablist a {
display: block;
padding: 0 20px;
font-weight: bold;
background-image:url('tab_s.png');
background-repeat:no-repeat;
background-position:right;
color: #283A5D;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
text-decoration: none;
outline: none;
}
.tabs3 .tablist a {
padding: 0 10px;
}
.tablist a:hover {
background-image: url('tab_h.png');
background-repeat:repeat-x;
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
text-decoration: none;
}
.tablist li.current a {
background-image: url('tab_a.png');
background-repeat:repeat-x;
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/tabs.css | css | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 422 |
```html
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">
<script type="text/javascript">
<!--
writeFooter.call(this);
//-->
</script>
</li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 114 |
```javascript
function writeFooter() {
document.write('Generated on {datetime} for {projectName} {projectNumber} by Arm Ltd. All rights reserved.');
};
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 34 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath$jquery.js"></script>
<script type="text/javascript" src="$relpath$dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath$cmsis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER--> <span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<li class="current"><a href="../../DAP/html/index.html"><span>DAP</span></a></li>
</ul>
</div>
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/cmsis_dap_header.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 541 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>$title</title>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<link href="$relpath$cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="$relpath$jquery.js"></script>
<script type="text/javascript" src="$relpath$dynsections.js"></script>
<script type="text/javascript" src="$relpath$printComponentTabs.js"></script>
<script type="text/javascript" src="$relpath$cmsis_footer.js"></script>
$treeview
$search
$mathjax
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER--> <span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/cmsis_header.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 583 |
```css
/*---------------- Search Box */
#FSearchBox {
float: left;
}
#searchli {
float: right;
display: block;
width: 170px;
height: 24px;
}
#MSearchBox {
white-space : nowrap;
position: absolute;
float: none;
display: inline;
margin-top: 3px;
right: 0px;
width: 170px;
z-index: 102;
}
#MSearchBox .left
{
display:block;
position:absolute;
left:10px;
width:20px;
height:19px;
background:url('search_l.png') no-repeat;
background-position:right;
}
#MSearchSelect {
display:block;
position:absolute;
width:20px;
height:19px;
}
.left #MSearchSelect {
left:4px;
}
.right #MSearchSelect {
right:5px;
}
#MSearchField {
display:block;
position:absolute;
height:19px;
background:url('search_m.png') repeat-x;
border:none;
width:116px;
margin-left:20px;
padding-left:4px;
color: #909090;
outline: none;
font: 9pt Arial, Verdana, sans-serif;
}
#FSearchBox #MSearchField {
margin-left:15px;
}
#MSearchBox .right {
display:block;
position:absolute;
right:10px;
top:0px;
width:20px;
height:19px;
background:url('search_r.png') no-repeat;
background-position:left;
}
#MSearchClose {
display: none;
position: absolute;
top: 4px;
background : none;
border: none;
margin: 0px 4px 0px 0px;
padding: 0px 0px;
outline: none;
}
.left #MSearchClose {
left: 6px;
}
.right #MSearchClose {
right: 2px;
}
.MSearchBoxActive #MSearchField {
color: #000000;
}
/*---------------- Search filter selection */
#MSearchSelectWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #90A5CE;
background-color: #F9FAFC;
z-index: 1;
padding-top: 4px;
padding-bottom: 4px;
-moz-border-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
.SelectItem {
font: 8pt Arial, Verdana, sans-serif;
padding-left: 2px;
padding-right: 12px;
border: 0px;
}
span.SelectionMark {
margin-right: 4px;
font-family: monospace;
outline-style: none;
text-decoration: none;
}
a.SelectItem {
display: block;
outline-style: none;
color: #000000;
text-decoration: none;
padding-left: 6px;
padding-right: 12px;
}
a.SelectItem:focus,
a.SelectItem:active {
color: #000000;
outline-style: none;
text-decoration: none;
}
a.SelectItem:hover {
color: #FFFFFF;
background-color: #3D578C;
outline-style: none;
text-decoration: none;
cursor: pointer;
display: block;
}
/*---------------- Search results window */
iframe#MSearchResults {
width: 60ex;
height: 15em;
}
#MSearchResultsWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #000;
background-color: #EEF1F7;
}
/* ----------------------------------- */
#SRIndex {
clear:both;
padding-bottom: 15px;
}
.SREntry {
font-size: 10pt;
padding-left: 1ex;
}
.SRPage .SREntry {
font-size: 8pt;
padding: 1px 5px;
}
body.SRPage {
margin: 5px 2px;
}
.SRChildren {
padding-left: 3ex; padding-bottom: .5em
}
.SRPage .SRChildren {
display: none;
}
.SRSymbol {
font-weight: bold;
color: #425E97;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRScope {
display: block;
color: #425E97;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRSymbol:focus, a.SRSymbol:active,
a.SRScope:focus, a.SRScope:active {
text-decoration: underline;
}
.SRPage .SRStatus {
padding: 2px 5px;
font-size: 8pt;
font-style: italic;
}
.SRResult {
display: none;
}
DIV.searchresults {
margin-left: 10px;
margin-right: 10px;
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/search.css | css | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,212 |
```css
#nav-tree .children_ul {
margin:0;
padding:4px;
}
#nav-tree ul {
list-style:none outside none;
margin:0px;
padding:0px;
}
#nav-tree li {
white-space:nowrap;
margin:0px;
padding:0px;
}
#nav-tree .plus {
margin:0px;
}
#nav-tree .selected {
background-image: url('tab_a.png');
background-repeat:repeat-x;
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
}
#nav-tree img {
margin:0px;
padding:0px;
border:0px;
vertical-align: middle;
}
#nav-tree a {
text-decoration:none;
padding:0px;
margin:0px;
outline:none;
}
#nav-tree .label {
margin:0px;
padding:0px;
}
#nav-tree .label a {
padding:2px;
}
#nav-tree .selected a {
text-decoration:none;
padding:2px;
margin:0px;
color:#fff;
}
#nav-tree .children_ul {
margin:0px;
padding:0px;
}
#nav-tree .item {
margin:0px;
padding:0px;
}
#nav-tree {
padding: 0px 0px;
background-color: #FAFAFF;
font-size:14px;
overflow:auto;
}
#doc-content {
overflow:auto;
display:block;
padding:0px;
margin:0px;
}
#side-nav {
padding:0 6px 0 0;
margin: 0px;
display:block;
position: absolute;
left: 0px;
width: 300px;
}
.ui-resizable .ui-resizable-handle {
display:block;
}
.ui-resizable-e {
background:url("ftv2splitbar.png") repeat scroll right center transparent;
cursor:e-resize;
height:100%;
right:0;
top:0;
width:6px;
}
.ui-resizable-handle {
display:none;
font-size:0.1px;
position:absolute;
z-index:1;
}
#nav-tree-contents {
margin: 6px 0px 0px 0px;
}
#nav-tree {
background-image:url('nav_h.png');
background-repeat:repeat-x;
background-color: #F9FAFC;
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/navtree.css | css | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 554 |
```css
/* The standard CSS for doxygen */
body, table, div, p, dl {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 13px;
line-height: 1.3;
}
/* CMSIS styles */
.style1 {
text-align: center;
}
.style2 {
color: #0000FF;
font-weight: normal;
}
.style3 {
text-align: left;
}
.style4 {
color: #008000;
}
.style5 {
color: #0000FF;
}
.style6 {
color: #000000;
font-style:italic;
}
.mand {
color: #0000FF;
}
.opt {
color: #008000;
}
.cond {
color: #990000;
}
.choice
{
background-color:#F7F9D0;
}
.seq
{
background-color:#C9DECB;
}
.group1
{
background-color:#F8F1F1;
}
.group2
{
background-color:#DCEDEA;
}
ul ul {
list-style-type: disc;
}
ul ul ul {
list-style-type: disc;
}
ul.hierarchy {
color: green;
}
em {
color: #000000;
font-style:italic;
}
/* CMSIS Tables */
table.cmtab1 {
padding: 4px;
border-collapse: collapse;
border: 1px solid #A3B4D7;
text-align: justify;
width:70%;
}
th.cmtab1 {
background: #EBEFF6;
font-weight: bold;
height: 28px;
}
td.cmtab1 {
padding:1px;
text-align: left;
}
table.cmtable {
border-collapse:collapse;
text-align: justify;
}
table.cmtable td, table.cmtable th {
border: 1px solid #2D4068;
padding: 3px 7px 2px;
}
table.cmtable th {
background-color: #EBEFF6;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
}
td.MonoTxt {
font-family:"Arial monospaced for SAP";
}
td.XML-Token
{
azimuth: 180;
font-style:italic;
color:Maroon;
z-index:20;
}
span.XML-Token
{
azimuth: 180;
font-style:italic;
color:Maroon;
z-index:20;
}
span.h2
{
font-size: 120%;
font-weight: bold;
}
div.new
{
background-color:#ccffcc; /* light green */
}
div.mod
{
background-color:#ffe6cc; /* light amber */
}
div.del
{
background-color:#ffcccc; /* light red */
}
/* @group Heading Levels */
h1 {
font-size: 150%;
}
.title {
font-size: 150%;
font-weight: bold;
margin: 10px 2px;
}
h2 {
font-size: 120%;
}
h3 {
font-size: 100%;
}
h1, h2, h3, h4, h5, h6 {
-webkit-transition: text-shadow 0.5s linear;
-moz-transition: text-shadow 0.5s linear;
-ms-transition: text-shadow 0.5s linear;
-o-transition: text-shadow 0.5s linear;
transition: text-shadow 0.5s linear;
margin-right: 15px;
}
h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
text-shadow: 0 0 15px cyan;
}
dt {
font-weight: bold;
}
div.multicol {
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
-moz-column-count: 3;
-webkit-column-count: 3;
}
p.startli, p.startdd, p.starttd {
margin-top: 2px;
}
p.endli {
margin-bottom: 0px;
}
p.enddd {
margin-bottom: 4px;
}
p.endtd {
margin-bottom: 2px;
}
/* @end */
caption {
font-weight: bold;
}
span.legend {
font-size: 70%;
text-align: center;
}
h3.version {
font-size: 90%;
text-align: center;
}
div.qindex, div.navtab{
background-color: #EBEFF6;
border: 1px solid #A2B4D8;
text-align: center;
}
div.qindex, div.navpath {
width: 100%;
line-height: 140%;
}
div.navtab {
margin-right: 15px;
}
/* @group Link Styling */
a {
color: #3A568E;
font-weight: normal;
text-decoration: none;
}
.contents a:visited {
color: #4464A5;
}
a:hover {
text-decoration: underline;
}
a.qindex {
font-weight: bold;
}
a.qindexHL {
font-weight: bold;
background-color: #9AAED5;
color: #ffffff;
border: 1px double #849CCC;
}
.contents a.qindexHL:visited {
color: #ffffff;
}
a.el {
font-weight: bold;
}
a.elRef {
}
a.code, a.code:visited {
color: #4665A2;
}
a.codeRef, a.codeRef:visited {
color: #4665A2;
}
/* @end */
dl.el {
margin-left: -1cm;
}
pre.fragment {
border: 1px solid #C4CFE5;
background-color: #FBFCFD;
padding: 4px 6px;
margin: 4px 8px 4px 2px;
overflow: auto;
word-wrap: break-word;
font-size: 9pt;
line-height: 125%;
font-family: monospace, fixed;
font-size: 105%;
}
div.fragment {
padding: 4px;
margin: 4px;
background-color: #FBFCFD;
border: 1px solid #C3CFE6;
}
div.line {
font-family: monospace, fixed;
font-size: 13px;
line-height: 1.0;
text-wrap: unrestricted;
white-space: -moz-pre-wrap; /* Moz */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */
text-indent: -53px;
padding-left: 53px;
padding-bottom: 0px;
margin: 0px;
}
span.lineno {
padding-right: 4px;
text-align: right;
border-right: 2px solid #0F0;
background-color: #E8E8E8;
white-space: pre;
}
span.lineno a {
background-color: #D8D8D8;
}
span.lineno a:hover {
background-color: #C8C8C8;
}
div.ah {
background-color: black;
font-weight: bold;
color: #ffffff;
margin-bottom: 3px;
margin-top: 3px;
padding: 0.2em;
border: solid thin #333;
border-radius: 0.5em;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
box-shadow: 2px 2px 3px #999;
-webkit-box-shadow: 2px 2px 3px #999;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
}
div.groupHeader {
margin-left: 16px;
margin-top: 12px;
font-weight: bold;
}
div.groupText {
margin-left: 16px;
font-style: italic;
}
body {
background-color: white;
color: black;
margin: 0;
}
div.contents {
margin-top: 10px;
margin-left: 12px;
margin-right: 8px;
}
td.indexkey {
background-color: #EBEFF6;
font-weight: bold;
border: 1px solid #C3CFE6;
margin: 2px 0px 2px 0;
padding: 2px 10px;
white-space: nowrap;
vertical-align: top;
}
td.indexvalue {
background-color: #EBEFF6;
border: 1px solid #C3CFE6;
padding: 2px 10px;
margin: 2px 0px;
}
tr.memlist {
background-color: #EDF1F7;
}
p.formulaDsp {
text-align: center;
}
img.formulaDsp {
}
img.formulaInl {
vertical-align: middle;
}
div.center {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
div.center img {
border: 0px;
}
address.footer {
text-align: right;
padding-right: 12px;
}
img.footer {
border: 0px;
vertical-align: middle;
}
/* @group Code Colorization */
span.keyword {
color: #008000
}
span.keywordtype {
color: #604020
}
span.keywordflow {
color: #e08000
}
span.comment {
color: #800000
}
span.preprocessor {
color: #806020
}
span.stringliteral {
color: #002080
}
span.charliteral {
color: #008080
}
span.vhdldigit {
color: #ff00ff
}
span.vhdlchar {
color: #000000
}
span.vhdlkeyword {
color: #700070
}
span.vhdllogic {
color: #ff0000
}
blockquote {
background-color: #F7F8FB;
border-left: 2px solid #9AAED5;
margin: 0 24px 0 4px;
padding: 0 12px 0 16px;
}
/* @end */
/*
.search {
color: #003399;
font-weight: bold;
}
form.search {
margin-bottom: 0px;
margin-top: 0px;
}
input.search {
font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #e8eef2;
}
*/
td.tiny {
font-size: 75%;
}
.dirtab {
padding: 4px;
border-collapse: collapse;
border: 1px solid #A2B4D8;
}
th.dirtab {
background: #EBEFF6;
font-weight: bold;
}
hr {
height: 0px;
border: none;
border-top: 1px solid #4769AD;
}
hr.footer {
height: 1px;
}
/* @group Member Descriptions */
table.memberdecls {
border-spacing: 0px;
padding: 0px;
}
.memberdecls td {
-webkit-transition-property: background-color, box-shadow;
-webkit-transition-duration: 0.5s;
-moz-transition-property: background-color, box-shadow;
-moz-transition-duration: 0.5s;
-ms-transition-property: background-color, box-shadow;
-ms-transition-duration: 0.5s;
-o-transition-property: background-color, box-shadow;
-o-transition-duration: 0.5s;
transition-property: background-color, box-shadow;
transition-duration: 0.5s;
}
.memberdecls td.glow {
background-color: cyan;
box-shadow: 0 0 15px cyan;
}
.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
background-color: #F9FAFC;
border: none;
margin: 4px;
padding: 1px 0 0 8px;
}
.mdescLeft, .mdescRight {
padding: 0px 8px 4px 8px;
color: #555;
}
.memItemLeft, .memItemRight, .memTemplParams {
border-top: 1px solid #C3CFE6;
}
.memItemLeft, .memTemplItemLeft {
white-space: nowrap;
}
.memItemRight {
width: 100%;
}
.memTemplParams {
color: #4464A5;
white-space: nowrap;
}
/* @end */
/* @group Member Details */
/* Styles for detailed member documentation */
.memtemplate {
font-size: 80%;
color: #4464A5;
font-weight: normal;
margin-left: 9px;
}
.memnav {
background-color: #EBEFF6;
border: 1px solid #A2B4D8;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
.mempage {
width: 100%;
}
.memitem {
padding: 0;
margin-bottom: 10px;
margin-right: 5px;
-webkit-transition: box-shadow 0.5s linear;
-moz-transition: box-shadow 0.5s linear;
-ms-transition: box-shadow 0.5s linear;
-o-transition: box-shadow 0.5s linear;
transition: box-shadow 0.5s linear;
}
.memitem.glow {
box-shadow: 0 0 15px cyan;
}
.memname {
font-weight: bold;
margin-left: 6px;
}
.memname td {
vertical-align: bottom;
}
.memproto, dl.reflist dt {
border-top: 1px solid #A7B8DA;
border-left: 1px solid #A7B8DA;
border-right: 1px solid #A7B8DA;
padding: 6px 0px 6px 0px;
color: #233456;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E7F3;
/* opera specific markup */
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
border-top-right-radius: 4px;
border-top-left-radius: 4px;
/* firefox specific markup */
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 4px;
/* webkit specific markup */
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
}
.memdoc, dl.reflist dd {
border-bottom: 1px solid #A7B8DA;
border-left: 1px solid #A7B8DA;
border-right: 1px solid #A7B8DA;
padding: 6px 10px 2px 10px;
background-color: #FBFCFD;
border-top-width: 0;
background-image:url('nav_g.png');
background-repeat:repeat-x;
background-color: #FFFFFF;
/* opera specific markup */
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
/* firefox specific markup */
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-bottomright: 4px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
/* webkit specific markup */
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
dl.reflist dt {
padding: 5px;
}
dl.reflist dd {
margin: 0px 0px 10px 0px;
padding: 5px;
}
.paramkey {
text-align: right;
}
.paramtype {
white-space: nowrap;
}
.paramname {
color: #602020;
white-space: nowrap;
}
.paramname em {
font-style: normal;
}
.params, .retval, .exception, .tparams {
margin-left: 0px;
padding-left: 0px;
}
.params .paramname, .retval .paramname {
font-weight: bold;
vertical-align: top;
}
.params .paramtype {
font-style: italic;
vertical-align: top;
}
.params .paramdir {
font-family: "courier new",courier,monospace;
vertical-align: top;
}
table.mlabels {
border-spacing: 0px;
}
td.mlabels-left {
width: 100%;
padding: 0px;
}
td.mlabels-right {
vertical-align: bottom;
padding: 0px;
white-space: nowrap;
}
span.mlabels {
margin-left: 8px;
}
span.mlabel {
background-color: #708CC4;
border-top:1px solid #5072B7;
border-left:1px solid #5072B7;
border-right:1px solid #C3CFE6;
border-bottom:1px solid #C3CFE6;
text-shadow: none;
color: white;
margin-right: 4px;
padding: 2px 3px;
border-radius: 3px;
font-size: 7pt;
white-space: nowrap;
}
/* @end */
/* these are for tree view when not used as main index */
div.directory {
margin: 10px 0px;
border-top: 1px solid #A8B8D9;
border-bottom: 1px solid #A8B8D9;
width: 100%;
}
.directory table {
border-collapse:collapse;
}
.directory td {
margin: 0px;
padding: 0px;
vertical-align: top;
}
.directory td.entry {
white-space: nowrap;
padding-right: 6px;
}
.directory td.entry a {
outline:none;
}
.directory td.desc {
width: 100%;
padding-left: 6px;
padding-right: 6px;
border-left: 1px solid rgba(0,0,0,0.05);
}
.directory tr.even {
padding-left: 6px;
background-color: #F7F8FB;
}
.directory img {
vertical-align: -30%;
}
.directory .levels {
white-space: nowrap;
width: 100%;
text-align: right;
font-size: 9pt;
}
.directory .levels span {
cursor: pointer;
padding-left: 2px;
padding-right: 2px;
color: #3A568E;
}
div.dynheader {
margin-top: 8px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
address {
font-style: normal;
color: #293C63;
}
table.doxtable {
border-collapse:collapse;
margin-top: 4px;
margin-bottom: 4px;
}
table.doxtable td, table.doxtable th {
border: 1px solid #2B4069;
padding: 3px 7px 2px;
}
table.doxtable th {
background-color: #EBEFF6;
color: #000000;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
}
table.fieldtable {
width: 100%;
margin-bottom: 10px;
border: 1px solid #A7B8DA;
border-spacing: 0px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}
.fieldtable td, .fieldtable th {
padding: 3px 7px 2px;
}
.fieldtable td.fieldtype, .fieldtable td.fieldname {
white-space: nowrap;
border-right: 1px solid #A7B8DA;
border-bottom: 1px solid #A7B8DA;
vertical-align: top;
}
.fieldtable td.fielddoc {
border-bottom: 1px solid #A7B8DA;
width: 100%;
}
.fieldtable tr:last-child td {
border-bottom: none;
}
.fieldtable th {
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E7F3;
font-size: 90%;
color: #233456;
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom: 1px solid #A7B8DA;
}
.tabsearch {
top: 0px;
left: 10px;
height: 36px;
background-image: url('tab_b.png');
z-index: 101;
overflow: hidden;
font-size: 13px;
}
.navpath ul
{
font-size: 11px;
background-image:url('tab_b.png');
background-repeat:repeat-x;
height:30px;
line-height:30px;
color:#889FCE;
border:solid 1px #C1CDE5;
overflow:hidden;
margin:0px;
padding:0px;
}
.navpath li
{
list-style-type:none;
float:left;
padding-left:10px;
padding-right:15px;
background-image:url('bc_s.png');
background-repeat:no-repeat;
background-position:right;
color:#344D7E;
}
.navpath li.navelem a
{
height:32px;
display:block;
text-decoration: none;
outline: none;
}
.navpath li.navelem a:hover
{
color:#6583BF;
}
.navpath li.footer
{
list-style-type:none;
float:right;
padding-left:10px;
padding-right:15px;
background-image:none;
background-repeat:no-repeat;
background-position:right;
color:#344D7E;
font-size: 8pt;
}
div.summary
{
float: right;
font-size: 8pt;
padding-right: 5px;
width: 50%;
text-align: right;
}
div.summary a
{
white-space: nowrap;
}
div.ingroups
{
margin-left: 5px;
font-size: 8pt;
padding-left: 5px;
width: 50%;
text-align: left;
}
div.ingroups a
{
white-space: nowrap;
}
div.header
{
background-image:url('nav_h.png');
background-repeat:repeat-x;
background-color: #F9FAFC;
margin: 0px;
border-bottom: 1px solid #C3CFE6;
}
div.headertitle
{
padding: 5px 5px 5px 7px;
}
dl
{
padding: 0 0 0 10px;
}
/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
dl.section
{
margin-left: 0px;
padding-left: 0px;
}
dl.note
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #D0C000;
}
dl.warning, dl.attention
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #FF0000;
}
dl.pre, dl.post, dl.invariant
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #00D000;
}
dl.deprecated
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #505050;
}
dl.todo
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #00C0E0;
}
dl.test
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #3030E0;
}
dl.bug
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #C08050;
}
dl.section dd {
margin-bottom: 6px;
}
#projectlogo
{
text-align: center;
vertical-align: bottom;
border-collapse: separate;
}
#projectlogo img
{
border: 0px none;
}
#projectname
{
font: 300% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 2px 0px;
}
#projectbrief
{
font: 120% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#projectnumber
{
font: 50% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#titlearea
{
padding: 0px;
margin: 0px;
width: 100%;
border-bottom: 1px solid #5072B7;
}
.image
{
text-align: left;
}
.dotgraph
{
text-align: center;
}
.mscgraph
{
text-align: center;
}
.caption
{
font-weight: bold;
}
div.zoom
{
border: 1px solid #8EA4D0;
}
dl.citelist {
margin-bottom:50px;
}
dl.citelist dt {
color:#314877;
float:left;
font-weight:bold;
margin-right:10px;
padding:5px;
}
dl.citelist dd {
margin:2px 0;
padding:5px 0;
}
div.toc {
padding: 14px 25px;
background-color: #F4F6FA;
border: 1px solid #D7DFEE;
border-radius: 7px 7px 7px 7px;
float: right;
height: auto;
margin: 0 20px 10px 10px;
width: 200px;
}
div.toc li {
background: url("bdwn.png") no-repeat scroll 0 5px transparent;
font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
margin-top: 5px;
padding-left: 10px;
padding-top: 2px;
}
div.toc h3 {
font: bold 12px/1.2 Arial,FreeSans,sans-serif;
color: #4464A5;
border-bottom: 0 none;
margin: 0;
}
div.toc ul {
list-style: none outside none;
border: medium none;
padding: 0px;
}
div.toc li.level1 {
margin-left: 0px;
}
div.toc li.level2 {
margin-left: 15px;
}
div.toc li.level3 {
margin-left: 30px;
}
div.toc li.level4 {
margin-left: 45px;
}
.inherit_header {
font-weight: bold;
color: gray;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.inherit_header td {
padding: 6px 0px 2px 5px;
}
.inherit {
display: none;
}
tr.heading h2 {
margin-top: 12px;
margin-bottom: 4px;
}
@media print
{
#top { display: none; }
#side-nav { display: none; }
#nav-path { display: none; }
body { overflow:visible; }
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
.summary { display: none; }
.memitem { page-break-inside: avoid; }
#doc-content
{
margin-left:0 !important;
height:auto !important;
width:auto !important;
overflow:inherit;
display:inline;
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/cmsis.css | css | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 6,513 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<title>Redirect to the corresponding CMSIS-NN page after 0 seconds</title>
<meta http-equiv="refresh" content="0; URL=path_to_url">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If the automatic redirection is failing, click <a href="path_to_url">here</a> or try to find corresponding topic described in <a href="path_to_url">CMSIS-NN resources</a>.
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/arm__elementwise__mul__s8_8c.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 132 |
```css
/* The standard CSS for doxygen 1.8.6 */
body, table, div, p, dl {
font: 400 14px/22px Roboto,sans-serif;
}
/* @group Heading Levels */
h1.groupheader {
font-size: 150%;
}
.title {
font: 400 14px/28px Roboto,sans-serif;
font-size: 150%;
font-weight: bold;
margin: 10px 2px;
}
h2.groupheader {
border-bottom: 1px solid #879ECB;
color: #354C7B;
font-size: 150%;
font-weight: normal;
margin-top: 1.75em;
padding-top: 8px;
padding-bottom: 4px;
width: 100%;
}
h3.groupheader {
font-size: 100%;
}
h1, h2, h3, h4, h5, h6 {
-webkit-transition: text-shadow 0.5s linear;
-moz-transition: text-shadow 0.5s linear;
-ms-transition: text-shadow 0.5s linear;
-o-transition: text-shadow 0.5s linear;
transition: text-shadow 0.5s linear;
margin-right: 15px;
}
h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
text-shadow: 0 0 15px cyan;
}
dt {
font-weight: bold;
}
div.multicol {
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
-moz-column-count: 3;
-webkit-column-count: 3;
}
p.startli, p.startdd {
margin-top: 2px;
}
p.starttd {
margin-top: 0px;
}
p.endli {
margin-bottom: 0px;
}
p.enddd {
margin-bottom: 4px;
}
p.endtd {
margin-bottom: 2px;
}
/* @end */
caption {
font-weight: bold;
}
span.legend {
font-size: 70%;
text-align: center;
}
h3.version {
font-size: 90%;
text-align: center;
}
div.qindex, div.navtab{
background-color: #EBEFF6;
border: 1px solid #A3B4D7;
text-align: center;
}
div.qindex, div.navpath {
width: 100%;
line-height: 140%;
}
div.navtab {
margin-right: 15px;
}
/* @group Link Styling */
a {
color: #3D578C;
font-weight: normal;
text-decoration: none;
}
.contents a:visited {
color: #4665A2;
}
a:hover {
text-decoration: underline;
}
a.qindex {
font-weight: bold;
}
a.qindexHL {
font-weight: bold;
background-color: #9CAFD4;
color: #ffffff;
border: 1px double #869DCA;
}
.contents a.qindexHL:visited {
color: #ffffff;
}
a.el {
font-weight: bold;
}
a.elRef {
}
a.code, a.code:visited, a.line, a.line:visited {
color: #4665A2;
}
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
color: #4665A2;
}
/* @end */
dl.el {
margin-left: -1cm;
}
pre.fragment {
border: 1px solid #C4CFE5;
background-color: #FBFCFD;
padding: 4px 6px;
margin: 4px 8px 4px 2px;
overflow: auto;
word-wrap: break-word;
font-size: 9pt;
line-height: 125%;
font-family: monospace, fixed;
font-size: 105%;
}
div.fragment {
padding: 4px 6px;
margin: 4px 8px 4px 2px;
background-color: #FBFCFD;
border: 1px solid #C4CFE5;
}
div.line {
font-family: monospace, fixed;
font-size: 13px;
min-height: 13px;
line-height: 1.0;
text-wrap: unrestricted;
white-space: -moz-pre-wrap; /* Moz */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */
text-indent: -53px;
padding-left: 53px;
padding-bottom: 0px;
margin: 0px;
-webkit-transition-property: background-color, box-shadow;
-webkit-transition-duration: 0.5s;
-moz-transition-property: background-color, box-shadow;
-moz-transition-duration: 0.5s;
-ms-transition-property: background-color, box-shadow;
-ms-transition-duration: 0.5s;
-o-transition-property: background-color, box-shadow;
-o-transition-duration: 0.5s;
transition-property: background-color, box-shadow;
transition-duration: 0.5s;
}
div.line.glow {
background-color: cyan;
box-shadow: 0 0 10px cyan;
}
span.lineno {
padding-right: 4px;
text-align: right;
border-right: 2px solid #0F0;
background-color: #E8E8E8;
white-space: pre;
}
span.lineno a {
background-color: #D8D8D8;
}
span.lineno a:hover {
background-color: #C8C8C8;
}
div.ah {
background-color: black;
font-weight: bold;
color: #ffffff;
margin-bottom: 3px;
margin-top: 3px;
padding: 0.2em;
border: solid thin #333;
border-radius: 0.5em;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
box-shadow: 2px 2px 3px #999;
-webkit-box-shadow: 2px 2px 3px #999;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
}
div.groupHeader {
margin-left: 16px;
margin-top: 12px;
font-weight: bold;
}
div.groupText {
margin-left: 16px;
font-style: italic;
}
body {
background-color: white;
color: black;
margin: 0;
}
div.contents {
margin-top: 10px;
margin-left: 12px;
margin-right: 8px;
}
td.indexkey {
background-color: #EBEFF6;
font-weight: bold;
border: 1px solid #C4CFE5;
margin: 2px 0px 2px 0;
padding: 2px 10px;
white-space: nowrap;
vertical-align: top;
}
td.indexvalue {
background-color: #EBEFF6;
border: 1px solid #C4CFE5;
padding: 2px 10px;
margin: 2px 0px;
}
tr.memlist {
background-color: #EEF1F7;
}
p.formulaDsp {
text-align: center;
}
img.formulaDsp {
}
img.formulaInl {
vertical-align: middle;
}
div.center {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
div.center img {
border: 0px;
}
address.footer {
text-align: right;
padding-right: 12px;
}
img.footer {
border: 0px;
vertical-align: middle;
}
/* @group Code Colorization */
span.keyword {
color: #008000
}
span.keywordtype {
color: #604020
}
span.keywordflow {
color: #e08000
}
span.comment {
color: #800000
}
span.preprocessor {
color: #806020
}
span.stringliteral {
color: #002080
}
span.charliteral {
color: #008080
}
span.vhdldigit {
color: #ff00ff
}
span.vhdlchar {
color: #000000
}
span.vhdlkeyword {
color: #700070
}
span.vhdllogic {
color: #ff0000
}
blockquote {
background-color: #F7F8FB;
border-left: 2px solid #9CAFD4;
margin: 0 24px 0 4px;
padding: 0 12px 0 16px;
}
/* @end */
/*
.search {
color: #003399;
font-weight: bold;
}
form.search {
margin-bottom: 0px;
margin-top: 0px;
}
input.search {
font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #e8eef2;
}
*/
td.tiny {
font-size: 75%;
}
.dirtab {
padding: 4px;
border-collapse: collapse;
border: 1px solid #A3B4D7;
}
th.dirtab {
background: #EBEFF6;
font-weight: bold;
}
hr {
height: 0px;
border: none;
border-top: 1px solid #4A6AAA;
}
hr.footer {
height: 1px;
}
/* @group Member Descriptions */
table.memberdecls {
border-spacing: 0px;
padding: 0px;
}
.memberdecls td, .fieldtable tr {
-webkit-transition-property: background-color, box-shadow;
-webkit-transition-duration: 0.5s;
-moz-transition-property: background-color, box-shadow;
-moz-transition-duration: 0.5s;
-ms-transition-property: background-color, box-shadow;
-ms-transition-duration: 0.5s;
-o-transition-property: background-color, box-shadow;
-o-transition-duration: 0.5s;
transition-property: background-color, box-shadow;
transition-duration: 0.5s;
}
.memberdecls td.glow, .fieldtable tr.glow {
background-color: cyan;
box-shadow: 0 0 15px cyan;
}
.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
background-color: #F9FAFC;
border: none;
margin: 4px;
padding: 1px 0 0 8px;
}
.mdescLeft, .mdescRight {
padding: 0px 8px 4px 8px;
color: #555;
}
.memSeparator {
border-bottom: 1px solid #DEE4F0;
line-height: 1px;
margin: 0px;
padding: 0px;
}
.memItemLeft, .memTemplItemLeft {
white-space: nowrap;
}
.memItemRight {
width: 100%;
}
.memTemplParams {
color: #4665A2;
white-space: nowrap;
font-size: 80%;
}
/* @end */
/* @group Member Details */
/* Styles for detailed member documentation */
.memtemplate {
font-size: 80%;
color: #4665A2;
font-weight: normal;
margin-left: 9px;
}
.memnav {
background-color: #EBEFF6;
border: 1px solid #A3B4D7;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
.mempage {
width: 100%;
}
.memitem {
padding: 0;
margin-bottom: 10px;
margin-right: 5px;
-webkit-transition: box-shadow 0.5s linear;
-moz-transition: box-shadow 0.5s linear;
-ms-transition: box-shadow 0.5s linear;
-o-transition: box-shadow 0.5s linear;
transition: box-shadow 0.5s linear;
display: table !important;
width: 100%;
}
.memitem.glow {
box-shadow: 0 0 15px cyan;
}
.memname {
font-weight: bold;
margin-left: 6px;
}
.memname td {
vertical-align: bottom;
}
.memproto, dl.reflist dt {
border-top: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
border-right: 1px solid #A8B8D9;
padding: 6px 0px 6px 0px;
color: #253555;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E8F2;
/* opera specific markup */
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
border-top-right-radius: 4px;
border-top-left-radius: 4px;
/* firefox specific markup */
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 4px;
/* webkit specific markup */
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
}
.memdoc, dl.reflist dd {
border-bottom: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
border-right: 1px solid #A8B8D9;
padding: 6px 10px 2px 10px;
background-color: #FBFCFD;
border-top-width: 0;
background-image:url('nav_g.png');
background-repeat:repeat-x;
background-color: #FFFFFF;
/* opera specific markup */
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
/* firefox specific markup */
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-bottomright: 4px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
/* webkit specific markup */
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
dl.reflist dt {
padding: 5px;
}
dl.reflist dd {
margin: 0px 0px 10px 0px;
padding: 5px;
}
.paramkey {
text-align: right;
}
.paramtype {
white-space: nowrap;
}
.paramname {
color: #602020;
white-space: nowrap;
}
.paramname em {
font-style: normal;
}
.paramname code {
line-height: 14px;
}
.params, .retval, .exception, .tparams {
margin-left: 0px;
padding-left: 0px;
}
.params .paramname, .retval .paramname {
font-weight: bold;
vertical-align: top;
}
.params .paramtype {
font-style: italic;
vertical-align: top;
}
.params .paramdir {
font-family: "courier new",courier,monospace;
vertical-align: top;
}
table.mlabels {
border-spacing: 0px;
}
td.mlabels-left {
width: 100%;
padding: 0px;
}
td.mlabels-right {
vertical-align: bottom;
padding: 0px;
white-space: nowrap;
}
span.mlabels {
margin-left: 8px;
}
span.mlabel {
background-color: #728DC1;
border-top:1px solid #5373B4;
border-left:1px solid #5373B4;
border-right:1px solid #C4CFE5;
border-bottom:1px solid #C4CFE5;
text-shadow: none;
color: white;
margin-right: 4px;
padding: 2px 3px;
border-radius: 3px;
font-size: 7pt;
white-space: nowrap;
vertical-align: middle;
}
/* @end */
/* these are for tree view when not used as main index */
div.directory {
margin: 10px 0px;
border-top: 1px solid #A8B8D9;
border-bottom: 1px solid #A8B8D9;
width: 100%;
}
.directory table {
border-collapse:collapse;
}
.directory td {
margin: 0px;
padding: 0px;
vertical-align: top;
}
.directory td.entry {
white-space: nowrap;
padding-right: 6px;
padding-top: 3px;
}
.directory td.entry a {
outline:none;
}
.directory td.entry a img {
border: none;
}
.directory td.desc {
width: 100%;
padding-left: 6px;
padding-right: 6px;
padding-top: 3px;
border-left: 1px solid rgba(0,0,0,0.05);
}
.directory tr.even {
padding-left: 6px;
background-color: #F7F8FB;
}
.directory img {
vertical-align: -30%;
}
.directory .levels {
white-space: nowrap;
width: 100%;
text-align: right;
font-size: 9pt;
}
.directory .levels span {
cursor: pointer;
padding-left: 2px;
padding-right: 2px;
color: #3D578C;
}
div.dynheader {
margin-top: 8px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
address {
font-style: normal;
color: #2A3D61;
}
table.doxtable {
border-collapse:collapse;
margin-top: 4px;
margin-bottom: 4px;
}
table.doxtable td, table.doxtable th {
border: 1px solid #2D4068;
padding: 3px 7px 2px;
}
table.doxtable th {
background-color: #374F7F;
color: #FFFFFF;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
}
table.fieldtable {
/*width: 100%;*/
margin-bottom: 10px;
border: 1px solid #A8B8D9;
border-spacing: 0px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}
.fieldtable td, .fieldtable th {
padding: 3px 7px 2px;
}
.fieldtable td.fieldtype, .fieldtable td.fieldname {
white-space: nowrap;
border-right: 1px solid #A8B8D9;
border-bottom: 1px solid #A8B8D9;
vertical-align: top;
}
.fieldtable td.fieldname {
padding-top: 3px;
}
.fieldtable td.fielddoc {
border-bottom: 1px solid #A8B8D9;
/*width: 100%;*/
}
.fieldtable td.fielddoc p:first-child {
margin-top: 0px;
}
.fieldtable td.fielddoc p:last-child {
margin-bottom: 2px;
}
.fieldtable tr:last-child td {
border-bottom: none;
}
.fieldtable th {
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E8F2;
font-size: 90%;
color: #253555;
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom: 1px solid #A8B8D9;
}
.tabsearch {
top: 0px;
left: 10px;
height: 36px;
background-image: url('tab_b.png');
z-index: 101;
overflow: hidden;
font-size: 13px;
}
.navpath ul
{
font-size: 11px;
background-image:url('tab_b.png');
background-repeat:repeat-x;
background-position: 0 -5px;
height:30px;
line-height:30px;
color:#8AA0CC;
border:solid 1px #C2CDE4;
overflow:hidden;
margin:0px;
padding:0px;
}
.navpath li
{
list-style-type:none;
float:left;
padding-left:10px;
padding-right:15px;
background-image:url('bc_s.png');
background-repeat:no-repeat;
background-position:right;
color:#364D7C;
}
.navpath li.navelem a
{
height:32px;
display:block;
text-decoration: none;
outline: none;
color: #283A5D;
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
text-decoration: none;
}
.navpath li.navelem a:hover
{
color:#6884BD;
}
.navpath li.footer
{
list-style-type:none;
float:right;
padding-left:10px;
padding-right:15px;
background-image:none;
background-repeat:no-repeat;
background-position:right;
color:#364D7C;
font-size: 8pt;
}
div.summary
{
float: right;
font-size: 8pt;
padding-right: 5px;
width: 50%;
text-align: right;
}
div.summary a
{
white-space: nowrap;
}
div.ingroups
{
font-size: 8pt;
width: 50%;
text-align: left;
}
div.ingroups a
{
white-space: nowrap;
}
div.header
{
background-image:url('nav_h.png');
background-repeat:repeat-x;
background-color: #F9FAFC;
margin: 0px;
border-bottom: 1px solid #C4CFE5;
}
div.headertitle
{
padding: 5px 5px 5px 10px;
}
dl
{
padding: 0 0 0 10px;
}
/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
dl.section
{
margin-left: 0px;
padding-left: 0px;
}
dl.note
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #D0C000;
}
dl.warning, dl.attention
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #FF0000;
}
dl.pre, dl.post, dl.invariant
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #00D000;
}
dl.deprecated
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #505050;
}
dl.todo
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #00C0E0;
}
dl.test
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #3030E0;
}
dl.bug
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #C08050;
}
dl.section dd {
margin-bottom: 6px;
}
#projectlogo
{
text-align: center;
vertical-align: bottom;
border-collapse: separate;
}
#projectlogo img
{
border: 0px none;
}
#projectname
{
font: 300% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 2px 0px;
}
#projectbrief
{
font: 120% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#projectnumber
{
font: 50% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#titlearea
{
padding: 0px;
margin: 0px;
width: 100%;
border-bottom: 1px solid #5373B4;
}
.image
{
text-align: center;
}
.dotgraph
{
text-align: center;
}
.mscgraph
{
text-align: center;
}
.diagraph
{
text-align: center;
}
.caption
{
font-weight: bold;
}
div.zoom
{
border: 1px solid #90A5CE;
}
dl.citelist {
margin-bottom:50px;
}
dl.citelist dt {
color:#334975;
float:left;
font-weight:bold;
margin-right:10px;
padding:5px;
}
dl.citelist dd {
margin:2px 0;
padding:5px 0;
}
div.toc {
padding: 14px 25px;
background-color: #F4F6FA;
border: 1px solid #D8DFEE;
border-radius: 7px 7px 7px 7px;
float: right;
height: auto;
margin: 0 20px 10px 10px;
width: 200px;
}
div.toc li {
background: url("bdwn.png") no-repeat scroll 0 5px transparent;
font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
margin-top: 5px;
padding-left: 10px;
padding-top: 2px;
}
div.toc h3 {
font: bold 12px/1.2 Arial,FreeSans,sans-serif;
color: #4665A2;
border-bottom: 0 none;
margin: 0;
}
div.toc ul {
list-style: none outside none;
border: medium none;
padding: 0px;
}
div.toc li.level1 {
margin-left: 0px;
}
div.toc li.level2 {
margin-left: 15px;
}
div.toc li.level3 {
margin-left: 30px;
}
div.toc li.level4 {
margin-left: 45px;
}
.inherit_header {
font-weight: bold;
color: gray;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.inherit_header td {
padding: 6px 0px 2px 5px;
}
.inherit {
display: none;
}
tr.heading h2 {
margin-top: 12px;
margin-bottom: 4px;
}
/* tooltip related style info */
.ttc {
position: absolute;
display: none;
}
#powerTip {
cursor: default;
white-space: nowrap;
background-color: white;
border: 1px solid gray;
border-radius: 4px 4px 4px 4px;
box-shadow: 1px 1px 7px gray;
display: none;
font-size: smaller;
max-width: 80%;
opacity: 0.9;
padding: 1ex 1em 1em;
position: absolute;
z-index: 2147483647;
}
#powerTip div.ttdoc {
color: grey;
font-style: italic;
}
#powerTip div.ttname a {
font-weight: bold;
}
#powerTip div.ttname {
font-weight: bold;
}
#powerTip div.ttdeci {
color: #006318;
}
#powerTip div {
margin: 0px;
padding: 0px;
font: 12px/16px Roboto,sans-serif;
}
#powerTip:before, #powerTip:after {
content: "";
position: absolute;
margin: 0px;
}
#powerTip.n:after, #powerTip.n:before,
#powerTip.s:after, #powerTip.s:before,
#powerTip.w:after, #powerTip.w:before,
#powerTip.e:after, #powerTip.e:before,
#powerTip.ne:after, #powerTip.ne:before,
#powerTip.se:after, #powerTip.se:before,
#powerTip.nw:after, #powerTip.nw:before,
#powerTip.sw:after, #powerTip.sw:before {
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
}
#powerTip.n:after, #powerTip.s:after,
#powerTip.w:after, #powerTip.e:after,
#powerTip.nw:after, #powerTip.ne:after,
#powerTip.sw:after, #powerTip.se:after {
border-color: rgba(255, 255, 255, 0);
}
#powerTip.n:before, #powerTip.s:before,
#powerTip.w:before, #powerTip.e:before,
#powerTip.nw:before, #powerTip.ne:before,
#powerTip.sw:before, #powerTip.se:before {
border-color: rgba(128, 128, 128, 0);
}
#powerTip.n:after, #powerTip.n:before,
#powerTip.ne:after, #powerTip.ne:before,
#powerTip.nw:after, #powerTip.nw:before {
top: 100%;
}
#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
border-top-color: #ffffff;
border-width: 10px;
margin: 0px -10px;
}
#powerTip.n:before {
border-top-color: #808080;
border-width: 11px;
margin: 0px -11px;
}
#powerTip.n:after, #powerTip.n:before {
left: 50%;
}
#powerTip.nw:after, #powerTip.nw:before {
right: 14px;
}
#powerTip.ne:after, #powerTip.ne:before {
left: 14px;
}
#powerTip.s:after, #powerTip.s:before,
#powerTip.se:after, #powerTip.se:before,
#powerTip.sw:after, #powerTip.sw:before {
bottom: 100%;
}
#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
border-bottom-color: #ffffff;
border-width: 10px;
margin: 0px -10px;
}
#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
border-bottom-color: #808080;
border-width: 11px;
margin: 0px -11px;
}
#powerTip.s:after, #powerTip.s:before {
left: 50%;
}
#powerTip.sw:after, #powerTip.sw:before {
right: 14px;
}
#powerTip.se:after, #powerTip.se:before {
left: 14px;
}
#powerTip.e:after, #powerTip.e:before {
left: 100%;
}
#powerTip.e:after {
border-left-color: #ffffff;
border-width: 10px;
top: 50%;
margin-top: -10px;
}
#powerTip.e:before {
border-left-color: #808080;
border-width: 11px;
top: 50%;
margin-top: -11px;
}
#powerTip.w:after, #powerTip.w:before {
right: 100%;
}
#powerTip.w:after {
border-right-color: #ffffff;
border-width: 10px;
top: 50%;
margin-top: -10px;
}
#powerTip.w:before {
border-right-color: #808080;
border-width: 11px;
top: 50%;
margin-top: -11px;
}
@media print
{
#top { display: none; }
#side-nav { display: none; }
#nav-path { display: none; }
body { overflow:visible; }
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
.summary { display: none; }
.memitem { page-break-inside: avoid; }
#doc-content
{
margin-left:0 !important;
height:auto !important;
width:auto !important;
overflow:inherit;
display:inline;
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/doxygen.css | css | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 7,528 |
```javascript
var structcmsis__nn__tile =
[
[ "h", "structcmsis__nn__tile.html#a13c54be71aa552c2bc76d12032a3d092", null ],
[ "w", "structcmsis__nn__tile.html#a9f99b4e1164c76f4ed6b32648d454283", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__tile.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 86 |
```javascript
var structcmsis__nn__dw__conv__params =
[
[ "activation", "structcmsis__nn__dw__conv__params.html#a88d6144a8af12904ac92b82aee2d6695", null ],
[ "ch_mult", "structcmsis__nn__dw__conv__params.html#aa613968e07c396755c2a6def8ecded79", null ],
[ "dilation", "structcmsis__nn__dw__conv__params.html#aa2e4f79bfb4788293f3b2cb5cf521ad5", null ],
[ "input_offset", "structcmsis__nn__dw__conv__params.html#aab0b7c6b993dc249651b77c675c7a9b4", null ],
[ "output_offset", "structcmsis__nn__dw__conv__params.html#a6058fcacc55ccf2f3e7049abcd26a7b2", null ],
[ "padding", "structcmsis__nn__dw__conv__params.html#a26ce1b5e6d00c24781628288e7cf286a", null ],
[ "stride", "structcmsis__nn__dw__conv__params.html#ad0553c750d65a8501fb086c7a662bc41", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__dw__conv__params.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 305 |
```javascript
var structcmsis__nn__per__tensor__quant__params =
[
[ "multiplier", "structcmsis__nn__per__tensor__quant__params.html#a4edb6cf363e3d30ad7e5166275629548", null ],
[ "shift", "structcmsis__nn__per__tensor__quant__params.html#a944f9c7b4f01355406b0a2ec9d578b87", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__per__tensor__quant__params.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 105 |
```javascript
var structcmsis__nn__pool__params =
[
[ "activation", "structcmsis__nn__pool__params.html#a5d98c2ed7ab19a021a07175764e95a26", null ],
[ "padding", "structcmsis__nn__pool__params.html#aba41d8fba7aca6871e7a67f0e6c63346", null ],
[ "stride", "structcmsis__nn__pool__params.html#a64a4ccb624b7c12ca3e9f3532da58b3a", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__pool__params.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 135 |
```javascript
var structcmsis__nn__svdf__params =
[
[ "input_activation", "structcmsis__nn__svdf__params.html#af9bee3ba507e5226a264097a6a6e78ed", null ],
[ "input_offset", "structcmsis__nn__svdf__params.html#a4afe1cfeca461ebb42dab876e3b5c31e", null ],
[ "output_activation", "structcmsis__nn__svdf__params.html#aab0d36ffecc3ccc296e3dd6149c8f37b", null ],
[ "output_offset", "structcmsis__nn__svdf__params.html#a62b484efb24bae6a05be502a18168257", null ],
[ "rank", "structcmsis__nn__svdf__params.html#a2334fd8228d3989dc34abd2bc36ca032", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__svdf__params.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 212 |
```javascript
var NAVTREE =
[
[ "CMSIS-NN", "index.html" ]
];
var NAVTREEINDEX =
[
"ChangeLog_pg.html"
];
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var navTreeSubIndices = new Array();
function getData(varName)
{
var i = varName.lastIndexOf('/');
var n = i>=0 ? varName.substring(i+1) : varName;
return eval(n.replace(/\-/g,'_'));
}
function stripPath(uri)
{
return uri.substring(uri.lastIndexOf('/')+1);
}
function stripPath2(uri)
{
var i = uri.lastIndexOf('/');
var s = uri.substring(i+1);
var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
return m ? uri.substring(i-6) : s;
}
function localStorageSupported()
{
try {
return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
}
catch(e) {
return false;
}
}
function storeLink(link)
{
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
window.localStorage.setItem('navpath',link);
}
}
function deleteLink()
{
if (localStorageSupported()) {
window.localStorage.setItem('navpath','');
}
}
function cachedLink()
{
if (localStorageSupported()) {
return window.localStorage.getItem('navpath');
} else {
return '';
}
}
function getScript(scriptName,func,show)
{
var head = document.getElementsByTagName("head")[0];
var script = document.createElement('script');
script.id = scriptName;
script.type = 'text/javascript';
script.onload = func;
script.src = scriptName+'.js';
if ($.browser.msie && $.browser.version<=8) {
// script.onload does not work with older versions of IE
script.onreadystatechange = function() {
if (script.readyState=='complete' || script.readyState=='loaded') {
func(); if (show) showRoot();
}
}
}
head.appendChild(script);
}
function createIndent(o,domNode,node,level)
{
var level=-1;
var n = node;
while (n.parentNode) { level++; n=n.parentNode; }
if (node.childrenData) {
var imgNode = document.createElement("img");
imgNode.style.paddingLeft=(16*level).toString()+'px';
imgNode.width = 16;
imgNode.height = 22;
imgNode.border = 0;
node.plus_img = imgNode;
node.expandToggle = document.createElement("a");
node.expandToggle.href = "javascript:void(0)";
node.expandToggle.onclick = function() {
if (node.expanded) {
$(node.getChildrenUL()).slideUp("fast");
node.plus_img.src = node.relpath+"ftv2pnode.png";
node.expanded = false;
} else {
expandNode(o, node, false, false);
}
}
node.expandToggle.appendChild(imgNode);
domNode.appendChild(node.expandToggle);
imgNode.src = node.relpath+"ftv2pnode.png";
} else {
var span = document.createElement("span");
span.style.display = 'inline-block';
span.style.width = 16*(level+1)+'px';
span.style.height = '22px';
span.innerHTML = ' ';
domNode.appendChild(span);
}
}
var animationInProgress = false;
function gotoAnchor(anchor,aname,updateLocation)
{
var pos, docContent = $('#doc-content');
if (anchor.parent().attr('class')=='memItemLeft' ||
anchor.parent().attr('class')=='fieldtype' ||
anchor.parent().is(':header'))
{
pos = anchor.parent().position().top;
} else if (anchor.position()) {
pos = anchor.position().top;
}
if (pos) {
var dist = Math.abs(Math.min(
pos-docContent.offset().top,
docContent[0].scrollHeight-
docContent.height()-docContent.scrollTop()));
animationInProgress=true;
docContent.animate({
scrollTop: pos + docContent.scrollTop() - docContent.offset().top
},Math.max(50,Math.min(500,dist)),function(){
if (updateLocation) window.location.href=aname;
animationInProgress=false;
});
}
}
function newNode(o, po, text, link, childrenData, lastNode)
{
var node = new Object();
node.children = Array();
node.childrenData = childrenData;
node.depth = po.depth + 1;
node.relpath = po.relpath;
node.isLast = lastNode;
node.li = document.createElement("li");
po.getChildrenUL().appendChild(node.li);
node.parentNode = po;
node.itemDiv = document.createElement("div");
node.itemDiv.className = "item";
node.labelSpan = document.createElement("span");
node.labelSpan.className = "label";
createIndent(o,node.itemDiv,node,0);
node.itemDiv.appendChild(node.labelSpan);
node.li.appendChild(node.itemDiv);
var a = document.createElement("a");
node.labelSpan.appendChild(a);
node.label = document.createTextNode(text);
node.expanded = false;
a.appendChild(node.label);
if (link) {
var url;
if (link.substring(0,1)=='^') {
url = link.substring(1);
link = url;
} else {
url = node.relpath+link;
}
a.className = stripPath(link.replace('#',':'));
if (link.indexOf('#')!=-1) {
var aname = '#'+link.split('#')[1];
var srcPage = stripPath($(location).attr('pathname'));
var targetPage = stripPath(link.split('#')[0]);
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
a.onclick = function(){
storeLink(link);
if (!$(a).parent().parent().hasClass('selected'))
{
$('.item').removeClass('selected');
$('.item').removeAttr('id');
$(a).parent().parent().addClass('selected');
$(a).parent().parent().attr('id','selected');
}
var anchor = $(aname);
gotoAnchor(anchor,aname,true);
};
} else {
a.href = url;
a.onclick = function() { storeLink(link); }
}
} else {
if (childrenData != null)
{
a.className = "nolink";
a.href = "javascript:void(0)";
a.onclick = node.expandToggle.onclick;
}
}
node.childrenUL = null;
node.getChildrenUL = function() {
if (!node.childrenUL) {
node.childrenUL = document.createElement("ul");
node.childrenUL.className = "children_ul";
node.childrenUL.style.display = "none";
node.li.appendChild(node.childrenUL);
}
return node.childrenUL;
};
return node;
}
function showRoot()
{
var headerHeight = $("#top").height();
var footerHeight = $("#nav-path").height();
var windowHeight = $(window).height() - headerHeight - footerHeight;
(function (){ // retry until we can scroll to the selected item
try {
var navtree=$('#nav-tree');
navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
} catch (err) {
setTimeout(arguments.callee, 0);
}
})();
}
function expandNode(o, node, imm, showRoot)
{
if (node.childrenData && !node.expanded) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
expandNode(o, node, imm, showRoot);
}, showRoot);
} else {
if (!node.childrenVisited) {
getNode(o, node);
} if (imm || ($.browser.msie && $.browser.version>8)) {
// somehow slideDown jumps to the start of tree for IE9 :-(
$(node.getChildrenUL()).show();
} else {
$(node.getChildrenUL()).slideDown("fast");
}
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
}
}
}
function glowEffect(n,duration)
{
n.addClass('glow').delay(duration).queue(function(next){
$(this).removeClass('glow');next();
});
}
function highlightAnchor()
{
var aname = $(location).attr('hash');
var anchor = $(aname);
if (anchor.parent().attr('class')=='memItemLeft'){
var rows = $('.memberdecls tr[class$="'+
window.location.hash.substring(1)+'"]');
glowEffect(rows.children(),300); // member without details
} else if (anchor.parents().slice(2).prop('tagName')=='TR') {
glowEffect(anchor.parents('div.memitem'),1000); // enum value
} else if (anchor.parent().attr('class')=='fieldtype'){
glowEffect(anchor.parent().parent(),1000); // struct field
} else if (anchor.parent().is(":header")) {
glowEffect(anchor.parent(),1000); // section header
} else {
glowEffect(anchor.next(),1000); // normal member
}
gotoAnchor(anchor,aname,false);
}
function selectAndHighlight(hash,n)
{
var a;
if (hash) {
var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);
a=$('.item a[class$="'+link+'"]');
}
if (a && a.length) {
a.parent().parent().addClass('selected');
a.parent().parent().attr('id','selected');
highlightAnchor();
} else if (n) {
$(n.itemDiv).addClass('selected');
$(n.itemDiv).attr('id','selected');
}
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
$('#nav-sync').css('top','30px');
} else {
$('#nav-sync').css('top','5px');
}
showRoot();
}
function showNode(o, node, index, hash)
{
if (node && node.childrenData) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
showNode(o,node,index,hash);
},true);
} else {
if (!node.childrenVisited) {
getNode(o, node);
}
$(node.getChildrenUL()).css({'display':'block'});
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
var n = node.children[o.breadcrumbs[index]];
if (index+1<o.breadcrumbs.length) {
showNode(o,n,index+1,hash);
} else {
if (typeof(n.childrenData)==='string') {
var varName = n.childrenData;
getScript(n.relpath+varName,function(){
n.childrenData = getData(varName);
node.expanded=false;
showNode(o,node,index,hash); // retry with child node expanded
},true);
} else {
var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
expandNode(o, n, true, true);
}
selectAndHighlight(hash,n);
}
}
}
} else {
selectAndHighlight(hash);
}
}
function removeToInsertLater(element) {
var parentNode = element.parentNode;
var nextSibling = element.nextSibling;
parentNode.removeChild(element);
return function() {
if (nextSibling) {
parentNode.insertBefore(element, nextSibling);
} else {
parentNode.appendChild(element);
}
};
}
function getNode(o, po)
{
var insertFunction = removeToInsertLater(po.li);
po.childrenVisited = true;
var l = po.childrenData.length-1;
for (var i in po.childrenData) {
var nodeData = po.childrenData[i];
po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
i==l);
}
insertFunction();
}
function gotoNode(o,subIndex,root,hash,relpath)
{
var nti = navTreeSubIndices[subIndex][root+hash];
o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
navTo(o,NAVTREE[0][1],"",relpath);
$('.item').removeClass('selected');
$('.item').removeAttr('id');
}
if (o.breadcrumbs) {
o.breadcrumbs.unshift(0); // add 0 for root node
showNode(o, o.node, 0, hash);
}
}
function navTo(o,root,hash,relpath)
{
var link = cachedLink();
if (link) {
var parts = link.split('#');
root = parts[0];
if (parts.length>1) hash = '#'+parts[1];
else hash='';
}
if (hash.match(/^#l\d+$/)) {
var anchor=$('a[name='+hash.substring(1)+']');
glowEffect(anchor.parent(),1000); // line number
hash=''; // strip line number anchors
//root=root.replace(/_source\./,'.'); // source link to doc link
}
var url=root+hash;
var i=-1;
while (NAVTREEINDEX[i+1]<=url) i++;
if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
if (navTreeSubIndices[i]) {
gotoNode(o,i,root,hash,relpath)
} else {
getScript(relpath+'navtreeindex'+i,function(){
navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
if (navTreeSubIndices[i]) {
gotoNode(o,i,root,hash,relpath);
}
},true);
}
}
function showSyncOff(n,relpath)
{
n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
}
function showSyncOn(n,relpath)
{
n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
}
function toggleSyncButton(relpath)
{
var navSync = $('#nav-sync');
if (navSync.hasClass('sync')) {
navSync.removeClass('sync');
showSyncOff(navSync,relpath);
storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
} else {
navSync.addClass('sync');
showSyncOn(navSync,relpath);
deleteLink();
}
}
function initNavTree(toroot,relpath)
{
var o = new Object();
o.toroot = toroot;
o.node = new Object();
o.node.li = document.getElementById("nav-tree-contents");
o.node.childrenData = NAVTREE;
o.node.children = new Array();
o.node.childrenUL = document.createElement("ul");
o.node.getChildrenUL = function() { return o.node.childrenUL; };
o.node.li.appendChild(o.node.childrenUL);
o.node.depth = 0;
o.node.relpath = relpath;
o.node.expanded = false;
o.node.isLast = true;
o.node.plus_img = document.createElement("img");
o.node.plus_img.src = relpath+"ftv2pnode.png";
o.node.plus_img.width = 16;
o.node.plus_img.height = 22;
if (localStorageSupported()) {
var navSync = $('#nav-sync');
if (cachedLink()) {
showSyncOff(navSync,relpath);
navSync.removeClass('sync');
} else {
showSyncOn(navSync,relpath);
}
navSync.click(function(){ toggleSyncButton(relpath); });
}
$(window).load(function(){
navTo(o,toroot,window.location.hash,relpath);
showRoot();
});
$(window).bind('hashchange', function(){
if (window.location.hash && window.location.hash.length>1){
var a;
if ($(location).attr('hash')){
var clslink=stripPath($(location).attr('pathname'))+':'+
$(location).attr('hash').substring(1);
a=$('.item a[class$="'+clslink+'"]');
}
if (a==null || !$(a).parent().parent().hasClass('selected')){
$('.item').removeClass('selected');
$('.item').removeAttr('id');
}
var link=stripPath2($(location).attr('pathname'));
navTo(o,link,$(location).attr('hash'),relpath);
} else if (!animationInProgress) {
$('#doc-content').scrollTop(0);
$('.item').removeClass('selected');
$('.item').removeAttr('id');
navTo(o,toroot,window.location.hash,relpath);
}
})
}
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/navtree.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 3,862 |
```javascript
var unionarm__nnword =
[
[ "bytes", "unionarm__nnword.html#ac7cff6480a8e29d95f29b73cb1267249", null ],
[ "half_words", "unionarm__nnword.html#a9b5e49e4e2c4b7203e07b305386bb2ba", null ],
[ "word", "unionarm__nnword.html#a35c7b2ae25e35e0ddcd9ec0a1a6f8d18", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/unionarm__nnword.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 123 |
```javascript
var unionarm__nn__long__long =
[
[ "long_long", "unionarm__nn__long__long.html#a4dbadc95589c36dcfdb4ec2f21bd2a72", null ],
[ "word", "unionarm__nn__long__long.html#a911c83d212457726d888e0c845a01155", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/unionarm__nn__long__long.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 86 |
```javascript
var structcmsis__nn__softmax__lut__s16 =
[
[ "exp_lut", "structcmsis__nn__softmax__lut__s16.html#a0efa8f93962010b589115d62bc8b1492", null ],
[ "one_by_one_lut", "structcmsis__nn__softmax__lut__s16.html#a7bbf8c62fe03de10c44fb29ee97934c6", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__softmax__lut__s16.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 105 |
```javascript
var NAVTREEINDEX0 =
{
"ChangeLog_pg.html":[1],
"annotated.html":[4],
"functions.html":[5,0],
"functions_vars.html":[5,1],
"group__Acti.html":[3,0,0],
"group__Acti.html#ga01a7a7c17f0cd544e29c4752daeecdc3":[3,0,0,2],
"group__Acti.html#ga53bcc00e54b802919bb3c89c143ee5ba":[3,0,0,3],
"group__Acti.html#ga638e803b4fe00426f401783a6255ca30":[3,0,0,4],
"group__Acti.html#ga79f11131ae6767d60e03b1f6506b1af8":[3,0,0,1],
"group__Acti.html#ga8932b57c8d0ee757511af2d40dcc11e7":[3,0,0,0],
"group__BasicMath.html":[3,0,1],
"group__BasicMath.html#ga0ac27a4f45de0738632abe89fc1418e7":[3,0,1,3],
"group__BasicMath.html#ga30d6345a9dd6754bb39a6237b6068f5e":[3,0,1,2],
"group__BasicMath.html#ga451e24fa9bf97b58d9da95ed8bbf5438":[3,0,1,0],
"group__BasicMath.html#ga8f59d6176c7a049cfe8605c80e6e7e8c":[3,0,1,1],
"group__Concatenation.html":[3,0,2],
"group__Concatenation.html#ga9ae180a44e18ee58936dba1e0564560b":[3,0,2,3],
"group__Concatenation.html#gac06ac3c87cad1cfb14aa24b19124fcfd":[3,0,2,1],
"group__Concatenation.html#gaf0b76b039f66f34ec99503193a015ff6":[3,0,2,2],
"group__Concatenation.html#gaf2ec7d439726caa96e0b3dc989b34d64":[3,0,2,0],
"group__FC.html":[3,0,4],
"group__FC.html#ga0e97c31706f6c663e813ffcbfceffa6d":[3,0,4,8],
"group__FC.html#ga3a63eb256d70628f8d3f6b149ac5686b":[3,0,4,3],
"group__FC.html#ga5311b3a82500913a053c634e2eb7aab5":[3,0,4,5],
"group__FC.html#ga580497e2ef34601937441f76d7463f08":[3,0,4,1],
"group__FC.html#ga5d16f7dcd49d96e8f16440a57198ee98":[3,0,4,2],
"group__FC.html#ga5f0e89482a3ea7ab417630be80ca983d":[3,0,4,7],
"group__FC.html#ga60b1ce5ad8398fe0ca94428ccfb422b4":[3,0,4,0],
"group__FC.html#ga6613c4e797098f0a1ce870f71752e248":[3,0,4,6],
"group__FC.html#ga88e541ff9fb088ebccb79a7a6b8bbe1e":[3,0,4,9],
"group__FC.html#gae889fe7676029e7fd4678662da93b7e7":[3,0,4,4],
"group__NNBasicMath.html":[3,2],
"group__NNBasicMath.html#ga08f8340aa6533271b3aa6d211614fe22":[3,2,8],
"group__NNBasicMath.html#ga15df1fc03dfaa6e7c2499dbcd8bc4932":[3,2,12],
"group__NNBasicMath.html#ga24c66d123320bd578d0d393a07f61ae4":[3,2,2],
"group__NNBasicMath.html#ga3283c2da5c4e313a64cf348e2c161f3f":[3,2,10],
"group__NNBasicMath.html#ga356c6870ac897816c016e7b77a3b767a":[3,2,6],
"group__NNBasicMath.html#ga379c39e614f1468e1fdb524f51fb6061":[3,2,0],
"group__NNBasicMath.html#ga59ab655606dd4f7a90f573b7479c6dbf":[3,2,7],
"group__NNBasicMath.html#ga89f5ffb84bec69f51d734b8701d4df5b":[3,2,11],
"group__NNBasicMath.html#gab055229b0c5322a6682e0b995d316716":[3,2,4],
"group__NNBasicMath.html#gad46c9ab012cceda8ce6681c687a58c70":[3,2,9],
"group__NNBasicMath.html#gada3234313b4c9fefd7c4421d88c4a785":[3,2,5],
"group__NNBasicMath.html#gae65bde3218210820d789659179e14ce3":[3,2,1],
"group__NNBasicMath.html#gaf4e238a5ef16167a478d6e076f2207f1":[3,2,3],
"group__NNConv.html":[3,0,3],
"group__NNConv.html#ga0673592662e45d57d3be7ce4986baa30":[3,0,3,15],
"group__NNConv.html#ga0ee6e4c1a521657c35477ae0daf1c842":[3,0,3,32],
"group__NNConv.html#ga100b66e41b8fdf1eeb0c108bca6b6deb":[3,0,3,37],
"group__NNConv.html#ga19a56f41b3a38d012cc219036939a487":[3,0,3,22],
"group__NNConv.html#ga1e810a08ea1d94be440d027f93505bc6":[3,0,3,39],
"group__NNConv.html#ga29ac07814d9ba89539f0f74beed92e09":[3,0,3,12],
"group__NNConv.html#ga2b3661946b8466be10d28529a5328ee6":[3,0,3,28],
"group__NNConv.html#ga2bd35360f09a08bf9ad39bb6a972a41b":[3,0,3,34],
"group__NNConv.html#ga35ee13fe338f79af48cd10ae6b5b31fa":[3,0,3,35],
"group__NNConv.html#ga3c41aeb36322e34ddb05bd9593fa1a38":[3,0,3,13],
"group__NNConv.html#ga4336fd386257b8efec7fe3106525f9e5":[3,0,3,30],
"group__NNConv.html#ga43c4623c2553d09a59385aabe971d75d":[3,0,3,1],
"group__NNConv.html#ga4779f7318779682e7789f1888d37e56b":[3,0,3,2],
"group__NNConv.html#ga48d5105c2270fad5d5dc407d60bc894c":[3,0,3,0],
"group__NNConv.html#ga4c54b5bdb38fc20c2167bdfa289f1a2b":[3,0,3,43],
"group__NNConv.html#ga50204b97eb702d5d63f2dd7eadfb8d37":[3,0,3,26],
"group__NNConv.html#ga51f7b85b6fc9db094f3d502dcbfd3a3d":[3,0,3,31],
"group__NNConv.html#ga53092506db6225cf888db9e0e6b0268d":[3,0,3,24],
"group__NNConv.html#ga60c117b646f95abeb9966eefc4a9da38":[3,0,3,25],
"group__NNConv.html#ga6a12792a7013e2a433e93ce8d1738972":[3,0,3,11],
"group__NNConv.html#ga6a218bcb96011379bfe78f08f055cb28":[3,0,3,10],
"group__NNConv.html#ga6c569efc46ae1c38df1335888fc7873d":[3,0,3,3],
"group__NNConv.html#ga818dfca6a26af7cc8abb91d43fb16930":[3,0,3,23],
"group__NNConv.html#ga84ac3fee08349dd3b07c58d5e7a4ad75":[3,0,3,14],
"group__NNConv.html#ga8a0fd229483032bfe41183843e17f8f6":[3,0,3,41],
"group__NNConv.html#ga8db7c4be84de273cfba630106d912737":[3,0,3,9],
"group__NNConv.html#ga91c418d3d08f2969137e08e713a33f7e":[3,0,3,27],
"group__NNConv.html#ga96df33ccc893f8de9cd634a2cd13f01a":[3,0,3,20],
"group__NNConv.html#gaa016c4a0d907baebf48a0cf7c955de46":[3,0,3,5],
"group__NNConv.html#gab98fd934700dff7667131744c8972d91":[3,0,3,42],
"group__NNConv.html#gabef4ea1ca77e2af8055a230f63f332e0":[3,0,3,18],
"group__NNConv.html#gac057b0749e2a6828ae21f762f3fa0c85":[3,0,3,21],
"group__NNConv.html#gac90e77f674aae9634490c35cb255f304":[3,0,3,38],
"group__NNConv.html#gad626813959fcc8681b92c2a80982b8e6":[3,0,3,36],
"group__NNConv.html#gadde7c225c29269334cd821ead685361d":[3,0,3,40],
"group__NNConv.html#gadff88726ddaf91ec234336d5073f1a6a":[3,0,3,16],
"group__NNConv.html#gae45c733ac486fe4d8c70ff0c8b6ab3fb":[3,0,3,29],
"group__NNConv.html#gae5a5bd1e247b50b2c24abe6eb7efb03a":[3,0,3,6],
"group__NNConv.html#gaed4e428c1cdb057d36938792dc557f00":[3,0,3,33],
"group__NNConv.html#gaf65bb70e3f3f290e69d93f1ee322bfa4":[3,0,3,8],
"group__NNConv.html#gaf87f133e81ee6c1fbde89fe44c35352e":[3,0,3,4],
"group__NNConv.html#gaf8bf3e2c2f8b4f2a0cbfb8a797a8b5a8":[3,0,3,7],
"group__NNConv.html#gaf8ee642967e4b1b05465621979de1baa":[3,0,3,19],
"group__NNConv.html#gaf932b53b6b098d649033b4de721c4898":[3,0,3,17],
"group__Pooling.html":[3,0,5],
"group__Pooling.html#ga08263590a94c39b4c1c199501ca166e4":[3,0,5,4],
"group__Pooling.html#ga20e94fc418fb3daa06df890e1bd9bb79":[3,0,5,6],
"group__Pooling.html#ga5bfc08b4eb6c415ca8fbb7be51bfd0d1":[3,0,5,3],
"group__Pooling.html#ga62bc8df39f9b77ad1bccb5dea081b68a":[3,0,5,5],
"group__Pooling.html#ga99afcdcc61eaf429ab3ee823702e44ce":[3,0,5,7],
"group__Pooling.html#gac5f8a447fac56e1c48f353a746ec411a":[3,0,5,2],
"group__Pooling.html#gad5f0fbea55dd8f455ee8fdaa322ab23c":[3,0,5,1],
"group__Pooling.html#gae4a7b07f97ec4313524c9fb9fbcb1f6a":[3,0,5,0],
"group__Reshape.html":[3,0,6],
"group__Reshape.html#ga8cc1dfb7b2b083935a97dc4f24d0533c":[3,0,6,0],
"group__SVDF.html":[3,0,8],
"group__SVDF.html#ga243c5fc0ad2d2753872ed2fe6c78a41c":[3,0,8,0],
"group__SVDF.html#gad623a1298bdaa6c518aca38122bd9846":[3,0,8,1],
"group__Softmax.html":[3,0,7],
"group__Softmax.html#ga1cacd8b84b8363079311987d0016ebe5":[3,0,7,1],
"group__Softmax.html#ga4c00979132b735e75525296bb5fa830f":[3,0,7,5],
"group__Softmax.html#ga6baa03c1cb473b02abe83ed2c9d41d66":[3,0,7,3],
"group__Softmax.html#ga894cfd80c260b946702755b5754e520f":[3,0,7,7],
"group__Softmax.html#ga89aff212a97a3cf32d9d7ddf11a8f43e":[3,0,7,2],
"group__Softmax.html#gaa1627ed96bd597a8046d00689f077dce":[3,0,7,6],
"group__Softmax.html#gaa5632ba67b623b5dff0c4a2d8e2a9a3a":[3,0,7,0],
"group__Softmax.html#gaf309cdd53978a85a39c9bfdc476aea17":[3,0,7,4],
"group__groupNN.html":[3,0],
"group__nndata__convert.html":[3,1],
"group__nndata__convert.html#ga18e161730cf13bb5ed73de2d3a7cb224":[3,1,2],
"group__nndata__convert.html#gab2d48529ae05b350a015f8f1e6596a31":[3,1,3],
"group__nndata__convert.html#gaba8fd446d5f54760b406ee63b25d1aee":[3,1,1],
"group__nndata__convert.html#gae349de4dba8d253c89d45794ccf05680":[3,1,0],
"index.html":[],
"index.html":[0],
"modules.html":[3],
"pages.html":[],
"structarm__nn__double.html":[4,0],
"structarm__nn__double.html#a66939b6b5007a77c843d260b431e68ac":[4,0,0],
"structarm__nn__double.html#a9a087dfc1ed77e9f00ac7411a5827c82":[4,0,1],
"structcmsis__nn__activation.html":[4,3],
"structcmsis__nn__activation.html#a5fefc67d8979f6a9efe36330b9ba81cf":[4,3,0],
"structcmsis__nn__activation.html#a88a2ecd4bda8cd5f339c826df578585a":[4,3,1],
"structcmsis__nn__context.html":[4,4],
"structcmsis__nn__context.html#a3e613ad30f12df59853a1b3565212702":[4,4,0],
"structcmsis__nn__context.html#a7ad7f9757c6f2623e65306924367e82a":[4,4,1],
"structcmsis__nn__conv__params.html":[4,5],
"structcmsis__nn__conv__params.html#a0dd7826503a39d346ab260fa042ea525":[4,5,4],
"structcmsis__nn__conv__params.html#a2b324f59f5ac0ec98f885a1a28514e75":[4,5,1],
"structcmsis__nn__conv__params.html#a37811f827c8b46689a0627b54043650c":[4,5,0],
"structcmsis__nn__conv__params.html#a9ccfc682bff157a5e951b2ffba6d672c":[4,5,5],
"structcmsis__nn__conv__params.html#aa917be27492df19f6382df8d1d78870a":[4,5,3],
"structcmsis__nn__conv__params.html#ac284274c0aa03b1a0bcc0a93b275eadd":[4,5,2],
"structcmsis__nn__dims.html":[4,6],
"structcmsis__nn__dims.html#a30b8961cc2f84ff79c399c31ff3563c0":[4,6,3],
"structcmsis__nn__dims.html#a471946ee336572a5a96eeb0894e6005a":[4,6,1],
"structcmsis__nn__dims.html#a907a0be31e2e3de73df89b1327724555":[4,6,2],
"structcmsis__nn__dims.html#ac9c268ab90554ab8ea2c3d76ecf1ed6c":[4,6,0],
"structcmsis__nn__dw__conv__params.html":[4,7],
"structcmsis__nn__dw__conv__params.html#a26ce1b5e6d00c24781628288e7cf286a":[4,7,5],
"structcmsis__nn__dw__conv__params.html#a6058fcacc55ccf2f3e7049abcd26a7b2":[4,7,4],
"structcmsis__nn__dw__conv__params.html#a88d6144a8af12904ac92b82aee2d6695":[4,7,0],
"structcmsis__nn__dw__conv__params.html#aa2e4f79bfb4788293f3b2cb5cf521ad5":[4,7,2],
"structcmsis__nn__dw__conv__params.html#aa613968e07c396755c2a6def8ecded79":[4,7,1],
"structcmsis__nn__dw__conv__params.html#aab0b7c6b993dc249651b77c675c7a9b4":[4,7,3],
"structcmsis__nn__dw__conv__params.html#ad0553c750d65a8501fb086c7a662bc41":[4,7,6],
"structcmsis__nn__fc__params.html":[4,8],
"structcmsis__nn__fc__params.html#a73c44b038fbb561281e27d58bb18b9a0":[4,8,1],
"structcmsis__nn__fc__params.html#a9287b2e5770e0b6c72f88ebc3245f51a":[4,8,3],
"structcmsis__nn__fc__params.html#a9d6902def53781c44a0a74dbc305629a":[4,8,2],
"structcmsis__nn__fc__params.html#ac4c27a0819335364ec291bac9043cd07":[4,8,0],
"structcmsis__nn__per__channel__quant__params.html":[4,9],
"structcmsis__nn__per__channel__quant__params.html#a281dfde55f7a87b39a4a2c2c0362c813":[4,9,1],
"structcmsis__nn__per__channel__quant__params.html#a33b4a56acc8ffaa077f7db31b001e5bd":[4,9,0],
"structcmsis__nn__per__tensor__quant__params.html":[4,10],
"structcmsis__nn__per__tensor__quant__params.html#a4edb6cf363e3d30ad7e5166275629548":[4,10,0],
"structcmsis__nn__per__tensor__quant__params.html#a944f9c7b4f01355406b0a2ec9d578b87":[4,10,1],
"structcmsis__nn__pool__params.html":[4,11],
"structcmsis__nn__pool__params.html#a5d98c2ed7ab19a021a07175764e95a26":[4,11,0],
"structcmsis__nn__pool__params.html#a64a4ccb624b7c12ca3e9f3532da58b3a":[4,11,2],
"structcmsis__nn__pool__params.html#aba41d8fba7aca6871e7a67f0e6c63346":[4,11,1],
"structcmsis__nn__softmax__lut__s16.html":[4,12],
"structcmsis__nn__softmax__lut__s16.html#a0efa8f93962010b589115d62bc8b1492":[4,12,0],
"structcmsis__nn__softmax__lut__s16.html#a7bbf8c62fe03de10c44fb29ee97934c6":[4,12,1],
"structcmsis__nn__svdf__params.html":[4,13],
"structcmsis__nn__svdf__params.html#a2334fd8228d3989dc34abd2bc36ca032":[4,13,4],
"structcmsis__nn__svdf__params.html#a4afe1cfeca461ebb42dab876e3b5c31e":[4,13,1],
"structcmsis__nn__svdf__params.html#a62b484efb24bae6a05be502a18168257":[4,13,3],
"structcmsis__nn__svdf__params.html#aab0d36ffecc3ccc296e3dd6149c8f37b":[4,13,2],
"structcmsis__nn__svdf__params.html#af9bee3ba507e5226a264097a6a6e78ed":[4,13,0],
"structcmsis__nn__tile.html":[4,14],
"structcmsis__nn__tile.html#a13c54be71aa552c2bc76d12032a3d092":[4,14,0],
"structcmsis__nn__tile.html#a9f99b4e1164c76f4ed6b32648d454283":[4,14,1],
"todo.html":[2],
"unionarm__nn__long__long.html":[4,1],
"unionarm__nn__long__long.html#a4dbadc95589c36dcfdb4ec2f21bd2a72":[4,1,0],
"unionarm__nn__long__long.html#a911c83d212457726d888e0c845a01155":[4,1,1],
"unionarm__nnword.html":[4,2],
"unionarm__nnword.html#a35c7b2ae25e35e0ddcd9ec0a1a6f8d18":[4,2,2],
"unionarm__nnword.html#a9b5e49e4e2c4b7203e07b305386bb2ba":[4,2,1],
"unionarm__nnword.html#ac7cff6480a8e29d95f29b73cb1267249":[4,2,0]
};
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/navtreeindex0.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 5,635 |
```javascript
function writeFooter() {
document.write('Generated on Mon Dec 5 2022 07:22:56 for CMSIS-NN Version 4.0.0 by Arm Ltd. All rights reserved.');
};
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/cmsis_footer.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 48 |
```javascript
var structcmsis__nn__fc__params =
[
[ "activation", "structcmsis__nn__fc__params.html#ac4c27a0819335364ec291bac9043cd07", null ],
[ "filter_offset", "structcmsis__nn__fc__params.html#a73c44b038fbb561281e27d58bb18b9a0", null ],
[ "input_offset", "structcmsis__nn__fc__params.html#a9d6902def53781c44a0a74dbc305629a", null ],
[ "output_offset", "structcmsis__nn__fc__params.html#a9287b2e5770e0b6c72f88ebc3245f51a", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__fc__params.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 170 |
```javascript
var structcmsis__nn__activation =
[
[ "max", "structcmsis__nn__activation.html#a5fefc67d8979f6a9efe36330b9ba81cf", null ],
[ "min", "structcmsis__nn__activation.html#a88a2ecd4bda8cd5f339c826df578585a", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__activation.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 85 |
```javascript
var structcmsis__nn__dims =
[
[ "c", "structcmsis__nn__dims.html#ac9c268ab90554ab8ea2c3d76ecf1ed6c", null ],
[ "h", "structcmsis__nn__dims.html#a471946ee336572a5a96eeb0894e6005a", null ],
[ "n", "structcmsis__nn__dims.html#a907a0be31e2e3de73df89b1327724555", null ],
[ "w", "structcmsis__nn__dims.html#a30b8961cc2f84ff79c399c31ff3563c0", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__dims.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 158 |
```javascript
var structarm__nn__double =
[
[ "high", "structarm__nn__double.html#a66939b6b5007a77c843d260b431e68ac", null ],
[ "low", "structarm__nn__double.html#a9a087dfc1ed77e9f00ac7411a5827c82", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structarm__nn__double.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 83 |
```javascript
var modules =
[
[ "Neural Network Functions", "group__groupNN.html", "group__groupNN" ],
[ "Neural Network Data Conversion Functions", "group__nndata__convert.html", "group__nndata__convert" ],
[ "Basic Math Functions for Neural Network Computation", "group__NNBasicMath.html", "group__NNBasicMath" ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/modules.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 84 |
```javascript
/*!
* jQuery JavaScript Library v1.7.1
* path_to_url
*
* Dual licensed under the MIT or GPL Version 2 licenses.
* path_to_url
*
* Includes Sizzle.js
* path_to_url
*
* Date: Mon Nov 21 21:11:03 2011 -0500
*/
(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b4<b3;b4++){if((b9=arguments[b4])!=null){for(b2 in b9){b0=b5[b2];b1=b9[b2];if(b5===b1){continue}if(b8&&b1&&(bF.isPlainObject(b1)||(b6=bF.isArray(b1)))){if(b6){b6=false;b7=b0&&bF.isArray(b0)?b0:[]}else{b7=b0&&bF.isPlainObject(b0)?b0:{}}b5[b2]=bF.extend(b8,b7,b1)}else{if(b1!==L){b5[b2]=b1}}}}}return b5};bF.extend({noConflict:function(b0){if(bb.$===bF){bb.$=bH}if(b0&&bb.jQuery===bF){bb.jQuery=bU}return bF},isReady:false,readyWait:1,holdReady:function(b0){if(b0){bF.readyWait++}else{bF.ready(true)}},ready:function(b0){if((b0===true&&!--bF.readyWait)||(b0!==true&&!bF.isReady)){if(!av.body){return setTimeout(bF.ready,1)}bF.isReady=true;if(b0!==true&&--bF.readyWait>0){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b4<b5;){if(b6.apply(b3[b4++],b2)===false){break}}}}else{if(b0){for(b1 in b3){if(b6.call(b3[b1],b1,b3[b1])===false){break}}}else{for(;b4<b5;){if(b6.call(b3[b4],b4,b3[b4++])===false){break}}}}return b3},trim:bO?function(b0){return b0==null?"":bO.call(b0)}:function(b0){return b0==null?"":b0.toString().replace(bI,"").replace(bE,"")},makeArray:function(b3,b1){var b0=b1||[];if(b3!=null){var b2=bF.type(b3);if(b3.length==null||b2==="string"||b2==="function"||b2==="regexp"||bF.isWindow(b3)){bz.call(b0,b3)}else{bF.merge(b0,b3)}}return b0},inArray:function(b2,b3,b1){var b0;if(b3){if(bv){return bv.call(b3,b2,b1)}b0=b3.length;b1=b1?b1<0?Math.max(0,b0+b1):b1:0;for(;b1<b0;b1++){if(b1 in b3&&b3[b1]===b2){return b1}}}return -1},merge:function(b4,b2){var b3=b4.length,b1=0;if(typeof b2.length==="number"){for(var b0=b2.length;b1<b0;b1++){b4[b3++]=b2[b1]}}else{while(b2[b1]!==L){b4[b3++]=b2[b1++]}}b4.length=b3;return b4},grep:function(b1,b6,b0){var b2=[],b5;b0=!!b0;for(var b3=0,b4=b1.length;b3<b4;b3++){b5=!!b6(b1[b3],b3);if(b0!==b5){b2.push(b1[b3])}}return b2},map:function(b0,b7,b8){var b5,b6,b4=[],b2=0,b1=b0.length,b3=b0 instanceof bF||b1!==L&&typeof b1==="number"&&((b1>0&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b2<b1;b2++){b5=b7(b0[b2],b2,b8);if(b5!=null){b4[b4.length]=b5}}}else{for(b6 in b0){b5=b7(b0[b6],b6,b8);if(b5!=null){b4[b4.length]=b5}}}return b4.concat.apply([],b4)},guid:1,proxy:function(b4,b3){if(typeof b3==="string"){var b2=b4[b3];b3=b4;b4=b2}if(!bF.isFunction(b4)){return L}var b0=bK.call(arguments,2),b1=function(){return b4.apply(b3,b0.concat(bK.call(arguments)))};b1.guid=b4.guid=b4.guid||b1.guid||bF.guid++;return b1},access:function(b0,b8,b6,b2,b5,b7){var b1=b0.length;if(typeof b8==="object"){for(var b3 in b8){bF.access(b0,b3,b8[b3],b2,b5,b6)}return b0}if(b6!==L){b2=!b7&&b2&&bF.isFunction(b6);for(var b4=0;b4<b1;b4++){b5(b0[b4],b8,b2?b6.call(b0[b4],b4,b5(b0[b4],b8)):b6,b7)}return b0}return b1?b5(b0[0],b8):L},now:function(){return(new Date()).getTime()},uaMatch:function(b1){b1=b1.toLowerCase();var b0=by.exec(b1)||bR.exec(b1)||bQ.exec(b1)||b1.indexOf("compatible")<0&&bS.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}},sub:function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}bF.extend(true,b0,this);b0.superclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof bF&&!(b4 instanceof b0)){b4=b0(b4)}return bF.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(av);return b0},browser:{}});bF.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b1,b0){bx["[object "+b0+"]"]=b0.toLowerCase()});bV=bF.uaMatch(bX);if(bV.browser){bF.browser[bV.browser]=true;bF.browser.version=bV.version}if(bF.browser.webkit){bF.browser.safari=true}if(bM.test("\xA0")){bI=/^[\s\xA0]+/;bE=/[\s\xA0]+$/}bD=bF(av);if(av.addEventListener){e=function(){av.removeEventListener("DOMContentLoaded",e,false);bF.ready()}}else{if(av.attachEvent){e=function(){if(av.readyState==="complete"){av.detachEvent("onreadystatechange",e);bF.ready()}}}}function bw(){if(bF.isReady){return}try{av.documentElement.doScroll("left")}catch(b0){setTimeout(bw,1);return}bF.ready()}return bF})();var a2={};function X(e){var bv=a2[e]={},bw,bx;e=e.split(/\s+/);for(bw=0,bx=e.length;bw<bx;bw++){bv[e[bw]]=true}return bv}b.Callbacks=function(bw){bw=bw?(a2[bw]||X(bw)):{};var bB=[],bC=[],bx,by,bv,bz,bA,bE=function(bF){var bG,bJ,bI,bH,bK;for(bG=0,bJ=bF.length;bG<bJ;bG++){bI=bF[bG];bH=b.type(bI);if(bH==="array"){bE(bI)}else{if(bH==="function"){if(!bw.unique||!bD.has(bI)){bB.push(bI)}}}}},e=function(bG,bF){bF=bF||[];bx=!bw.memory||[bG,bF];by=true;bA=bv||0;bv=0;bz=bB.length;for(;bB&&bA<bz;bA++){if(bB[bA].apply(bG,bF)===false&&bw.stopOnFalse){bx=true;break}}by=false;if(bB){if(!bw.once){if(bC&&bC.length){bx=bC.shift();bD.fireWith(bx[0],bx[1])}}else{if(bx===true){bD.disable()}else{bB=[]}}}},bD={add:function(){if(bB){var bF=bB.length;bE(arguments);if(by){bz=bB.length}else{if(bx&&bx!==true){bv=bF;e(bx[0],bx[1])}}}return this},remove:function(){if(bB){var bF=arguments,bH=0,bI=bF.length;for(;bH<bI;bH++){for(var bG=0;bG<bB.length;bG++){if(bF[bH]===bB[bG]){if(by){if(bG<=bz){bz--;if(bG<=bA){bA--}}}bB.splice(bG--,1);if(bw.unique){break}}}}}return this},has:function(bG){if(bB){var bF=0,bH=bB.length;for(;bF<bH;bF++){if(bG===bB[bF]){return true}}}return false},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=L;return this},disabled:function(){return !bB},lock:function(){bC=L;if(!bx||bx===true){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){if(bC){if(by){if(!bw.once){bC.push([bG,bF])}}else{if(!(bw.once&&bx)){e(bG,bF)}}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bx}};return bD};var aJ=[].slice;b.extend({Deferred:function(by){var bx=b.Callbacks("once memory"),bw=b.Callbacks("once memory"),bv=b.Callbacks("memory"),e="pending",bA={resolve:bx,reject:bw,notify:bv},bC={done:bx.add,fail:bw.add,progress:bv.add,state:function(){return e},isResolved:bx.fired,isRejected:bw.fired,then:function(bE,bD,bF){bB.done(bE).fail(bD).progress(bF);return this},always:function(){bB.done.apply(bB,arguments).fail.apply(bB,arguments);return this},pipe:function(bF,bE,bD){return b.Deferred(function(bG){b.each({done:[bF,"resolve"],fail:[bE,"reject"],progress:[bD,"notify"]},function(bI,bL){var bH=bL[0],bK=bL[1],bJ;if(b.isFunction(bH)){bB[bI](function(){bJ=bH.apply(this,arguments);if(bJ&&b.isFunction(bJ.promise)){bJ.promise().then(bG.resolve,bG.reject,bG.notify)}else{bG[bK+"With"](this===bB?bG:this,[bJ])}})}else{bB[bI](bG[bK])}})}).promise()},promise:function(bE){if(bE==null){bE=bC}else{for(var bD in bC){bE[bD]=bC[bD]}}return bE}},bB=bC.promise({}),bz;for(bz in bA){bB[bz]=bA[bz].fire;bB[bz+"With"]=bA[bz].fireWith}bB.done(function(){e="resolved"},bw.disable,bv.lock).fail(function(){e="rejected"},bx.disable,bv.lock);if(by){by.call(bB,bB)}return bB},when:function(bA){var bx=aJ.call(arguments,0),bv=0,e=bx.length,bB=new Array(e),bw=e,by=e,bC=e<=1&&bA&&b.isFunction(bA.promise)?bA:b.Deferred(),bE=bC.promise();function bD(bF){return function(bG){bx[bF]=arguments.length>1?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv<e;bv++){if(bx[bv]&&bx[bv].promise&&b.isFunction(bx[bv].promise)){bx[bv].promise().then(bD(bv),bC.reject,bz(bv))
}else{--bw}}if(!bw){bC.resolveWith(bC,bx)}}else{if(bC!==bA){bC.resolveWith(bC,e?[bA]:[])}}return bE}});b.support=(function(){var bJ,bI,bF,bG,bx,bE,bA,bD,bz,bK,bB,by,bw,bv=av.createElement("div"),bH=av.documentElement;bv.setAttribute("className","t");bv.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="<div "+e+"><div></div></div><table "+e+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="<div style='width:4px;'></div>";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA<bz;bA++){delete bB[bv[bA]]}if(!(by?S:b.isEmptyObject)(bB)){return}}}if(!by){delete e[bw].data;if(!S(e[bw])){return}}if(b.support.deleteExpando||!e.setInterval){delete e[bw]}else{e[bw]=null}if(bD){if(b.support.deleteExpando){delete bx[bC]}else{if(bx.removeAttribute){bx.removeAttribute(bC)}else{bx[bC]=null}}}},_data:function(bv,e,bw){return b.data(bv,e,bw,true)},acceptData:function(bv){if(bv.nodeName){var e=b.noData[bv.nodeName.toLowerCase()];if(e){return !(e===true||bv.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(by,bA){var bB,e,bw,bz=null;if(typeof by==="undefined"){if(this.length){bz=b.data(this[0]);if(this[0].nodeType===1&&!b._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var bx=0,bv=e.length;bx<bv;bx++){bw=e[bx].name;if(bw.indexOf("data-")===0){bw=b.camelCase(bw.substring(5));a5(this[0],bw,bz[bw])}}b._data(this[0],"parsedAttrs",true)}}return bz}else{if(typeof by==="object"){return this.each(function(){b.data(this,by)})}}bB=by.split(".");bB[1]=bB[1]?"."+bB[1]:"";if(bA===L){bz=this.triggerHandler("getData"+bB[1]+"!",[bB[0]]);if(bz===L&&this.length){bz=b.data(this[0],by);bz=a5(this[0],by,bz)}return bz===L&&bB[1]?this.data(bB[0]):bz}else{return this.each(function(){var bC=b(this),bD=[bB[0],bA];bC.triggerHandler("setData"+bB[1]+"!",bD);b.data(this,by,bA);bC.triggerHandler("changeData"+bB[1]+"!",bD)})}},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function a5(bx,bw,by){if(by===L&&bx.nodeType===1){var bv="data-"+bw.replace(aA,"-$1").toLowerCase();by=bx.getAttribute(bv);if(typeof by==="string"){try{by=by==="true"?true:by==="false"?false:by==="null"?null:b.isNumeric(by)?parseFloat(by):aS.test(by)?b.parseJSON(by):by}catch(bz){}b.data(bx,bw,by)}else{by=L}}return by}function S(bv){for(var e in bv){if(e==="data"&&b.isEmptyObject(bv[e])){continue}if(e!=="toJSON"){return false}}return true}function bi(by,bx,bA){var bw=bx+"defer",bv=bx+"queue",e=bx+"mark",bz=b._data(by,bw);if(bz&&(bA==="queue"||!b._data(by,bv))&&(bA==="mark"||!b._data(by,e))){setTimeout(function(){if(!b._data(by,bv)&&!b._data(by,e)){b.removeData(by,bw,true);bz.fire()}},0)}}b.extend({_mark:function(bv,e){if(bv){e=(e||"fx")+"mark";b._data(bv,e,(b._data(bv,e)||0)+1)}},_unmark:function(by,bx,bv){if(by!==true){bv=bx;bx=by;by=false}if(bx){bv=bv||"fx";var e=bv+"mark",bw=by?0:((b._data(bx,e)||1)-1);if(bw){b._data(bx,e,bw)}else{b.removeData(bx,e,true);bi(bx,bv,"mark")}}},queue:function(bv,e,bx){var bw;if(bv){e=(e||"fx")+"queue";bw=b._data(bv,e);if(bx){if(!bw||b.isArray(bx)){bw=b._data(bv,e,b.makeArray(bx))}else{bw.push(bx)}}return bw||[]}},dequeue:function(by,bx){bx=bx||"fx";var bv=b.queue(by,bx),bw=bv.shift(),e={};if(bw==="inprogress"){bw=bv.shift()}if(bw){if(bx==="fx"){bv.unshift("inprogress")}b._data(by,bx+".run",e);bw.call(by,function(){b.dequeue(by,bx)},e)}if(!bv.length){b.removeData(by,bx+"queue "+bx+".run",true);bi(by,bx,"queue")}}});b.fn.extend({queue:function(e,bv){if(typeof e!=="string"){bv=e;e="fx"}if(bv===L){return b.queue(this[0],e)}return this.each(function(){var bw=b.queue(this,e,bv);if(e==="fx"&&bw[0]!=="inprogress"){b.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(bv,e){bv=b.fx?b.fx.speeds[bv]||bv:bv;e=e||"fx";return this.queue(e,function(bx,bw){var by=setTimeout(bx,bv);bw.stop=function(){clearTimeout(by)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(bD,bw){if(typeof bD!=="string"){bw=bD;bD=L}bD=bD||"fx";var e=b.Deferred(),bv=this,by=bv.length,bB=1,bz=bD+"defer",bA=bD+"queue",bC=bD+"mark",bx;function bE(){if(!(--bB)){e.resolveWith(bv,[bv])}}while(by--){if((bx=b.data(bv[by],bz,L,true)||(b.data(bv[by],bA,L,true)||b.data(bv[by],bC,L,true))&&b.data(bv[by],bz,b.Callbacks("once memory"),true))){bB++;bx.add(bE)}}bE();return e.promise()}});var aP=/[\n\t\r]/g,af=/\s+/,aU=/\r/g,g=/^(?:button|input)$/i,D=/^(?:button|input|object|select|textarea)$/i,l=/^a(?:rea)?$/i,ao=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,F=b.support.getSetAttribute,be,aY,aF;b.fn.extend({attr:function(e,bv){return b.access(this,e,bv,true,b.attr)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,bv){return b.access(this,e,bv,true,b.prop)},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=L;delete this[e]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,e;if(b.isFunction(by)){return this.each(function(bC){b(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(af);for(bw=0,bv=this.length;bw<bv;bw++){bx=this[bw];if(bx.nodeType===1){if(!bx.className&&bA.length===1){bx.className=by}else{bz=" "+bx.className+" ";for(bB=0,e=bA.length;bB<e;bB++){if(!~bz.indexOf(" "+bA[bB]+" ")){bz+=bA[bB]+" "}}bx.className=b.trim(bz)}}}}return this},removeClass:function(bz){var bA,bw,bv,by,bx,bB,e;if(b.isFunction(bz)){return this.each(function(bC){b(this).removeClass(bz.call(this,bC,this.className))})}if((bz&&typeof bz==="string")||bz===L){bA=(bz||"").split(af);for(bw=0,bv=this.length;bw<bv;bw++){by=this[bw];if(by.nodeType===1&&by.className){if(bz){bx=(" "+by.className+" ").replace(aP," ");for(bB=0,e=bA.length;bB<e;bB++){bx=bx.replace(" "+bA[bB]+" "," ")}by.className=b.trim(bx)}else{by.className=""}}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,e=typeof bv==="boolean";if(b.isFunction(bx)){return this.each(function(by){b(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=b(this),bB=bv,bC=bx.split(af);while((bA=bC[bz++])){bB=e?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){b._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":b._data(this,"__className__")||""}}})},hasClass:function(e){var bx=" "+e+" ",bw=0,bv=this.length;for(;bw<bv;bw++){if(this[bw].nodeType===1&&(" "+this[bw].className+" ").replace(aP," ").indexOf(bx)>-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv<bz;bv++){bx=bC[bv];if(bx.selected&&(b.support.optDisabled?!bx.disabled:bx.getAttribute("disabled")===null)&&(!bx.parentNode.disabled||!b.nodeName(bx.parentNode,"optgroup"))){bA=b(bx).val();if(bw){return bA}bB.push(bA)}}if(bw&&!bB.length&&bC.length){return b(bC[by]).val()}return bB},set:function(bv,bw){var e=b.makeArray(bw);b(bv).find("option").each(function(){this.selected=b.inArray(b(this).val(),e)>=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;
if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw<e;bw++){bv=bA[bw];if(bv){by=b.propFix[bv]||bv;b.attr(bx,bv,"");bx.removeAttribute(F?bv:by);if(ao.test(bv)&&by in bx){bx[by]=false}}}}},attrHooks:{type:{set:function(e,bv){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed")}else{if(!b.support.radioValue&&bv==="radio"&&b.nodeName(e,"input")){var bw=e.value;e.setAttribute("type",bv);if(bw){e.value=bw}return bv}}}},value:{get:function(bv,e){if(be&&b.nodeName(bv,"button")){return be.get(bv,e)}return e in bv?bv.value:null},set:function(bv,bw,e){if(be&&b.nodeName(bv,"button")){return be.set(bv,bw,e)}bv.value=bw}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(bz,bx,bA){var bw,e,by,bv=bz.nodeType;if(!bz||bv===3||bv===8||bv===2){return}by=bv!==1||!b.isXMLDoc(bz);if(by){bx=b.propFix[bx]||bx;e=b.propHooks[bx]}if(bA!==L){if(e&&"set" in e&&(bw=e.set(bz,bA,bx))!==L){return bw}else{return(bz[bx]=bA)}}else{if(e&&"get" in e&&(bw=e.get(bz,bx))!==null){return bw}else{return bz[bx]}}},propHooks:{tabIndex:{get:function(bv){var e=bv.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):D.test(bv.nodeName)||l.test(bv.nodeName)&&bv.href?0:L}}}});b.attrHooks.tabindex=b.propHooks.tabIndex;aY={get:function(bv,e){var bx,bw=b.prop(bv,e);return bw===true||typeof bw!=="boolean"&&(bx=bv.getAttributeNode(e))&&bx.nodeValue!==false?e.toLowerCase():L},set:function(bv,bx,e){var bw;if(bx===false){b.removeAttr(bv,e)}else{bw=b.propFix[e]||e;if(bw in bv){bv[bw]=true}bv.setAttribute(e,e.toLowerCase())}return e}};if(!F){aF={name:true,id:true};be=b.valHooks.button={get:function(bw,bv){var e;e=bw.getAttributeNode(bv);return e&&(aF[bv]?e.nodeValue!=="":e.specified)?e.nodeValue:L},set:function(bw,bx,bv){var e=bw.getAttributeNode(bv);if(!e){e=av.createAttribute(bv);bw.setAttributeNode(e)}return(e.nodeValue=bx+"")}};b.attrHooks.tabindex.set=be.set;b.each(["width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bw,bx){if(bx===""){bw.setAttribute(e,"auto");return bx}}})});b.attrHooks.contenteditable={get:be.get,set:function(bv,bw,e){if(bw===""){bw="false"}be.set(bv,bw,e)}}}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bx){var bw=bx.getAttribute(e,2);return bw===null?L:bw}})})}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||L},set:function(e,bv){return(e.style.cssText=""+bv)}}}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(bv){var e=bv.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!b.support.enctype){b.propFix.enctype="encoding"}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,bv){if(b.isArray(bv)){return(e.checked=b.inArray(b(e).val(),bv)>=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI<bC.length;bI++){bH=n.exec(bC[bI])||[];bF=bH[1];e=(bH[2]||"").split(".").sort();bE=b.event.special[bF]||{};bF=(by?bE.delegateType:bE.bindType)||bF;bE=b.event.special[bF]||{};bG=b.extend({type:bF,origType:bH[1],data:bA,handler:bJ,guid:bJ.guid,selector:by,quick:Y(by),namespace:e.join(".")},bv);bw=bK[bF];if(!bw){bw=bK[bF]=[];bw.delegateCount=0;if(!bE.setup||bE.setup.call(bx,bA,e,bB)===false){if(bx.addEventListener){bx.addEventListener(bF,bB,false)}else{if(bx.attachEvent){bx.attachEvent("on"+bF,bB)}}}}if(bE.add){bE.add.call(bx,bG);if(!bG.handler.guid){bG.handler.guid=bJ.guid}}if(by){bw.splice(bw.delegateCount++,0,bG)}else{bw.push(bG)}b.event.global[bF]=true}bx=null},global:{},remove:function(bJ,bE,bv,bH,bB){var bI=b.hasData(bJ)&&b._data(bJ),bF,bx,bz,bL,bC,bA,bG,bw,by,bK,bD,e;if(!bI||!(bw=bI.events)){return}bE=b.trim(bt(bE||"")).split(" ");for(bF=0;bF<bE.length;bF++){bx=n.exec(bE[bF])||[];bz=bL=bx[1];bC=bx[2];if(!bz){for(bz in bw){b.event.remove(bJ,bz+bE[bF],bv,bH,true)}continue}by=b.event.special[bz]||{};bz=(bH?by.delegateType:by.bindType)||bz;bD=bw[bz]||[];bA=bD.length;bC=bC?new RegExp("(^|\\.)"+bC.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(bG=0;bG<bD.length;bG++){e=bD[bG];if((bB||bL===e.origType)&&(!bv||bv.guid===e.guid)&&(!bC||bC.test(e.namespace))&&(!bH||bH===e.selector||bH==="**"&&e.selector)){bD.splice(bG--,1);if(e.selector){bD.delegateCount--}if(by.remove){by.remove.call(bJ,e)}}}if(bD.length===0&&bA!==bD.length){if(!by.teardown||by.teardown.call(bJ,bC)===false){b.removeEvent(bJ,bz,bI.handle)}delete bw[bz]}}if(b.isEmptyObject(bw)){bK=bI.handle;if(bK){bK.elem=null}b.removeData(bJ,["events","handle"],true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(bv,bD,bA,bJ){if(bA&&(bA.nodeType===3||bA.nodeType===8)){return}var bG=bv.type||bv,bx=[],e,bw,bC,bH,bz,by,bF,bE,bB,bI;if(T.test(bG+b.event.triggered)){return}if(bG.indexOf("!")>=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bC<bB.length&&!bv.isPropagationStopped();bC++){bH=bB[bC][0];bv.type=bB[bC][1];bE=(b._data(bH,"events")||{})[bv.type]&&b._data(bH,"handle");if(bE){bE.apply(bH,bD)}bE=by&&bH[by];if(bE&&b.acceptData(bH)&&bE.apply(bH,bD)===false){bv.preventDefault()}}bv.type=bG;if(!bJ&&!bv.isDefaultPrevented()){if((!bF._default||bF._default.apply(bA.ownerDocument,bD)===false)&&!(bG==="click"&&b.nodeName(bA,"a"))&&b.acceptData(bA)){if(by&&bA[bG]&&((bG!=="focus"&&bG!=="blur")||bv.target.offsetWidth!==0)&&!b.isWindow(bA)){bz=bA[by];if(bz){bA[by]=null}b.event.triggered=bG;bA[bG]();b.event.triggered=L;if(bz){bA[by]=bz}}}}return bv.result},dispatch:function(e){e=b.event.fix(e||bb.event);var bz=((b._data(this,"events")||{})[e.type]||[]),bA=bz.delegateCount,bG=[].slice.call(arguments,0),by=!e.exclusive&&!e.namespace,bH=[],bC,bB,bK,bx,bF,bE,bv,bD,bI,bw,bJ;bG[0]=e;e.delegateTarget=this;if(bA&&!e.target.disabled&&!(e.button&&e.type==="click")){bx=b(this);bx.context=this.ownerDocument||this;for(bK=e.target;bK!=this;bK=bK.parentNode||this){bE={};bD=[];bx[0]=bK;for(bC=0;bC<bA;bC++){bI=bz[bC];bw=bI.selector;if(bE[bw]===L){bE[bw]=(bI.quick?j(bK,bI.quick):bx.is(bw))}if(bE[bw]){bD.push(bI)}}if(bD.length){bH.push({elem:bK,matches:bD})}}}if(bz.length>bA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC<bH.length&&!e.isPropagationStopped();bC++){bv=bH[bC];e.currentTarget=bv.elem;for(bB=0;bB<bv.matches.length&&!e.isImmediatePropagationStopped();bB++){bI=bv.matches[bB];if(by||(!e.namespace&&!bI.namespace)||e.namespace_re&&e.namespace_re.test(bI.namespace)){e.data=bI.data;e.handleObj=bI;bF=((b.event.special[bI.origType]||{}).handle||bI.handler).apply(bv.elem,bG);if(bF!==L){e.result=bF;if(bF===false){e.preventDefault();e.stopPropagation()}}}}}return e.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(bv,e){if(bv.which==null){bv.which=e.charCode!=null?e.charCode:e.keyCode}return bv}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(bx,bw){var by,bz,e,bv=bw.button,bA=bw.fromElement;if(bx.pageX==null&&bw.clientX!=null){by=bx.target.ownerDocument||av;bz=by.documentElement;e=by.body;bx.pageX=bw.clientX+(bz&&bz.scrollLeft||e&&e.scrollLeft||0)-(bz&&bz.clientLeft||e&&e.clientLeft||0);bx.pageY=bw.clientY+(bz&&bz.scrollTop||e&&e.scrollTop||0)-(bz&&bz.clientTop||e&&e.clientTop||0)}if(!bx.relatedTarget&&bA){bx.relatedTarget=bA===bx.target?bw.toElement:bA}if(!bx.which&&bv!==L){bx.which=(bv&1?1:(bv&2?3:(bv&4?2:0)))}return bx}},fix:function(bw){if(bw[b.expando]){return bw}var bv,bz,e=bw,bx=b.event.fixHooks[bw.type]||{},by=bx.props?this.props.concat(bx.props):this.props;bw=b.Event(e);for(bv=by.length;bv;){bz=by[--bv];bw[bz]=e[bz]}if(!bw.target){bw.target=e.srcElement||av}if(bw.target.nodeType===3){bw.target=bw.target.parentNode}if(bw.metaKey===L){bw.metaKey=bw.ctrlKey}return bx.filter?bx.filter(bw,e):bw},special:{ready:{setup:b.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(bw,bv,e){if(b.isWindow(this)){this.onbeforeunload=e}},teardown:function(bv,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}},simulate:function(bw,by,bx,bv){var bz=b.extend(new b.Event(),bx,{type:bw,isSimulated:true,originalEvent:{}});if(bv){b.event.trigger(bz,null,by)}else{b.event.dispatch.call(by,bz)}if(bz.isDefaultPrevented()){bx.preventDefault()}}};b.event.handle=b.event.dispatch;b.removeEvent=av.removeEventListener?function(bv,e,bw){if(bv.removeEventListener){bv.removeEventListener(e,bw,false)}}:function(bv,e,bw){if(bv.detachEvent){bv.detachEvent("on"+e,bw)}};b.Event=function(bv,e){if(!(this instanceof b.Event)){return new b.Event(bv,e)}if(bv&&bv.type){this.originalEvent=bv;this.type=bv.type;this.isDefaultPrevented=(bv.defaultPrevented||bv.returnValue===false||bv.getPreventDefault&&bv.getPreventDefault())?i:bk}else{this.type=bv}if(e){b.extend(this,e)}this.timeStamp=bv&&bv.timeStamp||b.now();this[b.expando]=true};function bk(){return false}function i(){return true}b.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var bv=this.originalEvent;if(!bv){return}if(bv.preventDefault){bv.preventDefault()}else{bv.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=i;var bv=this.originalEvent;if(!bv){return}if(bv.stopPropagation){bv.stopPropagation()}bv.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:bk,isPropagationStopped:bk,isImmediatePropagationStopped:bk};b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bv,e){b.event.special[bv]={delegateType:e,bindType:e,handle:function(bz){var bB=this,bA=bz.relatedTarget,by=bz.handleObj,bw=by.selector,bx;if(!bA||(bA!==bB&&!b.contains(bB,bA))){bz.type=by.origType;bx=by.handler.apply(this,arguments);bz.type=e}return bx}}});if(!b.support.submitBubbles){b.event.special.submit={setup:function(){if(b.nodeName(this,"form")){return false
}b.event.add(this,"click._submit keypress._submit",function(bx){var bw=bx.target,bv=b.nodeName(bw,"input")||b.nodeName(bw,"button")?bw.form:L;if(bv&&!bv._submit_attached){b.event.add(bv,"submit._submit",function(e){if(this.parentNode&&!e.isTrigger){b.event.simulate("submit",this.parentNode,e,true)}});bv._submit_attached=true}})},teardown:function(){if(b.nodeName(this,"form")){return false}b.event.remove(this,"._submit")}}}if(!b.support.changeBubbles){b.event.special.change={setup:function(){if(bd.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){b.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});b.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false;b.event.simulate("change",this,e,true)}})}return false}b.event.add(this,"beforeactivate._change",function(bw){var bv=bw.target;if(bd.test(bv.nodeName)&&!bv._change_attached){b.event.add(bv,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){b.event.simulate("change",this.parentNode,e,true)}});bv._change_attached=true}})},handle:function(bv){var e=bv.target;if(this!==e||bv.isSimulated||bv.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return bv.handleObj.handler.apply(this,arguments)}},teardown:function(){b.event.remove(this,"._change");return bd.test(this.nodeName)}}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bx,e){var bv=0,bw=function(by){b.event.simulate(e,by.target,b.event.fix(by),true)};b.event.special[e]={setup:function(){if(bv++===0){av.addEventListener(bx,bw,true)}},teardown:function(){if(--bv===0){av.removeEventListener(bx,bw,true)}}}})}b.fn.extend({on:function(bw,e,bz,by,bv){var bA,bx;if(typeof bw==="object"){if(typeof e!=="string"){bz=e;e=L}for(bx in bw){this.on(bx,e,bz,bw[bx],bv)}return this}if(bz==null&&by==null){by=e;bz=e=L}else{if(by==null){if(typeof e==="string"){by=bz;bz=L}else{by=bz;bz=e;e=L}}}if(by===false){by=bk}else{if(!by){return this}}if(bv===1){bA=by;by=function(bB){b().off(bB);return bA.apply(this,arguments)};by.guid=bA.guid||(bA.guid=b.guid++)}return this.each(function(){b.event.add(this,bw,by,bz,e)})},one:function(bv,e,bx,bw){return this.on.call(this,bv,e,bx,bw,1)},off:function(bw,e,by){if(bw&&bw.preventDefault&&bw.handleObj){var bv=bw.handleObj;b(bw.delegateTarget).off(bv.namespace?bv.type+"."+bv.namespace:bv.type,bv.selector,bv.handler);return this}if(typeof bw==="object"){for(var bx in bw){this.off(bx,e,bw[bx])}return this}if(e===false||typeof e==="function"){by=e;e=L}if(by===false){by=bk}return this.each(function(){b.event.remove(this,bw,by,e)})},bind:function(e,bw,bv){return this.on(e,null,bw,bv)},unbind:function(e,bv){return this.off(e,null,bv)},live:function(e,bw,bv){b(this.context).on(e,this.selector,bw,bv);return this},die:function(e,bv){b(this.context).off(e,this.selector||"**",bv);return this},delegate:function(e,bv,bx,bw){return this.on(bv,e,bx,bw)},undelegate:function(e,bv,bw){return arguments.length==1?this.off(e,"**"):this.off(bv,e,bw)},trigger:function(e,bv){return this.each(function(){b.event.trigger(e,bv,this)})},triggerHandler:function(e,bv){if(this[0]){return b.event.trigger(e,bv,this[0],true)}},toggle:function(bx){var bv=arguments,e=bx.guid||b.guid++,bw=0,by=function(bz){var bA=(b._data(this,"lastToggle"+bx.guid)||0)%bw;b._data(this,"lastToggle"+bx.guid,bA+1);bz.preventDefault();return bv[bA].apply(this,arguments)||false};by.guid=e;while(bw<bv.length){bv[bw++].guid=e}return this.click(by)},hover:function(e,bv){return this.mouseenter(e).mouseleave(bv||e)}});b.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(bv,e){b.fn[e]=function(bx,bw){if(bw==null){bw=bx;bx=null}return arguments.length>0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}});
/*!
* Sizzle CSS Selector Engine
* More information: path_to_url
*/
(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e<bR.length;e++){if(bR[e]===bR[e-1]){bR.splice(e--,1)}}}}return bR};by.matches=function(e,bR){return by(e,null,null,bR)};by.matchesSelector=function(e,bR){return by(bR,null,null,[e]).length>0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS<bU;bS++){bV=bE.order[bS];if((bT=bE.leftMatch[bV].exec(bX))){bR=bT[1];bT.splice(1,1);if(bR.substr(bR.length-1)!=="\\"){bT[1]=(bT[1]||"").replace(bK,"");bW=bE.find[bV](bT,e,bY);if(bW!=null){bX=bX.replace(bE.match[bV],"");break}}}}if(!bW){bW=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bW,expr:bX}};by.filter=function(b1,b0,b4,bU){var bW,e,bZ,b6,b3,bR,bT,bV,b2,bS=b1,b5=[],bY=b0,bX=b0&&b0[0]&&by.isXML(b0[0]);while(b1&&b0.length){for(bZ in bE.filter){if((bW=bE.leftMatch[bZ].exec(b1))!=null&&bW[2]){bR=bE.filter[bZ];bT=bW[1];e=false;bW.splice(1,1);if(bT.substr(bT.length-1)==="\\"){continue}if(bY===b5){b5=[]}if(bE.preFilter[bZ]){bW=bE.preFilter[bZ](bW,bY,b4,b5,bU,bX);if(!bW){e=b6=true}else{if(bW===true){continue}}}if(bW){for(bV=0;(b3=bY[bV])!=null;bV++){if(b3){b6=bR(b3,bW,bV,bY);b2=bU^b6;if(b4&&b6!=null){if(b2){e=true}else{bY[bV]=false}}else{if(b2){b5.push(b3);e=true}}}}}if(b6!==L){if(!b4){bY=b5}b1=b1.replace(bE.match[bZ],"");if(!e){return[]}break}}}if(b1===bS){if(e==null){by.error(b1)}else{break}}bS=b1}return bY};by.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var bw=by.getText=function(bU){var bS,bT,e=bU.nodeType,bR="";if(e){if(e===1||e===9){if(typeof bU.textContent==="string"){return bU.textContent}else{if(typeof bU.innerText==="string"){return bU.innerText.replace(bO,"")}else{for(bU=bU.firstChild;bU;bU=bU.nextSibling){bR+=bw(bU)}}}}else{if(e===3||e===4){return bU.nodeValue}}}else{for(bS=0;(bT=bU[bS]);bS++){if(bT.nodeType!==8){bR+=bw(bT)}}}return bR};var bE=by.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bW,bR){var bT=typeof bR==="string",bV=bT&&!bQ.test(bR),bX=bT&&!bV;if(bV){bR=bR.toLowerCase()}for(var bS=0,e=bW.length,bU;bS<e;bS++){if((bU=bW[bS])){while((bU=bU.previousSibling)&&bU.nodeType!==1){}bW[bS]=bX||bU&&bU.nodeName.toLowerCase()===bR?bU||false:bU===bR}}if(bX){by.filter(bR,bW,true)}},">":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS<e;bS++){bV=bW[bS];if(bV){var bT=bV.parentNode;bW[bS]=bT.nodeName.toLowerCase()===bR?bT:false}}}else{for(;bS<e;bS++){bV=bW[bS];if(bV){bW[bS]=bU?bV.parentNode:bV.parentNode===bR}}if(bU){by.filter(bR,bW,true)}}},"":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("parentNode",bR,bS,bT,bU,bV)},"~":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("previousSibling",bR,bS,bT,bU,bV)}},find:{ID:function(bR,bS,bT){if(typeof bS.getElementById!=="undefined"&&!bT){var e=bS.getElementById(bR[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bS,bV){if(typeof bV.getElementsByName!=="undefined"){var bR=[],bU=bV.getElementsByName(bS[1]);for(var bT=0,e=bU.length;bT<e;bT++){if(bU[bT].getAttribute("name")===bS[1]){bR.push(bU[bT])}}return bR.length===0?null:bR}},TAG:function(e,bR){if(typeof bR.getElementsByTagName!=="undefined"){return bR.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bT,bR,bS,e,bW,bX){bT=" "+bT[1].replace(bK,"")+" ";if(bX){return bT}for(var bU=0,bV;(bV=bR[bU])!=null;bU++){if(bV){if(bW^(bV.className&&(" "+bV.className+" ").replace(/[\t\n\r]/g," ").indexOf(bT)>=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1
},lt:function(bS,bR,e){return bR<e[3]-0},gt:function(bS,bR,e){return bR>e[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV<bU;bV++){if(bT[bV]===bS){return false}}return true}else{by.error(e)}}}},CHILD:function(bS,bU){var bT,b0,bW,bZ,e,bV,bY,bX=bU[1],bR=bS;switch(bX){case"only":case"first":while((bR=bR.previousSibling)){if(bR.nodeType===1){return false}}if(bX==="first"){return true}bR=bS;case"last":while((bR=bR.nextSibling)){if(bR.nodeType===1){return false}}return true;case"nth":bT=bU[2];b0=bU[3];if(bT===1&&b0===0){return true}bW=bU[0];bZ=bS.parentNode;if(bZ&&(bZ[bC]!==bW||!bS.nodeIndex)){bV=0;for(bR=bZ.firstChild;bR;bR=bR.nextSibling){if(bR.nodeType===1){bR.nodeIndex=++bV}}bZ[bC]=bW}bY=bS.nodeIndex-b0;if(bT===0){return bY===0}else{return(bY%bT===0&&bY/bT>=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS<e;bS++){bR.push(bU[bS])}}else{for(;bU[bS];bS++){bR.push(bU[bS])}}}return bR}}var bJ,bG;if(av.documentElement.compareDocumentPosition){bJ=function(bR,e){if(bR===e){bB=true;return 0}if(!bR.compareDocumentPosition||!e.compareDocumentPosition){return bR.compareDocumentPosition?-1:1}return bR.compareDocumentPosition(e)&4?-1:1}}else{bJ=function(bY,bX){if(bY===bX){bB=true;return 0}else{if(bY.sourceIndex&&bX.sourceIndex){return bY.sourceIndex-bX.sourceIndex}}var bV,bR,bS=[],e=[],bU=bY.parentNode,bW=bX.parentNode,bZ=bU;if(bU===bW){return bG(bY,bX)}else{if(!bU){return -1}else{if(!bW){return 1}}}while(bZ){bS.unshift(bZ);bZ=bZ.parentNode}bZ=bW;while(bZ){e.unshift(bZ);bZ=bZ.parentNode}bV=bS.length;bR=e.length;for(var bT=0;bT<bV&&bT<bR;bT++){if(bS[bT]!==e[bT]){return bG(bS[bT],e[bT])}}return bT===bV?bG(bY,e[bT],-1):bG(bS[bT],bX,1)};bG=function(bR,e,bS){if(bR===e){return bS}var bT=bR.nextSibling;while(bT){if(bT===e){return -1}bT=bT.nextSibling}return 1}}(function(){var bR=av.createElement("div"),bS="script"+(new Date()).getTime(),e=av.documentElement;bR.innerHTML="<a name='"+bS+"'/>";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="<p class='TEST'></p>";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1&&!bY){e[bC]=bV;e.sizset=bT}if(e.nodeName.toLowerCase()===bW){bU=e;break}e=e[bR]}bZ[bT]=bU}}}function bN(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1){if(!bY){e[bC]=bV;e.sizset=bT}if(typeof bW!=="string"){if(e===bW){bU=true;break}}else{if(by.filter(bW,[e]).length>0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT<bR;bT++){by(bS,bY[bT],bX,bW)}return by.filter(bU,bX)};by.attr=b.attr;by.selectors.attrMap={};b.find=by;b.expr=by.selectors;b.expr[":"]=b.expr.filters;b.unique=by.uniqueSort;b.text=by.getText;b.isXMLDoc=by.isXML;b.contains=by.contains})();var ab=/Until$/,aq=/^(?:parents|prevUntil|prevAll)/,a9=/,/,bp=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,H=b.expr.match.POS,ay={children:true,contents:true,next:true,prev:true};b.fn.extend({find:function(e){var bw=this,by,bv;if(typeof e!=="string"){return b(e).filter(function(){for(by=0,bv=bw.length;by<bv;by++){if(b.contains(bw[by],this)){return true}}})}var bx=this.pushStack("","find",e),bA,bB,bz;for(by=0,bv=this.length;by<bv;by++){bA=bx.length;b.find(e,this[by],bx);if(by>0){for(bB=bA;bB<bx.length;bB++){for(bz=0;bz<bA;bz++){if(bx[bz]===bx[bB]){bx.splice(bB--,1);break}}}}}return bx},has:function(bv){var e=b(bv);return this.filter(function(){for(var bx=0,bw=e.length;bx<bw;bx++){if(b.contains(this,e[bx])){return true}}})},not:function(e){return this.pushStack(aG(this,e,false),"not",e)},filter:function(e){return this.pushStack(aG(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?H.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw<by.length;bw++){if(b(bz).is(by[bw])){bv.push({selector:by[bw],elem:bz,level:bB})}}bz=bz.parentNode;bB++}return bv}var bA=H.test(by)||typeof by!=="string"?b(by,bx||this.context):0;for(bw=0,e=this.length;bw<e;bw++){bz=this[bw];while(bz){if(bA?bA.index(bz)>-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/<tbody/i,W=/<|&#?\w+;/,ae=/<(?:script|style)/i,O=/<(?:script|object|embed|option|style)/i,ah=new RegExp("<(?:"+aR+")","i"),o=/checked\s*(?:[^=]|=\s*.checked.)/i,bm=/\/(java|ecma)script/i,aN=/^\s*<!(?:\[CDATA\[|\-\-)/,ax={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ac=a(av);
ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div<div>","</div>"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1></$2>");try{for(var bw=0,bv=this.length;bw<bv;bw++){if(this[bw].nodeType===1){b.cleanData(this[bw].getElementsByTagName("*"));this[bw].innerHTML=bx}}}catch(by){this.empty().append(bx)}}else{if(b.isFunction(bx)){this.each(function(bz){var e=b(this);e.html(bx.call(this,bz,e.html()))})}else{this.empty().append(bx)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(b.isFunction(e)){return this.each(function(bx){var bw=b(this),bv=bw.html();bw.replaceWith(e.call(this,bx,bv))})}if(typeof e!=="string"){e=b(e).detach()}return this.each(function(){var bw=this.nextSibling,bv=this.parentNode;b(this).remove();if(bw){b(bw).before(e)}else{b(bv).append(e)}})}else{return this.length?this.pushStack(b(b.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bB,bF,bE){var bx,by,bA,bD,bC=bB[0],bv=[];if(!b.support.checkClone&&arguments.length===3&&typeof bC==="string"&&o.test(bC)){return this.each(function(){b(this).domManip(bB,bF,bE,true)})}if(b.isFunction(bC)){return this.each(function(bH){var bG=b(this);bB[0]=bC.call(this,bH,bF?bG.html():L);bG.domManip(bB,bF,bE)})}if(this[0]){bD=bC&&bC.parentNode;if(b.support.parentNode&&bD&&bD.nodeType===11&&bD.childNodes.length===this.length){bx={fragment:bD}}else{bx=b.buildFragment(bB,this,bv)}bA=bx.fragment;if(bA.childNodes.length===1){by=bA=bA.firstChild}else{by=bA.firstChild}if(by){bF=bF&&b.nodeName(by,"tr");for(var bw=0,e=this.length,bz=e-1;bw<e;bw++){bE.call(bF?ba(this[bw],by):this[bw],bx.cacheable||(e>1&&bw<bz)?b.clone(bA,true,true):bA)}}if(bv.length){b.each(bv,bo)}}return this}});function ba(e,bv){return b.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function t(bB,bv){if(bv.nodeType!==1||!b.hasData(bB)){return}var by,bx,e,bA=b._data(bB),bz=b._data(bv,bA),bw=bA.events;if(bw){delete bz.handle;bz.events={};for(by in bw){for(bx=0,e=bw[by].length;bx<e;bx++){b.event.add(bv,by+(bw[by][bx].namespace?".":"")+bw[by][bx].namespace,bw[by][bx],bw[by][bx].data)}}}if(bz.data){bz.data=b.extend({},bz.data)}}function ai(bv,e){var bw;if(e.nodeType!==1){return}if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bv)}bw=e.nodeName.toLowerCase();if(bw==="object"){e.outerHTML=bv.outerHTML}else{if(bw==="input"&&(bv.type==="checkbox"||bv.type==="radio")){if(bv.checked){e.defaultChecked=e.checked=bv.checked}if(e.value!==bv.value){e.value=bv.value}}else{if(bw==="option"){e.selected=bv.defaultSelected}else{if(bw==="input"||bw==="textarea"){e.defaultValue=bv.defaultValue}}}}e.removeAttribute(b.expando)}b.buildFragment=function(bz,bx,bv){var by,e,bw,bA,bB=bz[0];if(bx&&bx[0]){bA=bx[0].ownerDocument||bx[0]}if(!bA.createDocumentFragment){bA=av}if(bz.length===1&&typeof bB==="string"&&bB.length<512&&bA===av&&bB.charAt(0)==="<"&&!O.test(bB)&&(b.support.checkClone||!o.test(bB))&&(b.support.html5Clone||!ah.test(bB))){e=true;bw=b.fragments[bB];if(bw&&bw!==1){by=bw}}if(!by){by=bA.createDocumentFragment();b.clean(bz,bA,by,bv)}if(e){b.fragments[bB]=bw?by:1}return{fragment:by,cacheable:e}};b.fragments={};b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bv){b.fn[e]=function(bw){var bz=[],bC=b(bw),bB=this.length===1&&this[0].parentNode;if(bB&&bB.nodeType===11&&bB.childNodes.length===1&&bC.length===1){bC[bv](this[0]);return this}else{for(var bA=0,bx=bC.length;bA<bx;bA++){var by=(bA>0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1></$2>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]==="<table>"&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB<bG;bB++){E(bz[bB])}}else{E(bz)}}if(bz.nodeType){bI.push(bz)}else{bI=b.merge(bI,bz)}}if(bH){bF=function(bL){return !bL.type||bm.test(bL.type)};for(bE=0;bI[bE];bE++){if(bA&&b.nodeName(bI[bE],"script")&&(!bI[bE].type||bI[bE].type.toLowerCase()==="text/javascript")){bA.push(bI[bE].parentNode?bI[bE].parentNode.removeChild(bI[bE]):bI[bE])}else{if(bI[bE].nodeType===1){var bJ=b.grep(bI[bE].getElementsByTagName("script"),bF);bI.splice.apply(bI,[bE+1,0].concat(bJ))}bH.appendChild(bI[bE])}}}return bI},cleanData:function(bv){var by,bw,e=b.cache,bB=b.event.special,bA=b.support.deleteExpando;for(var bz=0,bx;(bx=bv[bz])!=null;bz++){if(bx.nodeName&&b.noData[bx.nodeName.toLowerCase()]){continue}bw=bx[b.expando];if(bw){by=e[bw];if(by&&by.events){for(var bC in by.events){if(bB[bC]){b.event.remove(bx,bC)}else{b.removeEvent(bx,bC,by.handle)}}if(by.handle){by.handle.elem=null}}if(bA){delete bx[b.expando]}else{if(bx.removeAttribute){bx.removeAttribute(b.expando)}}delete e[bw]}}}});function bo(e,bv){if(bv.src){b.ajax({url:bv.src,async:false,dataType:"script"})}else{b.globalEval((bv.text||bv.textContent||bv.innerHTML||"").replace(aN,"/*$0*/"))}if(bv.parentNode){bv.parentNode.removeChild(bv)}}var ak=/alpha\([^)]*\)/i,au=/opacity=([^)]*)/,z=/([A-Z]|^ms)/g,bc=/^-?\d+(?:px)?$/i,bn=/^-?\d/,I=/^([\-+])=([\-+.\de]+)/,a7={position:"absolute",visibility:"hidden",display:"block"},an=["Left","Right"],a1=["Top","Bottom"],Z,aI,aX;b.fn.css=function(e,bv){if(arguments.length===2&&bv===L){return this}return b.access(this,e,bv,true,function(bx,bw,by){return by!==L?b.style(bx,bw,by):b.css(bx,bw)})};b.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var e=Z(bw,"opacity","opacity");return e===""?"1":e}else{return bw.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bx,bw,bD,by){if(!bx||bx.nodeType===3||bx.nodeType===8||!bx.style){return}var bB,bC,bz=b.camelCase(bw),bv=bx.style,bE=b.cssHooks[bz];bw=b.cssProps[bz]||bz;if(bD!==L){bC=typeof bD;if(bC==="string"&&(bB=I.exec(bD))){bD=(+(bB[1]+1)*+bB[2])+parseFloat(b.css(bx,bw));bC="number"}if(bD==null||bC==="number"&&isNaN(bD)){return}if(bC==="number"&&!b.cssNumber[bz]){bD+="px"}if(!bE||!("set" in bE)||(bD=bE.set(bx,bD))!==L){try{bv[bw]=bD}catch(bA){}}}else{if(bE&&"get" in bE&&(bB=bE.get(bx,false,by))!==L){return bB}return bv[bw]}},css:function(by,bx,bv){var bw,e;bx=b.camelCase(bx);e=b.cssHooks[bx];bx=b.cssProps[bx]||bx;if(bx==="cssFloat"){bx="float"}if(e&&"get" in e&&(bw=e.get(by,true,bv))!==L){return bw}else{if(Z){return Z(by,bx)}}},swap:function(bx,bw,by){var e={};for(var bv in bw){e[bv]=bx.style[bv];bx.style[bv]=bw[bv]}by.call(bx);for(bv in bw){bx.style[bv]=e[bv]}}});b.curCSS=b.css;b.each(["height","width"],function(bv,e){b.cssHooks[e]={get:function(by,bx,bw){var bz;if(bx){if(by.offsetWidth!==0){return p(by,e,bw)}else{b.swap(by,a7,function(){bz=p(by,e,bw)})}return bz}},set:function(bw,bx){if(bc.test(bx)){bx=parseFloat(bx);if(bx>=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;
if(bA>0){if(bv!=="border"){for(;bx<e;bx++){if(!bv){bA-=parseFloat(b.css(by,"padding"+bz[bx]))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}else{bA-=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}}}return bA+"px"}bA=Z(by,bw,bw);if(bA<0||bA==null){bA=by.style[bw]||0}bA=parseFloat(bA)||0;if(bv){for(;bx<e;bx++){bA+=parseFloat(b.css(by,"padding"+bz[bx]))||0;if(bv!=="padding"){bA+=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}}}return bA+"px"}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bw){var bv=bw.offsetWidth,e=bw.offsetHeight;return(bv===0&&e===0)||(!b.support.reliableHiddenOffsets&&((bw.style&&bw.style.display)||b.css(bw,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var k=/%20/g,ap=/\[\]$/,bs=/\r?\n/g,bq=/#.*$/,aD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aZ=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aM=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aQ=/^(?:GET|HEAD)$/,c=/^\/\//,M=/\?/,a6=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw<bz;bw++){bv=bx[bw];bC=/^\+/.test(bv);if(bC){bv=bv.substr(1)||"*"}bB=e[bv]=e[bv]||[];bB[bC?"unshift":"push"](bA)}}}}function aW(bv,bE,bz,bD,bB,bx){bB=bB||bE.dataTypes[0];bx=bx||{};bx[bB]=true;var bA=bv[bB],bw=0,e=bA?bA.length:0,by=(bv===aa),bC;for(;bw<e&&(by||!bC);bw++){bC=bA[bw](bE,bz,bD);if(typeof bC==="string"){if(!by||bx[bC]){bC=L}else{bE.dataTypes.unshift(bC);bC=aW(bv,bE,bz,bD,bC,bx)}}}if((by||!bC)&&!bx["*"]){bC=aW(bv,bE,bz,bD,"*",bx)}return bC}function am(bw,bx){var bv,e,by=b.ajaxSettings.flatOptions||{};for(bv in bx){if(bx[bv]!==L){(by[bv]?bw:(e||(e={})))[bv]=bx[bv]}}if(e){b.extend(true,bw,e)}}b.fn.extend({load:function(bw,bz,bA){if(typeof bw!=="string"&&A){return A.apply(this,arguments)}else{if(!this.length){return this}}var by=bw.indexOf(" ");if(by>=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("<div>").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA<bw;bA++){if(bA===1){for(bE in bH.converters){if(typeof bE==="string"){bG[bE.toLowerCase()]=bH.converters[bE]}}}bx=bC;bC=bD[bA];if(bC==="*"){bC=bx}else{if(bx!=="*"&&bx!==bC){by=bx+" "+bC;bF=bG[by]||bG["* "+bC];if(!bF){e=L;for(bv in bG){bB=bv.split(" ");if(bB[0]===bx||bB[0]==="*"){e=bG[bB[1]+" "+bC];if(e){bv=bG[bv];if(bv===true){bF=e}else{if(e===true){bF=bv}}break}}}}if(!(bF||e)){b.error("No conversion from "+by.replace(" "," to "))}if(bF!==true){bz=bF?bF(bz):e(bv(bz))}}}}return bz}var aC=b.now(),u=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+(aC++)}});b.ajaxPrefilter("json jsonp",function(bD,bA,bC){var bx=bD.contentType==="application/x-www-form-urlencoded"&&(typeof bD.data==="string");if(bD.dataTypes[0]==="jsonp"||bD.jsonp!==false&&(u.test(bD.url)||bx&&u.test(bD.data))){var bB,bw=bD.jsonpCallback=b.isFunction(bD.jsonpCallback)?bD.jsonpCallback():bD.jsonpCallback,bz=bb[bw],e=bD.url,by=bD.data,bv="$1"+bw+"$2";if(bD.jsonp!==false){e=e.replace(u,bv);if(bD.url===e){if(bx){by=by.replace(u,bv)}if(bD.data===by){e+=(/\?/.test(e)?"&":"?")+bD.jsonp+"="+bw}}}bD.url=e;bD.data=by;bb[bw]=function(bE){bB=[bE]};bC.always(function(){bb[bw]=bz;if(bB&&b.isFunction(bz)){bb[bw](bB[0])}});bD.converters["script json"]=function(){if(!bB){b.error(bw+" was not called")}return bB[0]};bD.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){b.globalEval(e);return e}}});b.ajaxPrefilter("script",function(e){if(e.cache===L){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});b.ajaxTransport("script",function(bw){if(bw.crossDomain){var e,bv=av.head||av.getElementsByTagName("head")[0]||av.documentElement;return{send:function(bx,by){e=av.createElement("script");e.async="async";if(bw.scriptCharset){e.charset=bw.scriptCharset}e.src=bw.url;e.onload=e.onreadystatechange=function(bA,bz){if(bz||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bv&&e.parentNode){bv.removeChild(e)}e=L;if(!bz){by(200,"success")}}};bv.insertBefore(e,bv.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var B=bb.ActiveXObject?function(){for(var e in N){N[e](0,1)}}:false,y=0,N;function aL(){try{return new bb.XMLHttpRequest()}catch(bv){}}function aj(){try{return new bb.ActiveXObject("Microsoft.XMLHTTP")}catch(bv){}}b.ajaxSettings.xhr=bb.ActiveXObject?function(){return !this.isLocal&&aL()||aj()}:aL;(function(e){b.extend(b.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(b.ajaxSettings.xhr());if(b.support.ajax){b.ajaxTransport(function(e){if(!e.crossDomain||b.support.cors){var bv;return{send:function(bB,bw){var bA=e.xhr(),bz,by;if(e.username){bA.open(e.type,e.url,e.async,e.username,e.password)}else{bA.open(e.type,e.url,e.async)}if(e.xhrFields){for(by in e.xhrFields){bA[by]=e.xhrFields[by]}}if(e.mimeType&&bA.overrideMimeType){bA.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((e.hasContent&&e.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=L;if(bz){bA.onreadystatechange=b.noop;if(B){delete N[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}bI.text=bA.responseText;try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&e.isLocal&&!e.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!e.async||bA.readyState===4){bv()}else{bz=++y;if(B){if(!N){N={};b(bb).unload(B)}N[bz]=bv}bA.onreadystatechange=bv}},abort:function(){if(bv){bv(0,1)
}}}}})}var Q={},a8,m,aB=/^(?:toggle|show|hide)$/,aT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,a3,aH=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],a4;b.fn.extend({show:function(bx,bA,bz){var bw,by;if(bx||bx===0){return this.animate(a0("show",3),bx,bA,bz)}else{for(var bv=0,e=this.length;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(!b._data(bw,"olddisplay")&&by==="none"){by=bw.style.display=""}if(by===""&&b.css(bw,"display")==="none"){b._data(bw,"olddisplay",x(bw.nodeName))}}}for(bv=0;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(by===""||by==="none"){bw.style.display=b._data(bw,"olddisplay")||""}}}return this}},hide:function(bx,bA,bz){if(bx||bx===0){return this.animate(a0("hide",3),bx,bA,bz)}else{var bw,by,bv=0,e=this.length;for(;bv<e;bv++){bw=this[bv];if(bw.style){by=b.css(bw,"display");if(by!=="none"&&!b._data(bw,"olddisplay")){b._data(bw,"olddisplay",by)}}}for(bv=0;bv<e;bv++){if(this[bv].style){this[bv].style.display="none"}}return this}},_toggle:b.fn.toggle,toggle:function(bw,bv,bx){var e=typeof bw==="boolean";if(b.isFunction(bw)&&b.isFunction(bv)){this._toggle.apply(this,arguments)}else{if(bw==null||e){this.each(function(){var by=e?bw:b(this).is(":hidden");b(this)[by?"show":"hide"]()})}else{this.animate(a0("toggle",3),bw,bv,bx)}}return this},fadeTo:function(e,bx,bw,bv){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bx},e,bw,bv)},animate:function(bz,bw,by,bx){var e=b.speed(bw,by,bx);if(b.isEmptyObject(bz)){return this.each(e.complete,[false])}bz=b.extend({},bz);function bv(){if(e.queue===false){b._mark(this)}var bE=b.extend({},e),bK=this.nodeType===1,bI=bK&&b(this).is(":hidden"),bB,bF,bD,bJ,bH,bC,bG,bL,bA;bE.animatedProperties={};for(bD in bz){bB=b.camelCase(bD);if(bD!==bB){bz[bB]=bz[bD];delete bz[bD]}bF=bz[bB];if(b.isArray(bF)){bE.animatedProperties[bB]=bF[1];bF=bz[bB]=bF[0]}else{bE.animatedProperties[bB]=bE.specialEasing&&bE.specialEasing[bB]||bE.easing||"swing"}if(bF==="hide"&&bI||bF==="show"&&!bI){return bE.complete.call(this)}if(bK&&(bB==="height"||bB==="width")){bE.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(b.css(this,"display")==="inline"&&b.css(this,"float")==="none"){if(!b.support.inlineBlockNeedsLayout||x(this.nodeName)==="inline"){this.style.display="inline-block"}else{this.style.zoom=1}}}}if(bE.overflow!=null){this.style.overflow="hidden"}for(bD in bz){bJ=new b.fx(this,bE,bD);bF=bz[bD];if(aB.test(bF)){bA=b._data(this,"toggle"+bD)||(bF==="toggle"?bI?"show":"hide":0);if(bA){b._data(this,"toggle"+bD,bA==="show"?"hide":"show");bJ[bA]()}else{bJ[bF]()}}else{bH=aT.exec(bF);bC=bJ.cur();if(bH){bG=parseFloat(bH[2]);bL=bH[3]||(b.cssNumber[bD]?"":"px");if(bL!=="px"){b.style(this,bD,(bG||1)+bL);bC=((bG||1)/bJ.cur())*bC;b.style(this,bD,bC+bL)}if(bH[1]){bG=((bH[1]==="-="?-1:1)*bG)+bC}bJ.custom(bC,bG,bL)}else{bJ.custom(bC,bF,"")}}}return true}return e.queue===false?this.each(bv):this.queue(e.queue,bv)},stop:function(bw,bv,e){if(typeof bw!=="string"){e=bv;bv=bw;bw=L}if(bv&&bw!==false){this.queue(bw||"fx",[])}return this.each(function(){var bx,by=false,bA=b.timers,bz=b._data(this);if(!e){b._unmark(true,this)}function bB(bE,bF,bD){var bC=bF[bD];b.removeData(bE,bD,true);bC.stop(e)}if(bw==null){for(bx in bz){if(bz[bx]&&bz[bx].stop&&bx.indexOf(".run")===bx.length-4){bB(this,bz,bx)}}}else{if(bz[bx=bw+".run"]&&bz[bx].stop){bB(this,bz,bx)}}for(bx=bA.length;bx--;){if(bA[bx].elem===this&&(bw==null||bA[bx].queue===bw)){if(e){bA[bx](true)}else{bA[bx].saveState()}by=true;bA.splice(bx,1)}}if(!(e&&by)){b.dequeue(this,bw)}})}});function bh(){setTimeout(at,0);return(a4=b.now())}function at(){a4=L}function a0(bv,e){var bw={};b.each(aH.concat.apply([],aH.slice(0,e)),function(){bw[this]=bv});return bw}b.each({slideDown:a0("show",1),slideUp:a0("hide",1),slideToggle:a0("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bv){b.fn[e]=function(bw,by,bx){return this.animate(bv,bw,by,bx)}});b.extend({speed:function(bw,bx,bv){var e=bw&&typeof bw==="object"?b.extend({},bw):{complete:bv||!bv&&bx||b.isFunction(bw)&&bw,duration:bw,easing:bv&&bx||bx&&!b.isFunction(bx)&&bx};e.duration=b.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in b.fx.speeds?b.fx.speeds[e.duration]:b.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx"}e.old=e.complete;e.complete=function(by){if(b.isFunction(e.old)){e.old.call(this)}if(e.queue){b.dequeue(this,e.queue)}else{if(by!==false){b._unmark(this)}}};return e},easing:{linear:function(bw,bx,e,bv){return e+bv*bw},swing:function(bw,bx,e,bv){return((-Math.cos(bw*Math.PI)/2)+0.5)*bv+e}},timers:[],fx:function(bv,e,bw){this.options=e;this.elem=bv;this.prop=bw;e.orig=e.orig||{}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,bv=b.css(this.elem,this.prop);return isNaN(e=parseFloat(bv))?!bv||bv==="auto"?0:bv:e},custom:function(bz,by,bx){var e=this,bw=b.fx;this.startTime=a4||bh();this.end=by;this.now=this.start=bz;this.pos=this.state=0;this.unit=bx||this.unit||(b.cssNumber[this.prop]?"":"px");function bv(bA){return e.step(bA)}bv.queue=this.options.queue;bv.elem=this.elem;bv.saveState=function(){if(e.options.hide&&b._data(e.elem,"fxshow"+e.prop)===L){b._data(e.elem,"fxshow"+e.prop,e.start)}};if(bv()&&b.timers.push(bv)&&!a3){a3=setInterval(bw.tick,bw.interval)}},show:function(){var e=b._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||b.style(this.elem,this.prop);this.options.show=true;if(e!==L){this.custom(this.cur(),e)}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur())}b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b._data(this.elem,"fxshow"+this.prop)||b.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(by){var bA,bB,bv,bx=a4||bh(),e=true,bz=this.elem,bw=this.options;if(by||bx>=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e<bv.length;e++){bw=bv[e];if(!bw()&&bv[e]===bw){bv.splice(e--,1)}}if(!bv.length){b.fx.stop()}},interval:13,stop:function(){clearInterval(a3);a3=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){b.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=e.now+e.unit}else{e.elem[e.prop]=e.now}}}});b.each(["width","height"],function(e,bv){b.fx.step[bv]=function(bw){b.style(bw.elem,bv,Math.max(0,bw.now)+bw.unit)}});if(b.expr&&b.expr.filters){b.expr.filters.animated=function(e){return b.grep(b.timers,function(bv){return e===bv.elem}).length}}function x(bx){if(!Q[bx]){var e=av.body,bv=b("<"+bx+">").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b
})}})(window);
/*!
* jQuery UI 1.8.18
*
* Dual licensed under the MIT or GPL Version 2 licenses.
* path_to_url
*
* path_to_url
*/
(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h<j.length;h++){if(e.options[j[h][0]]){j[h][1].apply(e.element,f)}}}},contains:function(f,e){return document.compareDocumentPosition?f.compareDocumentPosition(e)&16:f!==e&&f.contains(e)},hasScroll:function(h,f){if(a(h).css("overflow")==="hidden"){return false}var e=(f&&f==="left")?"scrollLeft":"scrollTop",g=false;if(h[e]>0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*!
* jQuery UI Widget 1.8.18
*
* Dual licensed under the MIT or GPL Version 2 licenses.
* path_to_url
*
* path_to_url
*/
(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*!
* jQuery UI Mouse 1.8.18
*
* Dual licensed under the MIT or GPL Version 2 licenses.
* path_to_url
*
* path_to_url
*
* Depends:
* jquery.ui.widget.js
*/
(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g<l.length;g++){var j=c.trim(l[g]),e="ui-resizable-"+j;var h=c('<div class="ui-resizable-handle '+e+'"></div>');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(h<e.maxWidth){e.maxWidth=h}if(k<e.maxHeight){e.maxHeight=k}}this._vBoundaries=e},_updateCache:function(e){var f=this.options;this.offset=this.helper.offset();if(a(e.left)){this.position.left=e.left}if(a(e.top)){this.position.top=e.top}if(a(e.height)){this.size.height=e.height}if(a(e.width)){this.size.width=e.width}},_updateRatio:function(h,g){var i=this.options,j=this.position,f=this.size,e=this.axis;if(a(h.height)){h.width=(h.height*this.aspectRatio)}else{if(a(h.width)){h.height=(h.width/this.aspectRatio)}}if(e=="sw"){h.left=j.left+(f.width-h.width);h.top=null}if(e=="nw"){h.top=j.top+(f.height-h.height);h.left=j.left+(f.width-h.width)}return h},_respectSize:function(l,g){var j=this.helper,i=this._vBoundaries,r=this._aspectRatio||g.shiftKey,q=this.axis,t=a(l.width)&&i.maxWidth&&(i.maxWidth<l.width),m=a(l.height)&&i.maxHeight&&(i.maxHeight<l.height),h=a(l.width)&&i.minWidth&&(i.minWidth>l.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var e=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],j=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=c.map(e,function(l,n){var m=parseInt(l,10)||0,o=parseInt(j[n],10)||0;return m+o})}if(c.browser.msie&&!(!(c(g).is(":hidden")||c(g).parents(":hidden").length))){continue}h.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var f=this.element,i=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;
p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*!
* jQuery hashchange event - v1.3 - 7/21/2010
* path_to_url
*
* Dual licensed under the MIT and GPL licenses.
* path_to_url
*/
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);
(function(c){var a=c.scrollTo=function(f,e,d){c(window).scrollTo(f,e,d)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var e=this,d=!e.nodeName||c.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!d){return e}var f=(e.contentWindow||e).document||e.ownerDocument||e;return c.browser.safari||f.compatMode=="BackCompat"?f.body:f.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var l=this,j=c(l),k=f,i,g={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}k=c(k,this);case"object":if(k.is||k.style){i=(k=c(k)).offset()}}c.each(d.axis.split(""),function(q,r){var s=r=="x"?"Left":"Top",u=s.toLowerCase(),p="scroll"+s,o=l[p],n=a.max(l,r);if(i){g[p]=i[u]+(m?0:o-j.offset()[u]);if(d.margin){g[p]-=parseInt(k.css("margin"+s))||0;g[p]-=parseInt(k.css("border"+s+"Width"))||0}g[p]+=d.offset[u]||0;if(d.over[u]){g[p]+=k[r=="x"?"width":"height"]()*d.over[u]}}else{var t=k[u];g[p]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*n:t}if(/^\d+$/.test(g[p])){g[p]=g[p]<=0?0:Math.min(g[p],n)}if(!q&&d.queue){if(o!=g[p]){h(d.onAfterFirst)}delete g[p]}});h(d.onAfter);function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}}).end()};a.max=function(j,i){var h=i=="x"?"Width":"Height",e="scroll"+h;if(!c(j).is("html,body")){return j[e]-c(j)[h.toLowerCase()]()}var g="client"+h,f=j.ownerDocument.documentElement,d=j.ownerDocument.body;return Math.max(f[e],d[e])-Math.min(f[g],d[g])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/jquery.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 46,478 |
```javascript
var annotated =
[
[ "arm_nn_double", "structarm__nn__double.html", "structarm__nn__double" ],
[ "arm_nn_long_long", "unionarm__nn__long__long.html", "unionarm__nn__long__long" ],
[ "arm_nnword", "unionarm__nnword.html", "unionarm__nnword" ],
[ "cmsis_nn_activation", "structcmsis__nn__activation.html", "structcmsis__nn__activation" ],
[ "cmsis_nn_context", "structcmsis__nn__context.html", "structcmsis__nn__context" ],
[ "cmsis_nn_conv_params", "structcmsis__nn__conv__params.html", "structcmsis__nn__conv__params" ],
[ "cmsis_nn_dims", "structcmsis__nn__dims.html", "structcmsis__nn__dims" ],
[ "cmsis_nn_dw_conv_params", "structcmsis__nn__dw__conv__params.html", "structcmsis__nn__dw__conv__params" ],
[ "cmsis_nn_fc_params", "structcmsis__nn__fc__params.html", "structcmsis__nn__fc__params" ],
[ "cmsis_nn_per_channel_quant_params", "structcmsis__nn__per__channel__quant__params.html", "structcmsis__nn__per__channel__quant__params" ],
[ "cmsis_nn_per_tensor_quant_params", "structcmsis__nn__per__tensor__quant__params.html", "structcmsis__nn__per__tensor__quant__params" ],
[ "cmsis_nn_pool_params", "structcmsis__nn__pool__params.html", "structcmsis__nn__pool__params" ],
[ "cmsis_nn_softmax_lut_s16", "structcmsis__nn__softmax__lut__s16.html", "structcmsis__nn__softmax__lut__s16" ],
[ "cmsis_nn_svdf_params", "structcmsis__nn__svdf__params.html", "structcmsis__nn__svdf__params" ],
[ "cmsis_nn_tile", "structcmsis__nn__tile.html", "structcmsis__nn__tile" ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/annotated.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 497 |
```javascript
function toggleVisibility(linkObj)
{
var base = $(linkObj).attr('id');
var summary = $('#'+base+'-summary');
var content = $('#'+base+'-content');
var trigger = $('#'+base+'-trigger');
var src=$(trigger).attr('src');
if (content.is(':visible')===true) {
content.hide();
summary.show();
$(linkObj).addClass('closed').removeClass('opened');
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
content.show();
summary.hide();
$(linkObj).removeClass('closed').addClass('opened');
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
}
return false;
}
function updateStripes()
{
$('table.directory tr').
removeClass('even').filter(':visible:even').addClass('even');
}
function toggleLevel(level)
{
$('table.directory tr').each(function(){
var l = this.id.split('_').length-1;
var i = $('#img'+this.id.substring(3));
var a = $('#arr'+this.id.substring(3));
if (l<level+1) {
i.attr('src','ftv2folderopen.png');
a.attr('src','ftv2mnode.png');
$(this).show();
} else if (l==level+1) {
i.attr('src','ftv2folderclosed.png');
a.attr('src','ftv2pnode.png');
$(this).show();
} else {
$(this).hide();
}
});
updateStripes();
}
function toggleFolder(id)
{
//The clicked row
var currentRow = $('#row_'+id);
var currentRowImages = currentRow.find("img");
//All rows after the clicked row
var rows = currentRow.nextAll("tr");
//Only match elements AFTER this one (can't hide elements before)
var childRows = rows.filter(function() {
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
return this.id.match(re);
});
//First row is visible we are HIDING
if (childRows.filter(':first').is(':visible')===true) {
currentRowImages.filter("[id^=arr]").attr('src', 'ftv2pnode.png');
currentRowImages.filter("[id^=img]").attr('src', 'ftv2folderclosed.png');
rows.filter("[id^=row_"+id+"]").hide();
} else { //We are SHOWING
//All sub images
var childImages = childRows.find("img");
var childImg = childImages.filter("[id^=img]");
var childArr = childImages.filter("[id^=arr]");
currentRow.find("[id^=arr]").attr('src', 'ftv2mnode.png'); //open row
currentRow.find("[id^=img]").attr('src', 'ftv2folderopen.png'); //open row
childImg.attr('src','ftv2folderclosed.png'); //children closed
childArr.attr('src','ftv2pnode.png'); //children closed
childRows.show(); //show all children
}
updateStripes();
}
function toggleInherit(id)
{
var rows = $('tr.inherit.'+id);
var img = $('tr.inherit_header.'+id+' img');
var src = $(img).attr('src');
if (rows.filter(':first').is(':visible')===true) {
rows.css('display','none');
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
rows.css('display','table-row'); // using show() causes jump in firefox
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/dynsections.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 850 |
```javascript
var cookie_namespace = 'doxygen';
var sidenav,navtree,content,header;
function readCookie(cookie)
{
var myCookie = cookie_namespace+"_"+cookie+"=";
if (document.cookie)
{
var index = document.cookie.indexOf(myCookie);
if (index != -1)
{
var valStart = index + myCookie.length;
var valEnd = document.cookie.indexOf(";", valStart);
if (valEnd == -1)
{
valEnd = document.cookie.length;
}
var val = document.cookie.substring(valStart, valEnd);
return val;
}
}
return 0;
}
function writeCookie(cookie, val, expiration)
{
if (val==undefined) return;
if (expiration == null)
{
var date = new Date();
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
expiration = date.toGMTString();
}
document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/";
}
function resizeWidth()
{
var windowWidth = $(window).width() + "px";
var sidenavWidth = $(sidenav).outerWidth();
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
writeCookie('width',sidenavWidth, null);
}
function restoreWidth(navWidth)
{
var windowWidth = $(window).width() + "px";
content.css({marginLeft:parseInt(navWidth)+6+"px"});
sidenav.css({width:navWidth + "px"});
}
function resizeHeight()
{
var headerHeight = header.outerHeight();
var footerHeight = footer.outerHeight();
var windowHeight = $(window).height() - headerHeight - footerHeight;
content.css({height:windowHeight + "px"});
navtree.css({height:windowHeight + "px"});
sidenav.css({height:windowHeight + "px",top: headerHeight+"px"});
}
function initResizable()
{
header = $("#top");
sidenav = $("#side-nav");
content = $("#doc-content");
navtree = $("#nav-tree");
footer = $("#nav-path");
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });
$(window).resize(function() { resizeHeight(); });
var width = readCookie('width');
if (width) { restoreWidth(width); } else { resizeWidth(); }
resizeHeight();
var url = location.href;
var i=url.indexOf("#");
if (i>=0) window.location.hash=url.substr(i);
var _preventDefault = function(evt) { evt.preventDefault(); };
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
$(document).bind('touchmove',function(e){
var device = navigator.userAgent.toLowerCase();
var ios = device.match(/(iphone|ipod|ipad)/);
if (ios) {
try {
var target = e.target;
while (target) {
if ($(target).css('-webkit-overflow-scrolling')=='touch') return;
target = target.parentNode;
}
e.preventDefault();
} catch(err) {
e.preventDefault();
}
}
});
}
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/resize.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 718 |
```javascript
var structcmsis__nn__per__channel__quant__params =
[
[ "multiplier", "structcmsis__nn__per__channel__quant__params.html#a33b4a56acc8ffaa077f7db31b001e5bd", null ],
[ "shift", "structcmsis__nn__per__channel__quant__params.html#a281dfde55f7a87b39a4a2c2c0362c813", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__per__channel__quant__params.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 107 |
```css
#nav-tree .children_ul {
margin:0;
padding:4px;
}
#nav-tree ul {
list-style:none outside none;
margin:0px;
padding:0px;
}
#nav-tree li {
white-space:nowrap;
margin:0px;
padding:0px;
}
#nav-tree .plus {
margin:0px;
}
#nav-tree .selected {
background-image: url('tab_a.png');
background-repeat:repeat-x;
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
}
#nav-tree img {
margin:0px;
padding:0px;
border:0px;
vertical-align: middle;
}
#nav-tree a {
text-decoration:none;
padding:0px;
margin:0px;
outline:none;
}
#nav-tree .label {
margin:0px;
padding:0px;
font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
}
#nav-tree .label a {
padding:2px;
}
#nav-tree .selected a {
text-decoration:none;
color:#fff;
}
#nav-tree .children_ul {
margin:0px;
padding:0px;
}
#nav-tree .item {
margin:0px;
padding:0px;
}
#nav-tree {
padding: 0px 0px;
background-color: #FAFAFF;
font-size:14px;
overflow:auto;
}
#doc-content {
overflow:auto;
display:block;
padding:0px;
margin:0px;
-webkit-overflow-scrolling : touch; /* iOS 5+ */
}
#side-nav {
padding:0 6px 0 0;
margin: 0px;
display:block;
position: absolute;
left: 0px;
width: 250px;
}
.ui-resizable .ui-resizable-handle {
display:block;
}
.ui-resizable-e {
background:url("ftv2splitbar.png") repeat scroll right center transparent;
cursor:e-resize;
height:100%;
right:0;
top:0;
width:6px;
}
.ui-resizable-handle {
display:none;
font-size:0.1px;
position:absolute;
z-index:1;
}
#nav-tree-contents {
margin: 6px 0px 0px 0px;
}
#nav-tree {
background-image:url('nav_h.png');
background-repeat:repeat-x;
background-color: #F9FAFC;
-webkit-overflow-scrolling : touch; /* iOS 5+ */
}
#nav-sync {
position:absolute;
top:5px;
right:24px;
z-index:0;
}
#nav-sync img {
opacity:0.3;
}
#nav-sync img:hover {
opacity:0.9;
}
@media print
{
#nav-tree { display: none; }
div.ui-resizable-handle { display: none; position: relative; }
}
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/navtree.css | css | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 680 |
```javascript
var structcmsis__nn__conv__params =
[
[ "activation", "structcmsis__nn__conv__params.html#a37811f827c8b46689a0627b54043650c", null ],
[ "dilation", "structcmsis__nn__conv__params.html#a2b324f59f5ac0ec98f885a1a28514e75", null ],
[ "input_offset", "structcmsis__nn__conv__params.html#ac284274c0aa03b1a0bcc0a93b275eadd", null ],
[ "output_offset", "structcmsis__nn__conv__params.html#aa917be27492df19f6382df8d1d78870a", null ],
[ "padding", "structcmsis__nn__conv__params.html#a0dd7826503a39d346ab260fa042ea525", null ],
[ "stride", "structcmsis__nn__conv__params.html#a9ccfc682bff157a5e951b2ffba6d672c", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__conv__params.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 242 |
```javascript
var structcmsis__nn__context =
[
[ "buf", "structcmsis__nn__context.html#a3e613ad30f12df59853a1b3565212702", null ],
[ "size", "structcmsis__nn__context.html#a7ad7f9757c6f2623e65306924367e82a", null ]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/structcmsis__nn__context.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 84 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CMSIS NN Software Library</title>
<title>CMSIS-NN: CMSIS NN Software Library</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<script type="text/javascript" src="cmsis_footer.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<!-- link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script -->
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-NN
 <span id="projectnumber">Version 4.0.0</span>
</div>
<div id="projectbrief">CMSIS NN Software Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="index.html"><span>Main Page</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('index.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div class="header">
<div class="headertitle">
<div class="title">CMSIS NN Software Library </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">
<p><b>CMSIS-NN</b> is now in its GitHub project at <a href="path_to_url" target="_blank">ARM-software/CMSIS-NN</a>.</p>
Content of this documentation is now <a href="path_to_url" target="_blank"><b>provided here</b></a> and individual pages are redirected to the corresponding pages in CMSIS-NN documentation.
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">
<script type="text/javascript">
<!--
writeFooter.call(this);
//-->
</script>
</li>
</ul>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/NN/html/index.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 942 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<title>Redirect to the corresponding Open-CMSIS-Pack page after 0 seconds</title>
<meta http-equiv="refresh" content="0; URL=path_to_url">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If the automatic redirection is failing, click <a href="path_to_url">here</a> or try to find corresponding topic described in <a href="path_to_url">Open-CMSIS-Pack resources</a>.
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/Pack/html/cp_ZIPTool.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 134 |
```javascript
var NAVTREE =
[
[ "CMSIS-Pack", "index.html"]
];
var NAVTREEINDEX =
[
"index.html"
];
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var navTreeSubIndices = new Array();
function getData(varName)
{
var i = varName.lastIndexOf('/');
var n = i>=0 ? varName.substring(i+1) : varName;
return eval(n.replace(/\-/g,'_'));
}
function stripPath(uri)
{
return uri.substring(uri.lastIndexOf('/')+1);
}
function stripPath2(uri)
{
var i = uri.lastIndexOf('/');
var s = uri.substring(i+1);
var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
return m ? uri.substring(i-6) : s;
}
function localStorageSupported()
{
try {
return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
}
catch(e) {
return false;
}
}
function storeLink(link)
{
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
window.localStorage.setItem('navpath',link);
}
}
function deleteLink()
{
if (localStorageSupported()) {
window.localStorage.setItem('navpath','');
}
}
function cachedLink()
{
if (localStorageSupported()) {
return window.localStorage.getItem('navpath');
} else {
return '';
}
}
function getScript(scriptName,func,show)
{
var head = document.getElementsByTagName("head")[0];
var script = document.createElement('script');
script.id = scriptName;
script.type = 'text/javascript';
script.onload = func;
script.src = scriptName+'.js';
if ($.browser.msie && $.browser.version<=8) {
// script.onload does not work with older versions of IE
script.onreadystatechange = function() {
if (script.readyState=='complete' || script.readyState=='loaded') {
func(); if (show) showRoot();
}
}
}
head.appendChild(script);
}
function createIndent(o,domNode,node,level)
{
var level=-1;
var n = node;
while (n.parentNode) { level++; n=n.parentNode; }
if (node.childrenData) {
var imgNode = document.createElement("img");
imgNode.style.paddingLeft=(16*level).toString()+'px';
imgNode.width = 16;
imgNode.height = 22;
imgNode.border = 0;
node.plus_img = imgNode;
node.expandToggle = document.createElement("a");
node.expandToggle.href = "javascript:void(0)";
node.expandToggle.onclick = function() {
if (node.expanded) {
$(node.getChildrenUL()).slideUp("fast");
node.plus_img.src = node.relpath+"ftv2pnode.png";
node.expanded = false;
} else {
expandNode(o, node, false, false);
}
}
node.expandToggle.appendChild(imgNode);
domNode.appendChild(node.expandToggle);
imgNode.src = node.relpath+"ftv2pnode.png";
} else {
var span = document.createElement("span");
span.style.display = 'inline-block';
span.style.width = 16*(level+1)+'px';
span.style.height = '22px';
span.innerHTML = ' ';
domNode.appendChild(span);
}
}
var animationInProgress = false;
function gotoAnchor(anchor,aname,updateLocation)
{
var pos, docContent = $('#doc-content');
if (anchor.parent().attr('class')=='memItemLeft' ||
anchor.parent().attr('class')=='fieldtype' ||
anchor.parent().is(':header'))
{
pos = anchor.parent().position().top;
} else if (anchor.position()) {
pos = anchor.position().top;
}
if (pos) {
var dist = Math.abs(Math.min(
pos-docContent.offset().top,
docContent[0].scrollHeight-
docContent.height()-docContent.scrollTop()));
animationInProgress=true;
docContent.animate({
scrollTop: pos + docContent.scrollTop() - docContent.offset().top
},Math.max(50,Math.min(500,dist)),function(){
if (updateLocation) window.location.href=aname;
animationInProgress=false;
});
}
}
function newNode(o, po, text, link, childrenData, lastNode)
{
var node = new Object();
node.children = Array();
node.childrenData = childrenData;
node.depth = po.depth + 1;
node.relpath = po.relpath;
node.isLast = lastNode;
node.li = document.createElement("li");
po.getChildrenUL().appendChild(node.li);
node.parentNode = po;
node.itemDiv = document.createElement("div");
node.itemDiv.className = "item";
node.labelSpan = document.createElement("span");
node.labelSpan.className = "label";
createIndent(o,node.itemDiv,node,0);
node.itemDiv.appendChild(node.labelSpan);
node.li.appendChild(node.itemDiv);
var a = document.createElement("a");
node.labelSpan.appendChild(a);
node.label = document.createTextNode(text);
node.expanded = false;
a.appendChild(node.label);
if (link) {
var url;
if (link.substring(0,1)=='^') {
url = link.substring(1);
link = url;
} else {
url = node.relpath+link;
}
a.className = stripPath(link.replace('#',':'));
if (link.indexOf('#')!=-1) {
var aname = '#'+link.split('#')[1];
var srcPage = stripPath($(location).attr('pathname'));
var targetPage = stripPath(link.split('#')[0]);
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
a.onclick = function(){
storeLink(link);
if (!$(a).parent().parent().hasClass('selected'))
{
$('.item').removeClass('selected');
$('.item').removeAttr('id');
$(a).parent().parent().addClass('selected');
$(a).parent().parent().attr('id','selected');
}
var anchor = $(aname);
gotoAnchor(anchor,aname,true);
};
} else {
a.href = url;
a.onclick = function() { storeLink(link); }
}
} else {
if (childrenData != null)
{
a.className = "nolink";
a.href = "javascript:void(0)";
a.onclick = node.expandToggle.onclick;
}
}
node.childrenUL = null;
node.getChildrenUL = function() {
if (!node.childrenUL) {
node.childrenUL = document.createElement("ul");
node.childrenUL.className = "children_ul";
node.childrenUL.style.display = "none";
node.li.appendChild(node.childrenUL);
}
return node.childrenUL;
};
return node;
}
function showRoot()
{
var headerHeight = $("#top").height();
var footerHeight = $("#nav-path").height();
var windowHeight = $(window).height() - headerHeight - footerHeight;
(function (){ // retry until we can scroll to the selected item
try {
var navtree=$('#nav-tree');
navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
} catch (err) {
setTimeout(arguments.callee, 0);
}
})();
}
function expandNode(o, node, imm, showRoot)
{
if (node.childrenData && !node.expanded) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
expandNode(o, node, imm, showRoot);
}, showRoot);
} else {
if (!node.childrenVisited) {
getNode(o, node);
} if (imm || ($.browser.msie && $.browser.version>8)) {
// somehow slideDown jumps to the start of tree for IE9 :-(
$(node.getChildrenUL()).show();
} else {
$(node.getChildrenUL()).slideDown("fast");
}
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
}
}
}
function glowEffect(n,duration)
{
n.addClass('glow').delay(duration).queue(function(next){
$(this).removeClass('glow');next();
});
}
function highlightAnchor()
{
var aname = $(location).attr('hash');
var anchor = $(aname);
if (anchor.parent().attr('class')=='memItemLeft'){
var rows = $('.memberdecls tr[class$="'+
window.location.hash.substring(1)+'"]');
glowEffect(rows.children(),300); // member without details
} else if (anchor.parents().slice(2).prop('tagName')=='TR') {
glowEffect(anchor.parents('div.memitem'),1000); // enum value
} else if (anchor.parent().attr('class')=='fieldtype'){
glowEffect(anchor.parent().parent(),1000); // struct field
} else if (anchor.parent().is(":header")) {
glowEffect(anchor.parent(),1000); // section header
} else {
glowEffect(anchor.next(),1000); // normal member
}
gotoAnchor(anchor,aname,false);
}
function selectAndHighlight(hash,n)
{
var a;
if (hash) {
var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);
a=$('.item a[class$="'+link+'"]');
}
if (a && a.length) {
a.parent().parent().addClass('selected');
a.parent().parent().attr('id','selected');
highlightAnchor();
} else if (n) {
$(n.itemDiv).addClass('selected');
$(n.itemDiv).attr('id','selected');
}
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
$('#nav-sync').css('top','30px');
} else {
$('#nav-sync').css('top','5px');
}
showRoot();
}
function showNode(o, node, index, hash)
{
if (node && node.childrenData) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
showNode(o,node,index,hash);
},true);
} else {
if (!node.childrenVisited) {
getNode(o, node);
}
$(node.getChildrenUL()).css({'display':'block'});
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
var n = node.children[o.breadcrumbs[index]];
if (index+1<o.breadcrumbs.length) {
showNode(o,n,index+1,hash);
} else {
if (typeof(n.childrenData)==='string') {
var varName = n.childrenData;
getScript(n.relpath+varName,function(){
n.childrenData = getData(varName);
node.expanded=false;
showNode(o,node,index,hash); // retry with child node expanded
},true);
} else {
var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
expandNode(o, n, true, true);
}
selectAndHighlight(hash,n);
}
}
}
} else {
selectAndHighlight(hash);
}
}
function removeToInsertLater(element) {
var parentNode = element.parentNode;
var nextSibling = element.nextSibling;
parentNode.removeChild(element);
return function() {
if (nextSibling) {
parentNode.insertBefore(element, nextSibling);
} else {
parentNode.appendChild(element);
}
};
}
function getNode(o, po)
{
var insertFunction = removeToInsertLater(po.li);
po.childrenVisited = true;
var l = po.childrenData.length-1;
for (var i in po.childrenData) {
var nodeData = po.childrenData[i];
po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
i==l);
}
insertFunction();
}
function gotoNode(o,subIndex,root,hash,relpath)
{
var nti = navTreeSubIndices[subIndex][root+hash];
o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
navTo(o,NAVTREE[0][1],"",relpath);
$('.item').removeClass('selected');
$('.item').removeAttr('id');
}
if (o.breadcrumbs) {
o.breadcrumbs.unshift(0); // add 0 for root node
showNode(o, o.node, 0, hash);
}
}
function navTo(o,root,hash,relpath)
{
var link = cachedLink();
if (link) {
var parts = link.split('#');
root = parts[0];
if (parts.length>1) hash = '#'+parts[1];
else hash='';
}
if (hash.match(/^#l\d+$/)) {
var anchor=$('a[name='+hash.substring(1)+']');
glowEffect(anchor.parent(),1000); // line number
hash=''; // strip line number anchors
//root=root.replace(/_source\./,'.'); // source link to doc link
}
var url=root+hash;
var i=-1;
while (NAVTREEINDEX[i+1]<=url) i++;
if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
if (navTreeSubIndices[i]) {
gotoNode(o,i,root,hash,relpath)
} else {
getScript(relpath+'navtreeindex'+i,function(){
navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
if (navTreeSubIndices[i]) {
gotoNode(o,i,root,hash,relpath);
}
},true);
}
}
function showSyncOff(n,relpath)
{
n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
}
function showSyncOn(n,relpath)
{
n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
}
function toggleSyncButton(relpath)
{
var navSync = $('#nav-sync');
if (navSync.hasClass('sync')) {
navSync.removeClass('sync');
showSyncOff(navSync,relpath);
storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
} else {
navSync.addClass('sync');
showSyncOn(navSync,relpath);
deleteLink();
}
}
function initNavTree(toroot,relpath)
{
var o = new Object();
o.toroot = toroot;
o.node = new Object();
o.node.li = document.getElementById("nav-tree-contents");
o.node.childrenData = NAVTREE;
o.node.children = new Array();
o.node.childrenUL = document.createElement("ul");
o.node.getChildrenUL = function() { return o.node.childrenUL; };
o.node.li.appendChild(o.node.childrenUL);
o.node.depth = 0;
o.node.relpath = relpath;
o.node.expanded = false;
o.node.isLast = true;
o.node.plus_img = document.createElement("img");
o.node.plus_img.src = relpath+"ftv2pnode.png";
o.node.plus_img.width = 16;
o.node.plus_img.height = 22;
if (localStorageSupported()) {
var navSync = $('#nav-sync');
if (cachedLink()) {
showSyncOff(navSync,relpath);
navSync.removeClass('sync');
} else {
showSyncOn(navSync,relpath);
}
navSync.click(function(){ toggleSyncButton(relpath); });
}
$(window).load(function(){
navTo(o,toroot,window.location.hash,relpath);
showRoot();
});
$(window).bind('hashchange', function(){
if (window.location.hash && window.location.hash.length>1){
var a;
if ($(location).attr('hash')){
var clslink=stripPath($(location).attr('pathname'))+':'+
$(location).attr('hash').substring(1);
a=$('.item a[class$="'+clslink+'"]');
}
if (a==null || !$(a).parent().parent().hasClass('selected')){
$('.item').removeClass('selected');
$('.item').removeAttr('id');
}
var link=stripPath2($(location).attr('pathname'));
navTo(o,link,$(location).attr('hash'),relpath);
} else if (!animationInProgress) {
$('#doc-content').scrollTop(0);
$('.item').removeClass('selected');
$('.item').removeAttr('id');
navTo(o,toroot,window.location.hash,relpath);
}
})
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Pack/html/navtree.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 3,872 |
```javascript
var NAVTREEINDEX0 =
{
};
``` | /content/code_sandbox/CMSIS/DoxyGen/Pack/html/navtreeindex0.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 9 |
```javascript
function writeFooter() {
document.write('Generated on Wed Apr 13 2022 14:13:49 for CMSIS-Pack Version 1.7.2 by Arm Ltd. All rights reserved.');
};
``` | /content/code_sandbox/CMSIS/DoxyGen/Pack/html/cmsis_footer.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 46 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Main Page</title>
<title>CMSIS-Pack: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<script type="text/javascript" src="cmsis_footer.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-Pack
 <span id="projectnumber">Version 1.7.2</span>
</div>
<div id="projectbrief">Delivery Mechanism for Software Packs</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Usage and Description</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('index.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">CMSIS-Pack Documentation</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><b>CMSIS-Pack</b> is now part of the <b>Open-CMSIS-Pack</b> project at <a href="path_to_url" target="_blank">www.open-cmsis-pack.org</a>.</p>
Content of this documentation is now <a href="path_to_url" target="_blank"><b>provided here</b></a> and individual pages are redirected to the corresponding pages in Open-CMSIS-Pack specification.
</div></div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/Pack/html/index.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,287 |
```javascript
// Search script generated by doxygen
// The code in this file is loosly based on main.js, part of Natural Docs,
// Natural Docs is licensed under the GPL.
var indexSectionsWithContent =
{
0: "abcdfioprsuxz",
1: "abcdfioprsuxz"
};
var indexSectionNames =
{
0: "all",
1: "pages"
};
function convertToId(search)
{
var result = '';
for (i=0;i<search.length;i++)
{
var c = search.charAt(i);
var cn = c.charCodeAt(0);
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
{
result+=c;
}
else if (cn<16)
{
result+="_0"+cn.toString(16);
}
else
{
result+="_"+cn.toString(16);
}
}
return result;
}
function getXPos(item)
{
var x = 0;
if (item.offsetWidth)
{
while (item && item!=document.body)
{
x += item.offsetLeft;
item = item.offsetParent;
}
}
return x;
}
function getYPos(item)
{
var y = 0;
if (item.offsetWidth)
{
while (item && item!=document.body)
{
y += item.offsetTop;
item = item.offsetParent;
}
}
return y;
}
/* A class handling everything associated with the search panel.
Parameters:
name - The name of the global variable that will be
storing this instance. Is needed to be able to set timeouts.
resultPath - path to use for external files
*/
function SearchBox(name, resultsPath, inFrame, label)
{
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
// ---------- Instance variables
this.name = name;
this.resultsPath = resultsPath;
this.keyTimeout = 0;
this.keyTimeoutLength = 500;
this.closeSelectionTimeout = 300;
this.lastSearchValue = "";
this.lastResultsPage = "";
this.hideTimeout = 0;
this.searchIndex = 0;
this.searchActive = false;
this.insideFrame = inFrame;
this.searchLabel = label;
// ----------- DOM Elements
this.DOMSearchField = function()
{ return document.getElementById("MSearchField"); }
this.DOMSearchSelect = function()
{ return document.getElementById("MSearchSelect"); }
this.DOMSearchSelectWindow = function()
{ return document.getElementById("MSearchSelectWindow"); }
this.DOMPopupSearchResults = function()
{ return document.getElementById("MSearchResults"); }
this.DOMPopupSearchResultsWindow = function()
{ return document.getElementById("MSearchResultsWindow"); }
this.DOMSearchClose = function()
{ return document.getElementById("MSearchClose"); }
this.DOMSearchBox = function()
{ return document.getElementById("MSearchBox"); }
// ------------ Event Handlers
// Called when focus is added or removed from the search field.
this.OnSearchFieldFocus = function(isActive)
{
this.Activate(isActive);
}
this.OnSearchSelectShow = function()
{
var searchSelectWindow = this.DOMSearchSelectWindow();
var searchField = this.DOMSearchSelect();
if (this.insideFrame)
{
var left = getXPos(searchField);
var top = getYPos(searchField);
left += searchField.offsetWidth + 6;
top += searchField.offsetHeight;
// show search selection popup
searchSelectWindow.style.display='block';
left -= searchSelectWindow.offsetWidth;
searchSelectWindow.style.left = left + 'px';
searchSelectWindow.style.top = top + 'px';
}
else
{
var left = getXPos(searchField);
var top = getYPos(searchField);
top += searchField.offsetHeight;
// show search selection popup
searchSelectWindow.style.display='block';
searchSelectWindow.style.left = left + 'px';
searchSelectWindow.style.top = top + 'px';
}
// stop selection hide timer
if (this.hideTimeout)
{
clearTimeout(this.hideTimeout);
this.hideTimeout=0;
}
return false; // to avoid "image drag" default event
}
this.OnSearchSelectHide = function()
{
this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
this.closeSelectionTimeout);
}
// Called when the content of the search field is changed.
this.OnSearchFieldChange = function(evt)
{
if (this.keyTimeout) // kill running timer
{
clearTimeout(this.keyTimeout);
this.keyTimeout = 0;
}
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==40 || e.keyCode==13)
{
if (e.shiftKey==1)
{
this.OnSearchSelectShow();
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
child.focus();
return;
}
}
return;
}
else if (window.frames.MSearchResults.searchResults)
{
var elem = window.frames.MSearchResults.searchResults.NavNext(0);
if (elem) elem.focus();
}
}
else if (e.keyCode==27) // Escape out of the search field
{
this.DOMSearchField().blur();
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.lastSearchValue = '';
this.Activate(false);
return;
}
// strip whitespaces
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
if (searchValue != this.lastSearchValue) // search value has changed
{
if (searchValue != "") // non-empty search
{
// set timer for search update
this.keyTimeout = setTimeout(this.name + '.Search()',
this.keyTimeoutLength);
}
else // empty search field
{
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.lastSearchValue = '';
}
}
}
this.SelectItemCount = function(id)
{
var count=0;
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
count++;
}
}
return count;
}
this.SelectItemSet = function(id)
{
var i,j=0;
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
var node = child.firstChild;
if (j==id)
{
node.innerHTML='•';
}
else
{
node.innerHTML=' ';
}
j++;
}
}
}
// Called when an search filter selection is made.
// set item with index id as the active item
this.OnSelectItem = function(id)
{
this.searchIndex = id;
this.SelectItemSet(id);
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
if (searchValue!="" && this.searchActive) // something was found -> do a search
{
this.Search();
}
}
this.OnSearchSelectKey = function(evt)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
{
this.searchIndex++;
this.OnSelectItem(this.searchIndex);
}
else if (e.keyCode==38 && this.searchIndex>0) // Up
{
this.searchIndex--;
this.OnSelectItem(this.searchIndex);
}
else if (e.keyCode==13 || e.keyCode==27)
{
this.OnSelectItem(this.searchIndex);
this.CloseSelectionWindow();
this.DOMSearchField().focus();
}
return false;
}
// --------- Actions
// Closes the results window.
this.CloseResultsWindow = function()
{
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.Activate(false);
}
this.CloseSelectionWindow = function()
{
this.DOMSearchSelectWindow().style.display = 'none';
}
// Performs a search.
this.Search = function()
{
this.keyTimeout = 0;
// strip leading whitespace
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
var code = searchValue.toLowerCase().charCodeAt(0);
var idxChar = searchValue.substr(0, 1).toLowerCase();
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
{
idxChar = searchValue.substr(0, 2);
}
var resultsPage;
var resultsPageWithSearch;
var hasResultsPage;
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
if (idx!=-1)
{
var hexCode=idx.toString(16);
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
hasResultsPage = true;
}
else // nothing available for this search term
{
resultsPage = this.resultsPath + '/nomatches.html';
resultsPageWithSearch = resultsPage;
hasResultsPage = false;
}
window.frames.MSearchResults.location = resultsPageWithSearch;
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
if (domPopupSearchResultsWindow.style.display!='block')
{
var domSearchBox = this.DOMSearchBox();
this.DOMSearchClose().style.display = 'inline';
if (this.insideFrame)
{
var domPopupSearchResults = this.DOMPopupSearchResults();
domPopupSearchResultsWindow.style.position = 'relative';
domPopupSearchResultsWindow.style.display = 'block';
var width = document.body.clientWidth - 8; // the -8 is for IE :-(
domPopupSearchResultsWindow.style.width = width + 'px';
domPopupSearchResults.style.width = width + 'px';
}
else
{
var domPopupSearchResults = this.DOMPopupSearchResults();
var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
domPopupSearchResultsWindow.style.display = 'block';
left -= domPopupSearchResults.offsetWidth;
domPopupSearchResultsWindow.style.top = top + 'px';
domPopupSearchResultsWindow.style.left = left + 'px';
}
}
this.lastSearchValue = searchValue;
this.lastResultsPage = resultsPage;
}
// -------- Activation Functions
// Activates or deactivates the search panel, resetting things to
// their default values if necessary.
this.Activate = function(isActive)
{
if (isActive || // open it
this.DOMPopupSearchResultsWindow().style.display == 'block'
)
{
this.DOMSearchBox().className = 'MSearchBoxActive';
var searchField = this.DOMSearchField();
if (searchField.value == this.searchLabel) // clear "Search" term upon entry
{
searchField.value = '';
this.searchActive = true;
}
}
else if (!isActive) // directly remove the panel
{
this.DOMSearchBox().className = 'MSearchBoxInactive';
this.DOMSearchField().value = this.searchLabel;
this.searchActive = false;
this.lastSearchValue = ''
this.lastResultsPage = '';
}
}
}
// your_sha256_hash-------
// The class that handles everything on the search results page.
function SearchResults(name)
{
// The number of matches from the last run of <Search()>.
this.lastMatchCount = 0;
this.lastKey = 0;
this.repeatOn = false;
// Toggles the visibility of the passed element ID.
this.FindChildElement = function(id)
{
var parentElement = document.getElementById(id);
var element = parentElement.firstChild;
while (element && element!=parentElement)
{
if (element.nodeName == 'DIV' && element.className == 'SRChildren')
{
return element;
}
if (element.nodeName == 'DIV' && element.hasChildNodes())
{
element = element.firstChild;
}
else if (element.nextSibling)
{
element = element.nextSibling;
}
else
{
do
{
element = element.parentNode;
}
while (element && element!=parentElement && !element.nextSibling);
if (element && element!=parentElement)
{
element = element.nextSibling;
}
}
}
}
this.Toggle = function(id)
{
var element = this.FindChildElement(id);
if (element)
{
if (element.style.display == 'block')
{
element.style.display = 'none';
}
else
{
element.style.display = 'block';
}
}
}
// Searches for the passed string. If there is no parameter,
// it takes it from the URL query.
//
// Always returns true, since other documents may try to call it
// and that may or may not be possible.
this.Search = function(search)
{
if (!search) // get search word from URL
{
search = window.location.search;
search = search.substring(1); // Remove the leading '?'
search = unescape(search);
}
search = search.replace(/^ +/, ""); // strip leading spaces
search = search.replace(/ +$/, ""); // strip trailing spaces
search = search.toLowerCase();
search = convertToId(search);
var resultRows = document.getElementsByTagName("div");
var matches = 0;
var i = 0;
while (i < resultRows.length)
{
var row = resultRows.item(i);
if (row.className == "SRResult")
{
var rowMatchName = row.id.toLowerCase();
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
if (search.length<=rowMatchName.length &&
rowMatchName.substr(0, search.length)==search)
{
row.style.display = 'block';
matches++;
}
else
{
row.style.display = 'none';
}
}
i++;
}
document.getElementById("Searching").style.display='none';
if (matches == 0) // no results
{
document.getElementById("NoMatches").style.display='block';
}
else // at least one result
{
document.getElementById("NoMatches").style.display='none';
}
this.lastMatchCount = matches;
return true;
}
// return the first item with index index or higher that is visible
this.NavNext = function(index)
{
var focusItem;
while (1)
{
var focusName = 'Item'+index;
focusItem = document.getElementById(focusName);
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
{
break;
}
else if (!focusItem) // last element
{
break;
}
focusItem=null;
index++;
}
return focusItem;
}
this.NavPrev = function(index)
{
var focusItem;
while (1)
{
var focusName = 'Item'+index;
focusItem = document.getElementById(focusName);
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
{
break;
}
else if (!focusItem) // last element
{
break;
}
focusItem=null;
index--;
}
return focusItem;
}
this.ProcessKeys = function(e)
{
if (e.type == "keydown")
{
this.repeatOn = false;
this.lastKey = e.keyCode;
}
else if (e.type == "keypress")
{
if (!this.repeatOn)
{
if (this.lastKey) this.repeatOn = true;
return false; // ignore first keypress after keydown
}
}
else if (e.type == "keyup")
{
this.lastKey = 0;
this.repeatOn = false;
}
return this.lastKey!=0;
}
this.Nav = function(evt,itemIndex)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==13) return true;
if (!this.ProcessKeys(e)) return false;
if (this.lastKey==38) // Up
{
var newIndex = itemIndex-1;
var focusItem = this.NavPrev(newIndex);
if (focusItem)
{
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
if (child && child.style.display == 'block') // children visible
{
var n=0;
var tmpElem;
while (1) // search for last child
{
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
if (tmpElem)
{
focusItem = tmpElem;
}
else // found it!
{
break;
}
n++;
}
}
}
if (focusItem)
{
focusItem.focus();
}
else // return focus to search field
{
parent.document.getElementById("MSearchField").focus();
}
}
else if (this.lastKey==40) // Down
{
var newIndex = itemIndex+1;
var focusItem;
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem && elem.style.display == 'block') // children visible
{
focusItem = document.getElementById('Item'+itemIndex+'_c0');
}
if (!focusItem) focusItem = this.NavNext(newIndex);
if (focusItem) focusItem.focus();
}
else if (this.lastKey==39) // Right
{
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem) elem.style.display = 'block';
}
else if (this.lastKey==37) // Left
{
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem) elem.style.display = 'none';
}
else if (this.lastKey==27) // Escape
{
parent.searchBox.CloseResultsWindow();
parent.document.getElementById("MSearchField").focus();
}
else if (this.lastKey==13) // Enter
{
return true;
}
return false;
}
this.NavChild = function(evt,itemIndex,childIndex)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==13) return true;
if (!this.ProcessKeys(e)) return false;
if (this.lastKey==38) // Up
{
if (childIndex>0)
{
var newIndex = childIndex-1;
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
}
else // already at first child, jump to parent
{
document.getElementById('Item'+itemIndex).focus();
}
}
else if (this.lastKey==40) // Down
{
var newIndex = childIndex+1;
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
if (!elem) // last child, jump to parent next parent
{
elem = this.NavNext(itemIndex+1);
}
if (elem)
{
elem.focus();
}
}
else if (this.lastKey==27) // Escape
{
parent.searchBox.CloseResultsWindow();
parent.document.getElementById("MSearchField").focus();
}
else if (this.lastKey==13) // Enter
{
return true;
}
return false;
}
}
function setKeyActions(elem,action)
{
elem.setAttribute('onkeydown',action);
elem.setAttribute('onkeypress',action);
elem.setAttribute('onkeyup',action);
}
function setClassAttr(elem,attr)
{
elem.setAttribute('class',attr);
elem.setAttribute('className',attr);
}
function createResults()
{
var results = document.getElementById("SRResults");
for (var e=0; e<searchData.length; e++)
{
var id = searchData[e][0];
var srResult = document.createElement('div');
srResult.setAttribute('id','SR_'+id);
setClassAttr(srResult,'SRResult');
var srEntry = document.createElement('div');
setClassAttr(srEntry,'SREntry');
var srLink = document.createElement('a');
srLink.setAttribute('id','Item'+e);
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
setClassAttr(srLink,'SRSymbol');
srLink.innerHTML = searchData[e][1][0];
srEntry.appendChild(srLink);
if (searchData[e][1].length==2) // single result
{
srLink.setAttribute('href',searchData[e][1][1][0]);
if (searchData[e][1][1][1])
{
srLink.setAttribute('target','_parent');
}
var srScope = document.createElement('span');
setClassAttr(srScope,'SRScope');
srScope.innerHTML = searchData[e][1][1][2];
srEntry.appendChild(srScope);
}
else // multiple results
{
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
var srChildren = document.createElement('div');
setClassAttr(srChildren,'SRChildren');
for (var c=0; c<searchData[e][1].length-1; c++)
{
var srChild = document.createElement('a');
srChild.setAttribute('id','Item'+e+'_c'+c);
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
setClassAttr(srChild,'SRScope');
srChild.setAttribute('href',searchData[e][1][c+1][0]);
if (searchData[e][1][c+1][1])
{
srChild.setAttribute('target','_parent');
}
srChild.innerHTML = searchData[e][1][c+1][2];
srChildren.appendChild(srChild);
}
srEntry.appendChild(srChildren);
}
srResult.appendChild(srEntry);
results.appendChild(srResult);
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Pack/html/search/search.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 5,142 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/Pack/html/search/nomatches.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 117 |
```c
/**
\defgroup eth_phy_interface_gr Ethernet PHY Interface
\ingroup eth_interface_gr
\brief Driver API for Ethernet PHY Peripheral (%Driver_ETH_PHY.h)
\details The following section describes the Ethernet PHY Interface as defined in the %Driver_ETH_PHY.h header file.
The %Driver_ETH_PHY.h contains two \#defines that are used to configure the connection between the PHY and the
microcontroller device:
- \c ETH_PHY_NUM and
- \c ETH_PHY_ADDR
Usually, the Serial Management Interface (\b SMI) (using MDC and MDIO) is used to access the PHYs internal registers to read
the state of the link (up/down), duplex mode, speed, and to restart auto-negotiation etc. SMI is a serial bus, which allows
to connect up to 32 devices. Devices on the bus are accessed using a 5-bit device address. A default device address is
hardware configurable by pin-strapping on the device (some pins are sampled when a reset is asserted or at power-up).
The devices internal weak pull-up or pull-down resistors define a default device address. This address can be changed by
connecting strong pull-up or pull-down resistors externally. In this case, the \c ETH_PHY_ADDR needs to be defined by the
user.
If a microcontroller device offers more than one Ethernet PHY driver, the user needs to set the correct \c ETH_PHY_NUM in his
application.
@{
*/
/**
\struct ARM_DRIVER_ETH_PHY
\details
The functions of the Ethernet PHY are accessed by function pointers exposed by this structure. Refer to \ref DriverFunctions for
overview information.
Each instance of an Ethernet PHY provides such an access struct. The instance is identified by
a postfix number in the symbol name of the access struct, for example:
- \b Driver_ETH_PHY0 is the name of the access struct of the first instance (no. 0).
- \b Driver_ETH_PHY1 is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_ETH_PHY<i>n</i></b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*****************************************************************************************************************/
/**
\typedef ARM_ETH_PHY_Read_t
\details
Provides the typedef for the register read function \ref ARM_ETH_MAC_PHY_Read.
<b>Parameter for:</b>
- \ref ARM_ETH_PHY_Initialize
*******************************************************************************************************************/
/**
\typedef ARM_ETH_PHY_Write_t
\details
Provides the typedef for the register write function \ref ARM_ETH_MAC_PHY_Write.
<b>Parameter for:</b>
- \ref ARM_ETH_PHY_Initialize
*******************************************************************************************************************/
//
// Functions
//
ARM_DRIVER_VERSION ARM_ETH_PHY_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_ETH_PHY_GetVersion (void)
\details
The function \b ARM_ETH_PHY_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_ETH_PHY Driver_ETH_PHY0;
ARM_DRIVER_ETH_PHY *drv_info;
void setup_ethernet_phy (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_ETH_PHY0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*****************************************************************************************************************/
int32_t ARM_ETH_PHY_Initialize (ARM_ETH_PHY_Read_t fn_read, ARM_ETH_PHY_Write_t fn_write) {
return 0;
}
/**
\fn int32_t ARM_ETH_PHY_Initialize (ARM_ETH_PHY_Read_t fn_read, ARM_ETH_PHY_Write_t fn_write)
\details
The function \b ARM_ETH_PHY_Initialize initializes the Ethernet PHY interface.
It is called when the middleware component starts operation.
The \ref ARM_ETH_PHY_Initialize function performs the following operations:
- Initializes the resources needed for Ethernet PHY peripheral.
- Registers the \ref ARM_ETH_MAC_PHY_Read register read access function.
- Registers the \ref ARM_ETH_MAC_PHY_Write register write access function.
\b Example:
- see \ref eth_interface_gr - Driver Functions
*****************************************************************************************************************/
int32_t ARM_ETH_PHY_Uninitialize (void) {
return 0;
}
/**
\fn int32_t ARM_ETH_PHY_Uninitialize (void)
\details
The function \b ARM_ETH_PHY_Uninitialize de-initializes the resources of Ethernet PHY interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*****************************************************************************************************************/
int32_t ARM_ETH_PHY_PowerControl (ARM_POWER_STATE state) {
return 0;
}
/**
\fn int32_t ARM_ETH_PHY_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_ETH_PHY_PowerControl operates the power modes of the Ethernet PHY interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
\b Example:
- see \ref eth_interface_gr - Driver Functions
*****************************************************************************************************************/
int32_t ARM_ETH_PHY_SetInterface (uint32_t interface) {
return 0;
}
/**
\fn int32_t ARM_ETH_PHY_SetInterface (uint32_t interface)
\details
The function \b ARM_ETH_PHY_SetInterface specifies the \ref eth_interface_types1 that links the Ethernet MAC and Ethernet PHY.
After initialization of the PHY interface, you can set the media type.
The function \ref ARM_ETH_MAC_GetCapabilities retrieves the media interface type encoded in the data field \b media_interface of the structure
\ref ARM_ETH_MAC_CAPABILITIES.
The parameter \em interface can have the following values:
Parameter \em interface | Media Type
:-----------------------------|:-------------------------
\ref ARM_ETH_INTERFACE_MII | Media Independent Interface (MII)
\ref ARM_ETH_INTERFACE_RMII | Reduced Media Independent Interface (RMII)
\ref ARM_ETH_INTERFACE_SMII | Serial Media Independent Interface (SMII);
\note
Some \em interface values may be unsupported by a driver implementation. For example \ref ARM_ETH_INTERFACE_SMII may return \b ARM_DRIVER_ERROR_UNSUPPORTED.
\b Example:
\code
static ARM_ETH_MAC_CAPABILITIES capabilities;
static ARM_DRIVER_ETH_MAC *mac;
static ARM_DRIVER_ETH_PHY *phy;
mac = &Driver_ETH_MAC0;
phy = &Driver_ETH_PHY0;
// Initialize Media Access Controller
capabilities = mac->GetCapabilities ();
...
status = phy->SetInterface (capabilities.media_interface);
if (status != ARM_DRIVER_OK) ... // error handling
status = phy->SetMode (ARM_ETH_PHY_AUTO_NEGOTIATE);
if (status != ARM_DRIVER_OK) ... // error handling
...
\endcode
*****************************************************************************************************************/
int32_t ARM_ETH_PHY_SetMode (uint32_t mode) {
return 0;
}
/**
\fn int32_t ARM_ETH_PHY_SetMode (uint32_t mode)
\details
The function \b ARM_ETH_PHY_SetMode sets the operation mode parameters for the Ethernet PHY.
The table below lists the possible values for the parameter \em mode. Values from different categories can be ORed as shown in this example code:
\code
phy->SetMode (ARM_ETH_PHY_SPEED_100M | ARM_ETH_PHY_LOOPBACK | ARM_ETH_PHY_DUPLEX_HALF );
\endcode
\n
<table class="cmtable" summary="">
<tr><th>Parameter \em mode </th><th> bit </th><th> Category </th> <th>Description</th></tr>
<tr><td>\ref ARM_ETH_PHY_SPEED_10M </td><td rowspan="3"> 0..1 </td><td rowspan="3">Link Speed </td> <td>Set the link speed to \token{10 [Mbps]} </td></tr>
<tr><td>\ref ARM_ETH_PHY_SPEED_100M </td> <td>Set the link speed to \token{100 [Mbps]} </td></tr>
<tr><td>\ref ARM_ETH_PHY_SPEED_1G </td> <td>Set the link speed to \token{1 [Gbps]} </td></tr>
<tr><td>\ref ARM_ETH_PHY_DUPLEX_HALF </td><td rowspan="2"> 2 </td><td rowspan="2">Link Mode </td> <td>Set the link mode to half duplex </td></tr>
<tr><td>\ref ARM_ETH_PHY_DUPLEX_FULL </td> <td>Set the link mode to full duplex </td></tr>
<tr><td>\ref ARM_ETH_PHY_AUTO_NEGOTIATE </td><td> 3 </td><td>Autonegotiation </td> <td>Set the interface to Auto Negotiation mode of transmission parameters</td></tr>
<tr><td>\ref ARM_ETH_PHY_LOOPBACK </td><td> 4 </td><td>Loopback </td> <td>Set the interface into a Loop-back test mode </td></tr>
<tr><td>\ref ARM_ETH_PHY_ISOLATE </td><td> 5 </td><td>Isolation </td> <td>Set to indicate electrical isolation of PHY interface from MII/RMII interface</td></tr>
</table>
\note
Some settings may be also taken from configuration pins (example \ref ARM_ETH_PHY_ISOLATE). Check the effect of mode settings in the actual driver implementation.
\note
Some \em mode values may be unsupported by a driver implementation. For example \ref ARM_ETH_PHY_SPEED_1G may return \b ARM_DRIVER_ERROR_UNSUPPORTED.
\b Example:
\code
static ARM_ETH_MAC_CAPABILITIES capabilities;
static ARM_DRIVER_ETH_MAC *mac;
static ARM_DRIVER_ETH_PHY *phy;
mac = &Driver_ETH_MAC0;
phy = &Driver_ETH_PHY0;
// Initialize Media Access Controller
capabilities = mac->GetCapabilities ();
...
status = phy->SetInterface (capabilities.media_interface);
if (status != ARM_DRIVER_OK) ... // error handling
status = phy->SetMode (ARM_ETH_PHY_SPEED_100M | ARM_ETH_PHY_DUPLEX_FULL | ARM_ETH_PHY_ISOLATE);
if (status != ARM_DRIVER_OK) ... // error handling
...
\endcode
*****************************************************************************************************************/
ARM_ETH_LINK_STATE ARM_ETH_PHY_GetLinkState (void) {
return 0;
}
/**
\fn ARM_ETH_LINK_STATE ARM_ETH_PHY_GetLinkState (void)
\details
The function \b ARM_ETH_PHY_GetLinkState retrieves the connection status of the physical Ethernet link.
\b Example:
- see \ref eth_interface_gr - Driver Functions
*****************************************************************************************************************/
ARM_ETH_LINK_INFO ARM_ETH_PHY_GetLinkInfo (void) {
return 0;
}
/**
\fn ARM_ETH_LINK_INFO ARM_ETH_PHY_GetLinkInfo (void)
\details
The function \b ARM_ETH_PHY_GetLinkInfo retrieves information about the current established communication
mode (half/full duplex) and communication speed. Information is only valid when link is up (see \ref ARM_ETH_PHY_GetLinkState).
\b Example:
- see \ref eth_interface_gr - Driver Functions
*****************************************************************************************************************/
/**
@}
*/
// End ETH PHY Interface group; below the groups are included with \ingroup
/**
\defgroup eth_phy_mode_ctrls Ethernet PHY Mode
\ingroup eth_phy_interface_gr
\brief Specify operation modes of the Ethernet PHY interface
\details
@{
\def ARM_ETH_PHY_SPEED_10M
\sa ARM_ETH_PHY_SetMode
\def ARM_ETH_PHY_SPEED_100M
\sa ARM_ETH_PHY_SetMode
\def ARM_ETH_PHY_SPEED_1G
\sa ARM_ETH_PHY_SetMode
\def ARM_ETH_PHY_DUPLEX_HALF
\sa ARM_ETH_PHY_SetMode
\def ARM_ETH_PHY_DUPLEX_FULL
\sa ARM_ETH_PHY_SetMode
\def ARM_ETH_PHY_AUTO_NEGOTIATE
\sa ARM_ETH_PHY_SetMode
\def ARM_ETH_PHY_LOOPBACK
\sa ARM_ETH_PHY_SetMode
\def ARM_ETH_PHY_ISOLATE
\sa ARM_ETH_PHY_SetMode
@}
*/
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_ETH_PHY.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 2,732 |
```c
/* your_sha256_hash-------------
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software. Permission is granted to anyone to use this
* software for any purpose, including commercial applications, and to alter
* it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software in
* a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
*
* $Date: 9. Dec 2014
* $Revision: V1.00
*
* Project: SAI (Serial Audio Interface) Driver definitions
* your_sha256_hash---------- */
/**
\defgroup sai_interface_gr SAI Interface
\brief Driver API for Serial Audio Interface (%Driver_SAI.h)
\details
The <b>Serial Audio Interface</b> (SAI) implements a synchronous serial bus interface for connecting digital audio devices.
It is by far the most common mechanism used to transfer two channels of audio data between devices within a system. \b SAI
can transfer digital audio using various protocols:
- \ref Driver_SAI_I2S
- \ref Driver_SAI_MSB
- \ref Driver_SAI_LSB
- \ref Driver_SAI_PCM
- \ref Driver_SAI_AC97
- \ref Driver_SAI_User
<b>Block Diagram</b>
<p> </p>
\image html SAI_Schematics.png "Simplified SAI Schematic"
<p> </p>
<b>SAI API</b>
The following header files define the Application Programming Interface (API) for the SAI interface:
- \b %Driver_SAI.h : Driver API for Serial Audio Interface
The driver implementation is a typical part of the
<a class="el" href="../../Pack/html/index.html" target="_blank">Device Family Pack (DFP)</a> that supports the peripherals of
the microcontroller family.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_SAI : access struct for SAI driver functions
\section Driver_SAI_I2S I2S
<a href="path_to_url" target="_blank">Integrated Interchip Sound</a> (\b I2S) is a serial bus
interface that connects digital audio devices together. It was introduced by Philips (now
<a href="path_to_url" target="_blank">NXP</a>) in the late 80's and last revised 1996. It uses pulse code modulation
to exchange the audio data between the devices. The following timing diagram explains the operation:
\image html driver_sai_i2s.png
I2S separates the clock (\b SCK) from the serial data (\b SD), resulting in a lower jitter. A complete audio data frame
consists of two slots, one for the left channel and one for the right. The slot size equals the data size.
The word select (\b WS) line lets the device know whether the left channel (WS is low) or the right channel (WS is high) is
currently being transmitted. WS has a 50% duty-cycle signal that has the same frequency as the sample frequency. It is an
early signal, meaning that the WS line changes one clock cycle before the actual data (SD) is transmitted (left or right).
The data on SD is always transmitted MSB first and can have a data size of 8 up to 32 bits.
In terms of the CMSIS-Driver for SAI, the I2S protocol can be described as follows:
- Data Size: 8..32 (MSB first)
- Clock Polarity: Drive on falling edge, Capture on rising edge
- Frame Length: 2 * Data Size = 2 * Slot Size
- Frame Sync Width: Frame Length / 2
- Frame Sync Polarity: Active Low
- Frame Sync Early
- Slot Count: 2 (L R)
- Slot Size: Data Size
- Slot Offset: 0
\section Driver_SAI_MSB MSB Justified
\b MSB \b Justified is much like \ref Driver_SAI_I2S, with a few differences:
\image html driver_sai_msb.png
Unlike I2S, in MSB Justified the word select (\b WS) signals the left channel when it is active high and the right channel,
when it is active low. The signal changes when the first actual \b SD data is available. It might happen that a frame (left
or right) is not fully filled with data. In this case, all data after the LSB is forced to zero.
In terms of the CMSIS-Driver for SAI, the MSB Justified protocol can be described as follows:
- Data Size: 8..32 (MSB first)
- Clock Polarity: Drive on falling edge, Capture on rising edge
- Frame Length: 2 * Slot Size
- Frame Sync Width: Frame Length / 2
- Frame Sync Polarity: Active High
- Slot Count: 2 (L R)
- Slot Size: Data Size or higher (16/32)
- Slot Offset: 0 (Zero padding after Data: Slot Size - Data Size)
\section Driver_SAI_LSB LSB Justified
\b LSB \b Justified is much like \ref Driver_SAI_MSB, with the single difference that the padding 0's are sent before the
first actual data (MSB on \b SD):
\image html driver_sai_lsb.png
In terms of the CMSIS-Driver for SAI, the LSB Justified protocol can be described as follows:
- Data Size: 8..32 (MSB first)
- Clock Polarity: Drive on falling edge, Capture on rising edge
- Frame Length: 2*Slot Size
- Frame Sync Width: Frame Length / 2
- Frame Sync Polarity: Active High
- Slot Count: 2
- Slot Size: Data Size or higher (16/32)
- Slot Offset: Slot Size - Data Size (Zero padding before Data: Slot Size - Data Size)
\section Driver_SAI_PCM PCM
<a href="path_to_url" target="_blank">Pulse Code Modulation</a> (\b PCM) differs to
the previous protocols in a few ways:
\image html driver_sai_pcm.png
- Only one channel is transferred.
- There are two types of synchronization modes available:
- In \b short \b frame sync mode, the falling edge of \b Frame \b Sync indicates the start of the serial data \b SD. \b Frame \b Sync is always
one clock cycle long.
- In \b long \b frame sync mode, the rising edge of \b Frame \b Sync indicates the start of the serial data \b SD. \b Frame \b Sync stays active
high for 13 clock cycles.
In terms of the CMSIS-Driver for SAI, the PCM protocol can be described as follows:\n
\b PCM \b Short \b Frame
- Data Size: 8..32 (MSB first)
- Clock Polarity: Drive on falling edge, Capture on rising edge
- Frame Length: Slot Size
- Frame Sync Width: 1
- Frame Sync Polarity: Active High
- Frame Sync Early
- Slot Count: 1
- Slot Size: Data Size or higher (16/32)
- Slot Offset: 0
\b PCM \b Long \b Frame
- Data Size: 16..32 (MSB first)
- Clock Polarity: Drive on falling edge, Capture on rising edge
- Frame Length: Slot Size
- Frame Sync Width: 13
- Frame Sync Polarity: Active High
- Slot Count: 1
- Slot Size: Data Size or higher (32)
- Slot Offset: 0
\section Driver_SAI_AC97 AC'97
<a href="path_to_url" target="_blank">Audio Codec '97</a> was developed by
<a href="path_to_url" target="_blank">Intel</a>. It is composed of five wires: the clock (12.288 MHz), a sync
signal, a reset signal, and two data wires: sdata_out (contains the AC97 output) and sdata_in (contains the CODEC output).
For more information, consult the
<a href="path_to_url~cs150/Documents/ac97_r23.pdf" target="_blank">standard documentation</a>.
\section Driver_SAI_User User Defined Protocol
Using the control structs of the CMSIS-Driver SAI, it is possible to create support for nearly all serial audio protocols
that are available today.
\image html driver_sai_user.png
The following properties can be configured for a user protocol:
- Data Size in bits (8..32)
- Data Bit Order: MSB first (default) or LSB first
- Clock Polarity:
- Driver on falling edge, Capture on rising edge (default)
- Driver on rising edge, Capture on falling edge
- Frame Length in bits
- Frame Sync Width in bits (default=1)
- Frame Sync Polarity: active high (default) or low
- Frame Sync Early: Sync signal one bit before the first bit of frame
- Slot Count: number of slots in frame (default=1)
- Slot Size: equal to data size (default) or 16 or 32-bit
- Slot Offset: offset of first data bit in slot (default=0)
For more information, refer to \ref ARM_SAI_Control that explains the different configuration options in more detail.
@{
*/
/**
\struct ARM_DRIVER_SAI
\details
The functions of the SAI driver are accessed by function pointers exposed by this structure.
Refer to \ref DriverFunctions for overview information.
Each instance of an SAI interface provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_SAI0 is the name of the access struct of the first instance (no. 0).
- \b Driver_SAI1 is the name of the access struct of the second instance (no. 1).
A middleware configuration setting allows connecting the middleware to a specific driver instance \b %Driver_SAI<i>n</i>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*****************************************************************************************************************/
/**
\struct ARM_SAI_CAPABILITIES
\details
An SAI driver can be implemented with different capabilities (for example protocol support). The data fields of this
structure encode the capabilities implemented by this driver. If a certain hardware peripheral is not able to handle one
of the protocols directly (not advertised using ARM_SAI_CAPABILITIES), then it might be possible to implement it using
the \ref Driver_SAI_User (if supported).
<b>Returned by:</b>
- \ref ARM_SAI_GetCapabilities
*****************************************************************************************************************/
/**
\struct ARM_SAI_STATUS
\details
Structure with information about the status of the SAI. The data fields encode busy flags and error flags.
<b>Returned by:</b>
- \ref ARM_SAI_GetStatus
*****************************************************************************************************************/
/**
\typedef ARM_SAI_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_SAI_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_SAI_Initialize
*******************************************************************************************************************/
/****** SAI specific error codes *****/
/**
\defgroup sai_execution_status Status Error Codes
\ingroup common_drv_gr
\brief Negative values indicate errors (SAI has specific codes in addition to common \ref execution_status).
\details
The SAI driver has additional status error codes that are listed below.
\note
- In case multiple errors exist, only the first encountered error will be reported.
- errors ARM_SAI_ERROR_BIT_ORDER, ARM_SAI_ERROR_FRAME_SYNC_xxx, ARM_SAI_ERROR_SLOT_xxx will only be reported in \ref Driver_SAI_User mode.
- The SAI driver also returns the common \ref execution_status.
@{
\def ARM_SAI_ERROR_SYNCHRONIZATION
The \b synchronization requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_PROTOCOL
The \b protocol requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_DATA_SIZE
The <b>data size</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_BIT_ORDER
The <b>bit order</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_MONO_MODE
The <b>mono mode</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_COMPANDING
The <b>companding</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_CLOCK_POLARITY
The <b>clock polarity</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_AUDIO_FREQ
The <b>audio frequency</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_MCLK_PIN
The <b>MCLK pin</b> setting requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_MCLK_PRESCALER
The <b>MCLK prescaler</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_FRAME_LENGTH
The <b>frame length</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_FRAME_SYNC_WIDTH
The <b>frame sync width</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_FRAME_SYNC_POLARITY
The <b>frame sync polarity</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_FRAME_SYNC_EARLY
The <b>frame sync early</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_SLOT_COUNT
The <b>slot count</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_SLOT_SIZE
The <b>slot size</b> requested with the function \ref ARM_SAI_Control is not supported.
\def ARM_SAI_ERROR_SLOT_OFFESET
The <b>slot offset</b> requested with the function \ref ARM_SAI_Control is not supported.
@}
*/
/****** SAI Event *****/
/**
\defgroup SAI_events SAI Events
\ingroup sai_interface_gr
\brief The SAI driver generates call back events that are notified via the function \ref ARM_SAI_SignalEvent.
\details
This section provides the event values for the \ref ARM_SAI_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_SAI_EVENT_SEND_COMPLETE
\def ARM_SAI_EVENT_RECEIVE_COMPLETE
\def ARM_SAI_EVENT_TX_UNDERFLOW
\def ARM_SAI_EVENT_RX_OVERFLOW
\def ARM_SAI_EVENT_FRAME_ERROR
@}
*/
/**
\defgroup sai_control SAI Control Codes
\ingroup sai_interface_gr
\brief Many parameters of the SAI driver are configured using the \ref ARM_SAI_Control function.
\details
@{
The various SAI control codes define:
- \ref sai_configure_control specifies SAI configuration
- \ref sai_controls specifies SAI controls
Refer to the \ref ARM_SAI_Control function for further details.
*/
/**
\defgroup sai_configure_control SAI Configuration
\ingroup sai_control
\brief Specify Transmitter/Receiver configuration.
\details
@{
Configuration is specified by ORing \b ARM_SAI_CONFIGURE_<i>x</i> with the following parameters:
- \ref sai_mode_control
- \ref sai_sync_control
- \ref sai_protocol_control
- \ref sai_data_bits_control
- \ref sai_bit_order_control
- \ref sai_mono_control
- \ref sai_clock_pol_control
- \ref sai_companding_control
- \ref sai_mclk_pin_control
Additional configuration specified by \em arg1:
- \ref sai_frame_control
- \ref sai_slot_control
Additional configuration specified by \em arg2:
- <b>Audio Frequency</b> (Master only)
- \ref sai_mclk_pres_control
\defgroup sai_mode_control SAI Mode
\ingroup sai_configure_control
\brief Defines Transmitter/Receiver mode.
\details
@{
\def ARM_SAI_MODE_MASTER
\def ARM_SAI_MODE_SLAVE
@}
\defgroup sai_sync_control SAI Synchronization
\ingroup sai_configure_control
\brief Defines Transmitter/Receiver synchronization.
\details
@{
\def ARM_SAI_ASYNCHRONOUS
\def ARM_SAI_SYNCHRONOUS
@}
\defgroup sai_protocol_control SAI Protocol
\ingroup sai_configure_control
\brief Defines Transmitter/Receiver protocol.
\details
@{
\def ARM_SAI_PROTOCOL_USER
\def ARM_SAI_PROTOCOL_I2S
\def ARM_SAI_PROTOCOL_MSB_JUSTIFIED
\def ARM_SAI_PROTOCOL_LSB_JUSTIFIED
\def ARM_SAI_PROTOCOL_PCM_SHORT
\def ARM_SAI_PROTOCOL_PCM_LONG
\def ARM_SAI_PROTOCOL_AC97
@}
\defgroup sai_data_bits_control SAI Data Size
\ingroup sai_configure_control
\brief Defines data size in bits (per channel/slot).
\details
@{
\def ARM_SAI_DATA_SIZE(n)
@}
\defgroup sai_bit_order_control SAI Bit Order
\ingroup sai_configure_control
\brief Defines the bit order.
\details
@{
\def ARM_SAI_MSB_FIRST
\def ARM_SAI_LSB_FIRST
@}
\defgroup sai_mono_control SAI Mono Mode
\ingroup sai_configure_control
\brief Defines mono mode.
\details
@{
\def ARM_SAI_MONO_MODE
@}
\defgroup sai_companding_control SAI Companding
\ingroup sai_configure_control
\brief Defines companding.
\details
@{
\def ARM_SAI_COMPANDING_NONE
\def ARM_SAI_COMPANDING_A_LAW
\def ARM_SAI_COMPANDING_U_LAW
@}
\defgroup sai_clock_pol_control SAI Clock Polarity
\ingroup sai_configure_control
\brief Defines clock polarity.
\details
@{
\def ARM_SAI_CLOCK_POLARITY_0
\def ARM_SAI_CLOCK_POLARITY_1
@}
\defgroup sai_frame_control SAI Frame
\ingroup sai_configure_control
\brief Defines frame.
\details
@{
\def ARM_SAI_FRAME_LENGTH(n)
\def ARM_SAI_FRAME_SYNC_WIDTH(n)
\def ARM_SAI_FRAME_SYNC_POLARITY_HIGH
\def ARM_SAI_FRAME_SYNC_POLARITY_LOW
\def ARM_SAI_FRAME_SYNC_EARLY
@}
\defgroup sai_slot_control SAI Slot
\ingroup sai_configure_control
\brief Defines data slots.
\details
@{
\def ARM_SAI_SLOT_COUNT(n)
\def ARM_SAI_SLOT_SIZE_DEFAULT
\def ARM_SAI_SLOT_SIZE_16
\def ARM_SAI_SLOT_SIZE_32
\def ARM_SAI_SLOT_OFFSET(n)
@}
\defgroup sai_mclk_pin_control SAI Master Clock Pin
\ingroup sai_configure_control
\brief Defines MCLK pin.
\details
@{
\def ARM_SAI_MCLK_PIN_INACTIVE
\def ARM_SAI_MCLK_PIN_OUTPUT
\def ARM_SAI_MCLK_PIN_INPUT
@}
\defgroup sai_mclk_pres_control SAI Master Clock Prescaler
\ingroup sai_configure_control
\brief Defines MCLK prescaler.
\details
@{
\def ARM_SAI_MCLK_PRESCALER(n)
@}
@}
*/
/**
\defgroup sai_controls SAI Controls
\ingroup sai_control
\brief Specifies controls.
\details
@{
\def ARM_SAI_CONFIGURE_TX
\sa ARM_SAI_Control
\def ARM_SAI_CONFIGURE_RX
\sa ARM_SAI_Control
\def ARM_SAI_CONTROL_TX
\sa ARM_SAI_Control; ARM_SAI_Send
\def ARM_SAI_CONTROL_RX
\sa ARM_SAI_Control; ARM_SAI_Receive
\def ARM_SAI_MASK_SLOTS_TX
\sa ARM_SAI_Control; ARM_SAI_Send
\def ARM_SAI_MASK_SLOTS_RX
\sa ARM_SAI_Control; ARM_SAI_Receive
\def ARM_SAI_ABORT_SEND
\sa ARM_SAI_Control; ARM_SAI_Send
\def ARM_SAI_ABORT_RECEIVE
\sa ARM_SAI_Control; ARM_SAI_Receive
@}
*/
/**
@}
*/
// end group SAI_control
//
// Function documentation
//
ARM_DRIVER_VERSION ARM_SAI_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_SAI_GetVersion (void)
\details
The function \b ARM_SAI_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
\b Example:
\code
extern ARM_DRIVER_SAI Driver_SAI0;
ARM_DRIVER_SAI *drv_info;
void setup_sai (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_SAI0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*****************************************************************************************************************/
ARM_SAI_CAPABILITIES ARM_SAI_GetCapabilities (void) {
return {0};
}
/**
\details
\fn ARM_SAI_CAPABILITIES ARM_SAI_GetCapabilities (void)
The function \b ARM_SAI_GetCapabilities retrieves information about the capabilities in this driver implementation.
The data fields of the struct \ref ARM_SAI_CAPABILITIES encode various capabilities, for example
supported protocols, or if a hardware is capable to create signal events using the \ref ARM_SAI_SignalEvent
callback function.
\b Example:
\code
extern ARM_DRIVER_SAI Driver_SAI0;
ARM_DRIVER_SAI *drv_info;
void read_capabilities (void) {
ARM_SAI_CAPABILITIES drv_capabilities;
drv_info = &Driver_SAI0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*****************************************************************************************************************/
int32_t ARM_SAI_Initialize (ARM_SAI_SignalEvent_t cb_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SAI_Initialize (ARM_SAI_SignalEvent_t cb_event)
\details
The function \b ARM_SAI_Initialize initializes the SAI interface. It is called when the middleware component starts
operation.
The function performs the following operations:
- Initializes the required resources of the SAI interface.
- Registers the \ref ARM_SAI_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_SAI_SignalEvent callback function; use a NULL pointer
when no callback signals are required.
*****************************************************************************************************************/
int32_t ARM_SAI_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SAI_Uninitialize (void)
\details
The function \b ARM_SAI_Uninitialize de-initializes the resources of SAI interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*****************************************************************************************************************/
int32_t ARM_SAI_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SAI_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_SAI_PowerControl allows you to control the power modes of the SAI interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*****************************************************************************************************************/
int32_t ARM_SAI_Send (const void *data, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SAI_Send (const void *data, uint32_t num)
\details
The function \b ARM_SAI_Send sends data to the SAI transmitter.
The function parameters specify the buffer with \a data and the number \a num of items to send.
The item size is defined by the data type which depends on the configured number of data bits.
Data type is:
- \em uint8_t when configured for \token{8} data bits
- \em uint16_t when configured for \token{9..16} data bits
- \em uint32_t when configured for \token{17..32} data bits
Transmitter is enabled by calling \ref ARM_SAI_Control with \ref ARM_SAI_CONTROL_TX as the control parameter and \token{1} as
an argument. This starts the transmit engine which, generates a clock and frame sync signal in master mode and transmits the
data. In slave mode, clock and frame sync are generated by the external master. When mute is active, data is discarded and
zero values are transmitted.
Calling the function <b>ARM_SAI_Send</b> only starts the send operation. The function is non-blocking and returns as soon as
the driver has started the operation (the driver typically configures DMA or the interrupt system for continuous transfer).
During the operation it is not allowed to call this function again. Also, the data buffer must stay allocated and the
contents of unsent data must not be modified. When the send operation is completed (requested number of items have been
sent), the event \ref ARM_SAI_EVENT_SEND_COMPLETE is generated. Progress of the send operation can be monitored by reading
the number of already sent items by calling the function \ref ARM_SAI_GetTxCount.
The status of the transmitter can also be monitored by calling the function \ref ARM_SAI_GetStatus and checking the \em tx_busy flag,
which indicates if a transmission is still in progress.
If the transmitter is enabled and data is to be sent but the send operation has not been started yet, then the event
\ref ARM_SAI_EVENT_TX_UNDERFLOW is generated.
If an invalid synchronization frame is detected in slave mode, then the event \ref ARM_SAI_EVENT_FRAME_ERROR is generated (if
supported and reported by \em event_frame_error in \ref ARM_SAI_CAPABILITIES).
The send operation can be aborted by calling the function \ref ARM_SAI_Control with the control parameter \ref ARM_SAI_ABORT_SEND.
*****************************************************************************************************************/
int32_t ARM_SAI_Receive (void *data, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SAI_Receive (void *data, uint32_t num)
\details
The function \b ARM_SAI_Receive is used to receive data from the SAI receiver. The function parameters specify the buffer for
\a data and the number \a num of items to receive. The item size is defined by the data type, which depends on the configured
number of data bits.
Data type is:
- \em uint8_t when configured for \token{8} data bits
- \em uint16_t when configured for \token{9..16} data bits
- \em uint32_t when configured for \token{17..32} data bits
The receiver is enabled by calling the function \ref ARM_SAI_Control with the control parameter \ref ARM_SAI_CONTROL_RX and the value \token{1}
for the parameter \em arg1. This starts the receive engine, which generates a clock and frame sync signal in master mode and receives
data. In slave mode, clock and frame sync are generated by the external master.
Calling the function <b>ARM_SAI_Receive</b> only starts the receive operation. The function is non-blocking and returns as
soon as the driver has started the operation (the driver typically configures DMA or the interrupt system for continuous
transfer). During the operation, it is not allowed to call this function again. The data buffer must also stay allocated.
When receive operation is completed (the requested number of items have been received), the
\ref ARM_SAI_EVENT_RECEIVE_COMPLETE event is generated. Progress of the receive operation can also be monitored by reading
the number of items already received by calling the function \ref ARM_SAI_GetRxCount.
The status of the receiver can also be monitored by calling the function \ref ARM_SAI_GetStatus and checking the \em rx_busy flag, which
indicates whether a reception is still in progress.
When the receiver is enabled and data is received but the receive operation has not been started yet, then the event
\ref ARM_SAI_EVENT_RX_OVERFLOW is generated.
If an invalid synchronization frame is detected in slave mode, then the event \ref ARM_SAI_EVENT_FRAME_ERROR is generated (if
supported and reported by \em event_frame_error in \ref ARM_SAI_CAPABILITIES).
The receive operation can be aborted by calling the function \ref ARM_SAI_Control with the control parameter \ref ARM_SAI_ABORT_RECEIVE.
*****************************************************************************************************************/
uint32_t ARM_SAI_GetTxCount (void) {
return 0;
}
/**
\fn uint32_t ARM_SAI_GetTxCount (void)
\details
The function \b ARM_SAI_GetTxCount returns the number of the currently transmitted data items during an \ref ARM_SAI_Send
operation.
*****************************************************************************************************************/
uint32_t ARM_SAI_GetRxCount (void) {
return 0;
}
/**
\fn uint32_t ARM_SAI_GetRxCount (void)
\details
The function \b ARM_SAI_GetRxCount returns the number of the currently received data items during an \ref ARM_SAI_Receive
operation.
*****************************************************************************************************************/
int32_t ARM_SAI_Control (uint32_t control, uint32_t arg1, uint32_t arg2) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SAI_Control (uint32_t control, uint32_t arg1, uint32_t arg2)
\details
The function \b ARM_SAI_Control controls the SAI interface and executes various operations.
The parameter \em control specifies the operation. Values are listed in the table <a href="#sai_contrl_tab"><b>Parameter <i>control</i></b></a>.\n
The parameter \em arg1 provides, depending on the operation, additional information or sets values.
Refer to table <a href="#sai_arg1_tab"><b>Parameter <i>arg1</i></b></a>. \n
The parameter \em arg2 provides, depending on the operation and/or \em arg1, additional information or sets values.
The driver provides a receiver/transmitter pair of signals.
In asynchronous operation mode, they operate completely independent from each other.
In synchronous operation mode, the synchronous channel uses the Clock (SCK) and Frame Sync (WS) signal from the asynchronous one
(control category <a href="#sai_sync"><b>Synchronization</b></a>).
The clock polarity can be set for every protocol, regardless whether it is already predefined for I2S, MSB/LSB Jusitified
(control category <a href="#sai_clk_polarity"><b>Clock Polarity</b></a>).
A master clock provides a faster clock from which the frame can be derived (usually 256 x faster than the normal frame clock).
You can use a master clock only in master mode. A slave will always have only one clock
(control category <a href="#master_clock"><b>Master Clock pin (MCLK)</b></a>).
\anchor sai_contrl_tab
The table lists the operation values for \em control. Values from different categories can be ORed.
<table class="cmtable" summary="">
<tr><th> Parameter \em control </th><th> Bit </th><th> Category </th>
<th> Description </th></tr>
<tr><td> \ref ARM_SAI_CONFIGURE_TX </td><td rowspan="8" style="text-align:right"> 0..7 </td><td rowspan="8"> Operation </td>
<td> Configure transmitter. \em arg1 (see <a href="#sai_arg1_tab"><b>Parameter <i>arg1</i></b></a>) and \em arg2 provide additional configuration. </td></tr>
<tr><td> \ref ARM_SAI_CONFIGURE_RX </td>
<td> Configure receiver. \em arg1 (see <a href="#sai_arg1_tab"><b>Parameter <i>arg1</i></b></a>) and \em arg2 provide additional configuration. </td></tr>
<tr><td> \ref ARM_SAI_CONTROL_TX </td>
<td> Enable or disable transmitter and control mute;
\em arg1.0 : \token{0=disable (default); 1=enable;} \em arg1.1 : \token{mute} (see \ref ARM_SAI_Send) </td></tr>
<tr><td> \ref ARM_SAI_CONTROL_RX </td>
<td> Enable or disable receiver; \em arg1.0 : \token{0=disable (default); 1=enable} (see \ref ARM_SAI_Receive) </td></tr>
<tr><td> \ref ARM_SAI_MASK_SLOTS_TX </td>
<td> Mask transmitter slots; \em arg1 = \token{mask} (bit: 0=active, 1=inactive); all configured slots are active by default. </td></tr>
<tr><td> \ref ARM_SAI_MASK_SLOTS_RX </td>
<td> Mask receiver slots; \em arg1 = \token{mask} (bit: 0=active, 1=inactive); all configured slots are active by default. </td></tr>
<tr><td> \ref ARM_SAI_ABORT_SEND </td>
<td> Abort send operation (see \ref ARM_SAI_Send). </td></tr>
<tr><td> \ref ARM_SAI_ABORT_RECEIVE </td>
<td> Abort receive operation (see \ref ARM_SAI_Receive). </td></tr>
<tr><td> \ref ARM_SAI_MODE_MASTER </td><td rowspan="2" style="text-align:right"> 8 </td><td rowspan="2"> Mode </td>
<td> Master mode. \em arg2 specifies the audio frequency in [Hz]. You can also set the <a href="#master_clock"><b>Master Clock pin</b></a>.</td></tr>
<tr><td> \ref ARM_SAI_MODE_SLAVE (default) </td>
<td> Slave mode. </td></tr>
<tr><td> \ref ARM_SAI_ASYNCHRONOUS (default) \anchor sai_sync </td><td rowspan="2" style="text-align:right"> 9 </td><td rowspan="2"> Synchronization </td>
<td> Asynchronous operation using own clock and sync signal. </td></tr>
<tr><td> \ref ARM_SAI_SYNCHRONOUS </td>
<td> Synchronous operation using clock and sync signal from other transmitter/receiver. </td></tr>
<tr><td> \ref ARM_SAI_PROTOCOL_USER (default) </td><td rowspan="7" style="text-align:right"> 10..12 </td><td rowspan="7"> Protocol </td>
<td> User defined </td></tr>
<tr><td> \ref ARM_SAI_PROTOCOL_I2S </td>
<td> I2C </td></tr>
<tr><td> \ref ARM_SAI_PROTOCOL_MSB_JUSTIFIED </td>
<td> MSB (left) justified </td></tr>
<tr><td> \ref ARM_SAI_PROTOCOL_LSB_JUSTIFIED </td>
<td> LSB (right) justified </td></tr>
<tr><td> \ref ARM_SAI_PROTOCOL_PCM_SHORT </td>
<td> PCM with short frame </td></tr>
<tr><td> \ref ARM_SAI_PROTOCOL_PCM_LONG </td>
<td> PCM with long frame </td></tr>
<tr><td> \ref ARM_SAI_PROTOCOL_AC97 </td>
<td> AC'97 </td></tr>
<tr><td> \ref ARM_SAI_DATA_SIZE(n) </td><td style="text-align:right"> 13..17 </td><td> Data Size </td>
<td> Data size in bits; the range for \em n is \token{8..32}. See also: <a href="#frame_slot_size"><b>Frame Slot Size</b></a>. </td></tr>
<tr><td> \ref ARM_SAI_MSB_FIRST </td><td rowspan="2" style="text-align:right"> 18 </td><td rowspan="2"> Bit Order </td>
<td> Data is transferred with MSB first. </td></tr>
<tr><td> \ref ARM_SAI_LSB_FIRST </td>
<td> Data is transferred with LSB first (User protocol only, ignored otherwise). </td></tr>
<tr><td> \ref ARM_SAI_MONO_MODE </td><td style="text-align:right"> 19 </td><td> Mono Mode</td>
<td> Only for I2S, MSB/LSB justified.
When using \ref Driver_SAI_I2S in mono mode, only data for a single channel is sent to and received from the driver.
Hardware will duplicate the data for the second channel on transmit and ignore the second channel on receive. </td></tr>
<tr><td> \ref ARM_SAI_COMPANDING_NONE (default) </td><td rowspan="3" style="text-align:right"> 20..22 </td><td rowspan="3"> Companding </td>
<td> No companding </td></tr>
<tr><td> \ref ARM_SAI_COMPANDING_A_LAW </td>
<td> A-Law companding (8-bit data) </td></tr>
<tr><td> \ref ARM_SAI_COMPANDING_U_LAW </td>
<td> u-Law companding (8-bit data) </td></tr>
<tr><td> \ref ARM_SAI_CLOCK_POLARITY_0 (default) \anchor sai_clk_polarity > </td><td rowspan="2" style="text-align:right"> 23 </td><td rowspan="2"> Clock Polarity </td>
<td> Drive on falling edge, capture on rising edge. </td></tr>
<tr><td> \ref ARM_SAI_CLOCK_POLARITY_1 \anchor master_clock </td>
<td> Drive on rising edge, capture on falling edge. </td></tr>
<tr><td> \ref ARM_SAI_MCLK_PIN_INACTIVE (default) </td><td rowspan="3" style="text-align:right"> 24..26 </td><td rowspan="3"> Master Clock pin (MCLK) </td>
<td> MCLK not used. </td></tr>
<tr><td> \ref ARM_SAI_MCLK_PIN_OUTPUT </td>
<td> MCLK is output (Master mode only). </td></tr>
<tr><td> \ref ARM_SAI_MCLK_PIN_INPUT </td>
<td> MCLK is input (Master mode only). </td></tr>
</table>
\anchor sai_arg1_tab
The parameter \em arg1 provides frame-specific values depending on the \em control operation. Values from different categories can be ORed.
<table class="cmtable" summary="">
<tr><th nowrap> Parameter \em arg1 </th>
<th style="text-align:right"> Bit </th>
<th> Category </th>
<th> Description </th></tr>
<tr><td> \ref ARM_SAI_FRAME_LENGTH(n) </td>
<td style="text-align:right"> 0..9 </td>
<td> Frame Length </td>
<td> Frame length in bits; the possible range for \em n is \token{8..1024}; default depends on protocol and data. </td></tr>
<tr><td> \ref ARM_SAI_FRAME_SYNC_WIDTH(n)</td>
<td style="text-align:right"> 10..17 </td>
<td> Frame Sync Width </td>
<td> Frame Sync width in bits; the possible range for \em n is \token{1..256}; \token{default=1}; User protocol only, ignored otherwise. </td></tr>
<tr><td> \ref ARM_SAI_FRAME_SYNC_POLARITY_HIGH </td>
<td rowspan="2" style="text-align:right"> 18 </td>
<td rowspan="2" style="white-spaces:nowrap"> Frame Sync Polarity </td>
<td> Frame Sync is active high (default). </td></tr>
<tr><td> \ref ARM_SAI_FRAME_SYNC_POLARITY_LOW </td>
<td> Frame Sync is active low (User protocol only, ignored otherwise). </td></tr>
<tr><td> \ref ARM_SAI_FRAME_SYNC_EARLY </td>
<td style="text-align:right"> 19 </td>
<td> Frame Sync Early </td>
<td> Frame Sync one bit before the first bit of the frame (User protocol only, ignored otherwise). </td></tr>
<tr><td> \ref ARM_SAI_SLOT_COUNT(n) </td>
<td style="text-align:right"> 20..24 </td>
<td> Frame Sync Count </td>
<td> Number of slots in frame; the possible range for \em n is \token{1..32}; default=\token{1}; User protocol only, ignored otherwise. </td></tr>
<tr><td> \ref ARM_SAI_SLOT_SIZE_DEFAULT \anchor frame_slot_size </td>
<td rowspan="3" style="text-align:right"> 25..26 </td>
<td rowspan="3"> Frame Slot Size </td>
<td> Slot size is equal to data size (default). </td></tr>
<tr><td> \ref ARM_SAI_SLOT_SIZE_16 </td>
<td> Slot size is \token{16 bits} (User protocol only, ignored otherwise). </td></tr>
<tr><td> \ref ARM_SAI_SLOT_SIZE_32 </td>
<td> Slot size is \token{32 bits} (User protocol only, ignored otherwise). </td></tr>
<tr><td> \ref ARM_SAI_SLOT_OFFSET(n) </td>
<td style="text-align:right"> 27..31 </td>
<td> Frame Slot Offset </td>
<td> Offset of first data bit in slot; The range for \em n is \token{0..31}; default=\token{0}; User protocol only, ignored otherwise. </td></tr>
</table>
\anchor mckl_prescaler
Depending on the \em control operation, the parameter \em arg2 specifies the Master Clock (MCLK) prescaler and calculates the audio frequency automatically.
Parameter \em arg2 | MCLK Prescaler
:----------------------------------------|:--------------------------------------------
\ref ARM_SAI_MCLK_PRESCALER(n) | MCLK prescaler; Audio frequency = MCLK/n; the range for \em n is \token{1..4096}; default=\token{1}.
\b Example
\code
extern ARM_DRIVER_SAI Driver_SAI0;
// configure Transmitter to Asynchronous Master: I2S Protocol, 16-bit data, 16kHz Audio frequency
status = Driver_SAI0.Control(ARM_SAI_CONFIGURE_TX |
ARM_SAI_MODE_MASTER |
ARM_SAI_ASYNCHRONOUS |
ARM_SAI_PROTOCOL_I2S |
ARM_SAI_DATA_SIZE(16), 0, 16000);
// configure Receiver to Asynchronous Master: I2S Protocol, 16-bit data, 16kHz Audio frequency
status = Driver_SAI0.Control(ARM_SAI_CONFIGURE_RX |
ARM_SAI_MODE_MASTER |
ARM_SAI_ASYNCHRONOUS |
ARM_SAI_PROTOCOL_I2S |
ARM_SAI_DATA_SIZE(16), 0, 16000);
// enable Transmitter
status = Driver_SAI0.Control(ARM_SAI_CONTROL_TX, 1, 0);
// enable Receiver
status = Driver_SAI0.Control(ARM_SAI_CONTROL_RX, 1, 0);
\endcode
*****************************************************************************************************************/
ARM_SAI_STATUS ARM_SAI_GetStatus (void) {
return { 0 };
}
/**
\fn ARM_SAI_STATUS ARM_SAI_GetStatus (void)
\details
The function \b ARM_SAI_GetStatus retrieves the current SAI interface status.
*****************************************************************************************************************/
void ARM_SAI_SignalEvent (uint32_t event) {
// function body
}
/**
\fn void ARM_SAI_SignalEvent (uint32_t event)
\details
The function \b ARM_SAI_SignalEvent is a callback function registered by the function \ref ARM_SAI_Initialize.
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
The following events can be generated:
Parameter \em event | Bit | Description
------------------------------------------ |:---:|:-----------
\ref ARM_SAI_EVENT_SEND_COMPLETE | 0 | Occurs after call to \ref ARM_SAI_Send to indicate that all the data has been sent (or queued in transmit buffers). The driver is ready for the next call to \ref ARM_SAI_Send.
\ref ARM_SAI_EVENT_RECEIVE_COMPLETE | 1 | Occurs after call to \ref ARM_SAI_Receive to indicate that all the data has been received. The driver is ready for the next call to \ref ARM_SAI_Receive.
\ref ARM_SAI_EVENT_TX_UNDERFLOW | 2 | Occurs when data is to be sent but send operation has not been started. Data field \em tx_underflow = \token{1} of \ref ARM_SAI_STATUS.
\ref ARM_SAI_EVENT_RX_OVERFLOW | 3 | Occurs when data is received but receive operation has not been started. Data field \em rx_underflow = \token{1} of \ref ARM_SAI_STATUS.
\ref ARM_SAI_EVENT_FRAME_ERROR | 4 | Occurs in slave mode when invalid synchronization frame is detected. Data field \em event_frame_error = \token{1} of \ref ARM_SAI_STATUS.
*****************************************************************************************************************/
/**
@}
*/
// End SAI Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_SAI.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 10,358 |
```c
/**
\defgroup usbd_interface_gr USB Device Interface
\ingroup usb_interface_gr
\brief Driver API for USB Device Peripheral (%Driver_USBD.h)
@{
*/
/**
\struct ARM_DRIVER_USBD
\details
The functions of the USB Device driver are accessed by function pointers. Refer to \ref DriverFunctions for
overview information.
Each instance of an USBD provides such an access struct. The instance is indicated by
a postfix in the symbol name of the access struct, for example:
- \b Driver_USBD0 is the name of the access struct of the first instance (no. 0).
- \b Driver_USBD1 is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_USBD<i>n</i></b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
\note The struct must remain unchanged.
*****************************************************************************************************************/
/**
\struct ARM_USBD_CAPABILITIES
\details
A USB Device driver can be implemented with different capabilities.
The data fields of this structure encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_USBD_GetCapabilities
\note The struct must remain unchanged.
*****************************************************************************************************************/
/**
\struct ARM_USBD_STATE
\details
This structure stores information about the state of the USB Device. The data fields encode the established speed,
whether the device is powered and active.
<b>Returned by:</b>
- \ref ARM_USBD_DeviceGetState
*****************************************************************************************************************/
/**
\typedef ARM_USBD_SignalDeviceEvent_t
\details
Provides the typedef for the callback function \ref ARM_USBD_SignalDeviceEvent.
<b>Parameter for:</b>
- \ref ARM_USBD_Initialize
*******************************************************************************************************************/
/**
\typedef ARM_USBD_SignalEndpointEvent_t
\details
Provides the typedef for the callback function \ref ARM_USBD_SignalEndpointEvent.
<b>Parameter for:</b>
- \ref ARM_USBD_Initialize
*******************************************************************************************************************/
/**
\defgroup USBD_dev_events USBD Device Events
\ingroup usbd_interface_gr
\brief The USB Device driver generates Device call back events that are notified via the function \ref ARM_USBD_SignalDeviceEvent.
\details
This section provides the event values for the \ref ARM_USBD_SignalDeviceEvent callback function.
The following call back notification events are generated:
@{
\def ARM_USBD_EVENT_VBUS_ON
\def ARM_USBD_EVENT_VBUS_OFF
\def ARM_USBD_EVENT_RESET
\def ARM_USBD_EVENT_HIGH_SPEED
\def ARM_USBD_EVENT_SUSPEND
\def ARM_USBD_EVENT_RESUME
@}
*/
/**
\defgroup USBD_ep_events USBD Endpoint Events
\ingroup usbd_interface_gr
\brief The USB Device driver generates Endpoint call back events that are notified via the function \ref ARM_USBD_SignalEndpointEvent.
\details
This section provides the event values for the \ref ARM_USBD_SignalEndpointEvent callback function.
The following call back notification events are generated:
@{
\def ARM_USBD_EVENT_SETUP
\def ARM_USBD_EVENT_OUT
\def ARM_USBD_EVENT_IN
@}
*/
//
// Functions
//
ARM_DRIVER_VERSION ARM_USBD_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_USBD_GetVersion (void)
\details
The function \b ARM_USBD_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_USBD Driver_USBD0;
ARM_DRIVER_USBD *drv_info;
void setup_usbd (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_USBD0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*****************************************************************************************************************/
ARM_USBD_CAPABILITIES ARM_USBD_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_USBD_CAPABILITIES ARM_USBD_GetCapabilities (void)
\details
The function \b ARM_USBD_GetCapabilities returns information about capabilities in this driver implementation.
The data fields of the structure \ref ARM_USBD_CAPABILITIES encode various capabilities, for example
if the hardware can create signal events using the \ref ARM_USBD_SignalDeviceEvent callback function.
Example:
\code
extern ARM_DRIVER_USBD Driver_USBD0;
ARM_DRIVER_USBD *drv_info;
void read_capabilities (void) {
ARM_USBD_CAPABILITIES drv_capabilities;
drv_info = &Driver_USBD0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*****************************************************************************************************************/
int32_t ARM_USBD_Initialize (ARM_USBD_SignalDeviceEvent_t cb_device_event,
ARM_USBD_SignalEndpointEvent_t cb_endpoint_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_Initialize (ARM_USBD_SignalDeviceEvent_t cb_device_event, ARM_USBD_SignalEndpointEvent_t cb_endpoint_event)
\details
The function \b ARM_USBD_Initialize initializes the USB Device interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes the resources needed for the USBD interface.
- Registers the \ref ARM_USBD_SignalDeviceEvent callback function.
- Registers the \ref ARM_USBD_SignalEndpointEvent callback function.
The parameter \em cb_device_event is a pointer to the \ref ARM_USBD_SignalDeviceEvent callback function; use a NULL pointer
when no device callback signals are required. \n
The parameter \em cb_endpoint_event is a pointer to the \ref ARM_USBD_SignalEndpointEvent callback function.
\b Example:
- see \ref usbd_interface_gr - Driver Functions
*****************************************************************************************************************/
int32_t ARM_USBD_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_Uninitialize (void)
\details
The function \b ARM_USBD_Uninitialize de-initializes the resources of USBD interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*****************************************************************************************************************/
int32_t ARM_USBD_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_USBD_PowerControl operates the power modes of the USB Device interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*****************************************************************************************************************/
int32_t ARM_USBD_DeviceConnect (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_DeviceConnect (void)
\details
The function \b ARM_USBD_DeviceConnect signals to the host that the device is connected.
*****************************************************************************************************************/
int32_t ARM_USBD_DeviceDisconnect (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_DeviceDisconnect (void)
\details
The function \b ARM_USBD_DeviceDisconnect signals to the host that the device is disconnected.
*****************************************************************************************************************/
ARM_USBD_STATE ARM_USBD_DeviceGetState (void) {
return ARM_DRIVER_OK;
}
/**
\fn ARM_USBD_STATE ARM_USBD_DeviceGetState (void)
\details
Retrieves the current USB device state.
*****************************************************************************************************************/
int32_t ARM_USBD_DeviceRemoteWakeup (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_DeviceRemoteWakeup (void)
\details
The function \b ARM_USBD_DeviceRemoteWakeup signals remote wakeup to the host.
*****************************************************************************************************************/
int32_t ARM_USBD_DeviceSetAddress (uint8_t dev_addr) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_DeviceSetAddress (uint8_t dev_addr)
\details
Assigns an address to the device.
\note This function is called after status stage of the Set Address request (after IN packet in status stage was sent with the old address).
*****************************************************************************************************************/
int32_t ARM_USBD_ReadSetupPacket (uint8_t *setup) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_ReadSetupPacket (uint8_t *setup)
\details
The function \b ARM_USBD_ReadSetupPacket reads the last SETUP packet (8 bytes) that was received over Control Endpoint (Endpoint 0)
which is indicated by \ref ARM_USBD_EVENT_SETUP event.
<b>See also:</b>
- \ref ARM_USBD_SignalEndpointEvent
*****************************************************************************************************************/
int32_t ARM_USBD_EndpointConfigure (uint8_t ep_addr,
uint8_t ep_type,
uint16_t ep_max_packet_size) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_EndpointConfigure (uint8_t ep_addr, uint8_t ep_type, uint16_t ep_max_packet_size)
\details
The function \b ARM_USBD_EndpointConfigure configures an endpoint for transfers.
*****************************************************************************************************************/
int32_t ARM_USBD_EndpointUnconfigure (uint8_t ep_addr) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_EndpointUnconfigure (uint8_t ep_addr)
\details
The function \b ARM_USBD_EndpointUnconfigure de-configures the specified endpoint.
The parameter \em ep_addr specifies the endpoint address.
*****************************************************************************************************************/
int32_t ARM_USBD_EndpointStall (uint8_t ep_addr, bool stall) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_EndpointStall (uint8_t ep_addr, bool stall)
\details
The function \b ARM_USBD_EndpointStall sets or clears stall condition for the specified endpoint.
The parameter \em ep_addr specifies the endpoint address. \n
The parameter \em stall is a boolean parameter.
*****************************************************************************************************************/
int32_t ARM_USBD_EndpointTransfer (uint8_t ep_addr, uint8_t *data, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_EndpointTransfer (uint8_t ep_addr, uint8_t *data, uint32_t num)
\details
The function \b ARM_USBD_EndpointTransfer reads from or writes data to an USB Endpoint.
The parameter \em ep_addr specifies the endpoint address. \n
The parameter \em data is a buffer for data to read or data to write. \n
The parameter \em num is the number of bytes to transfer (must be multiple of endpoint maximum packet size for Read transfers).
The function is non-blocking and returns as soon as the driver starts the operation on the specified endpoint.
During the operation it is not allowed to call this function again on the same endpoint.
Also the data buffer must stay allocated and the contents of data must not be modified.
Direction in the endpoint address specifies the type of transfer:
- Endpoint Read for OUT endpoint (direction = 0)
- Endpoint Write for IN endpoint (direction = 1)
Endpoint Read is finished when the requested number of data bytes have been received or when a short packet or ZLP (Zero-Length Packet) has been received.
Completion of operation is indicated by \ref ARM_USBD_EVENT_OUT event. Number of successfully received data bytes can be retrieved
by calling \ref ARM_USBD_EndpointTransferGetResult.
Endpoint Write is finished when the requested number of data bytes have been sent.
Completion of operation is indicated by \ref ARM_USBD_EVENT_IN event. Number of successfully sent data bytes can be retrieved
by calling \ref ARM_USBD_EndpointTransferGetResult.
Transfer operation can be aborted by calling \ref ARM_USBD_EndpointTransferAbort.
*****************************************************************************************************************/
uint32_t ARM_USBD_EndpointTransferGetResult (uint8_t ep_addr) {
return 0;
}
/**
\fn uint32_t ARM_USBD_EndpointTransferGetResult (uint8_t ep_addr)
\details
The function \b ARM_USBD_EndpointTransferGetResult returns the number of successfully transferred data bytes started by \ref ARM_USBD_EndpointTransfer.
The parameter \em ep_addr specifies the endpoint address.
*****************************************************************************************************************/
int32_t ARM_USBD_EndpointTransferAbort (uint8_t ep_addr) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBD_EndpointTransferAbort (uint8_t ep_addr)
\details
The function \b ARM_USBD_EndpointTransferAbort aborts the transfer to an endpoint started by \ref ARM_USBD_EndpointTransfer.
The parameter \em ep_addr specifies the endpoint address.
*****************************************************************************************************************/
uint16_t ARM_USBD_GetFrameNumber (void) {
return 0;
}
/**
\fn uint16_t ARM_USBD_GetFrameNumber (void)
\details
Retrieves the sequential 11-bit frame number of the last Start of Frame (SOF) packet.
*****************************************************************************************************************/
void ARM_USBD_SignalDeviceEvent (uint32_t event) {
// function body
}
/**
\fn void ARM_USBD_SignalDeviceEvent (uint32_t event)
\details
The function \b ARM_USBD_SignalDeviceEvent is a callback function registered by the function \ref ARM_USBD_Initialize.
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_USBD_CAPABILITIES, which can be retrieved with the function \ref ARM_USBD_GetCapabilities.
The following events can be generated:
Event | Bit| Description | supported when \ref ARM_USBD_CAPABILITIES
:-------------------------------|---:|:---------------------------------------------------|----------------------------------------------
\ref ARM_USBD_EVENT_VBUS_ON | 0 | Occurs when valid VBUS voltage is detected. | data field \em event_vbus_on = \token{1}
\ref ARM_USBD_EVENT_VBUS_OFF | 1 | Occurs when VBUS voltage is turned off. | data field \em event_vbus_off = \token{1}
\ref ARM_USBD_EVENT_RESET | 2 | Occurs when USB Reset is detected. | <i>always supported</i>
\ref ARM_USBD_EVENT_HIGH_SPEED | 3 | Occurs when USB Device is switched to High-speed. | <i>always supported</i>
\ref ARM_USBD_EVENT_SUSPEND | 4 | Occurs when USB Suspend is detected. | <i>always supported</i>
\ref ARM_USBD_EVENT_RESUME | 5 | Occurs when USB Resume is detected. | <i>always supported</i>
*****************************************************************************************************************/
void ARM_USBD_SignalEndpointEvent (uint8_t ep_addr, uint32_t ep_event) {
// function body
}
/**
\fn void ARM_USBD_SignalEndpointEvent (uint8_t ep_addr, uint32_t event)
\details
The function \b ARM_USBD_SignalEndpointEvent is a callback function registered by the function \ref ARM_USBD_Initialize.
The argument \a ep_addr specifies the endpoint. \n
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
The following events can be generated:
Event | Bit | Description
:----------------------------------------|----:|:-----------
\ref ARM_USBD_EVENT_SETUP | 0 | Occurs when SETUP packet is received over Control Endpoint.
\ref ARM_USBD_EVENT_OUT | 1 | Occurs when data is received over OUT Endpoint.
\ref ARM_USBD_EVENT_IN | 2 | Occurs when data is sent over IN Endpoint.
*****************************************************************************************************************/
/**
@}
*/
// End USBD Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_USBD.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 3,614 |
```c
#include "Driver_USART.h"
#include "cmsis_os.h" /* ARM::CMSIS:RTOS:Keil RTX */
#include <stdio.h>
#include <string.h>
void myUART_Thread(void const *argument);
osThreadId tid_myUART_Thread;
/* USART Driver */
extern ARM_DRIVER_USART Driver_USART3;
void myUSART_callback(uint32_t event)
{
uint32_t mask;
mask = ARM_USART_EVENT_RECEIVE_COMPLETE |
ARM_USART_EVENT_TRANSFER_COMPLETE |
ARM_USART_EVENT_SEND_COMPLETE |
ARM_USART_EVENT_TX_COMPLETE ;
if (event & mask) {
/* Success: Wakeup Thread */
osSignalSet(tid_myUART_Thread, 0x01);
}
if (event & ARM_USART_EVENT_RX_TIMEOUT) {
__breakpoint(0); /* Error: Call debugger or replace with custom error handling */
}
if (event & (ARM_USART_EVENT_RX_OVERFLOW | ARM_USART_EVENT_TX_UNDERFLOW)) {
__breakpoint(0); /* Error: Call debugger or replace with custom error handling */
}
}
/* CMSIS-RTOS Thread - UART command thread */
void myUART_Thread(const void* args)
{
static ARM_DRIVER_USART * USARTdrv = &Driver_USART3;
ARM_DRIVER_VERSION version;
ARM_USART_CAPABILITIES drv_capabilities;
char cmd;
#ifdef DEBUG
version = USARTdrv->GetVersion();
if (version.api < 0x200) /* requires at minimum API version 2.00 or higher */
{ /* error handling */
return;
}
drv_capabilities = USARTdrv->GetCapabilities();
if (drv_capabilities.event_tx_complete == 0)
{ /* error handling */
return;
}
#endif
/*Initialize the USART driver */
USARTdrv->Initialize(myUSART_callback);
/*Power up the USART peripheral */
USARTdrv->PowerControl(ARM_POWER_FULL);
/*Configure the USART to 4800 Bits/sec */
USARTdrv->Control(ARM_USART_MODE_ASYNCHRONOUS |
ARM_USART_DATA_BITS_8 |
ARM_USART_PARITY_NONE |
ARM_USART_STOP_BITS_1 |
ARM_USART_FLOW_CONTROL_NONE, 4800);
/* Enable Receiver and Transmitter lines */
USARTdrv->Control (ARM_USART_CONTROL_TX, 1);
USARTdrv->Control (ARM_USART_CONTROL_RX, 1);
USARTdrv->Send("\nPress Enter to receive a message", 34);
osSignalWait(0x01, osWaitForever);
while (1)
{
USARTdrv->Receive(&cmd, 1); /* Get byte from UART */
osSignalWait(0x01, osWaitForever);
if (cmd == 13) /* CR, send greeting */
{
USARTdrv->Send("\nHello World!", 12);
osSignalWait(0x01, osWaitForever);
}
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/USART_Demo.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 630 |
```c
/**
\defgroup i2c_interface_gr I2C Interface
\brief Driver API for I2C Bus Peripheral (%Driver_I2C.h)
\details
I<sup>2</sup>C (Inter-Integrated Circuit, referred to as I-squared-C, I-two-C, or IIC) is a multi-master serial single-ended bus and is mostly used
on single boards, but can also connect to components which are linked via cable.
Most significant features of the I<sup>2</sup>C bus include:
- Only two bus lines are required
- I<sup>2</sup>C is a true multi-master bus. Simple master/slave relationships exist between all components
- A baud rate is not required; the master device determines a bus clock
- Each connected device is addressable by a unique address
- Providing arbitration and collision detection
For more information about I<sup>2</sup>C refer to the following web pages:
- Wikipedia: <a href="path_to_url" target="_blank">I<sup>2</sup>C</a>
- <a href="path_to_url" target="_blank">www.i2c-bus.org</a>.
Devices can operation in Master or Slave mode:
- To operate in Master mode call the functions \ref ARM_I2C_MasterTransmit or \ref ARM_I2C_MasterReceive. These functions get as argument a <em>slave address</em>.
- To operate in Slave mode set the <em>slave address</em> using the function \ref ARM_I2C_Control. The functions \ref ARM_I2C_SlaveTransmit or \ref ARM_I2C_SlaveReceive are used to transfer data in Slave mode.
<b>I<sup>2</sup>C Slave Address</b>
Depending on the device, I<sup>2</sup>C supports 7-bit and 10-bit Slaves addresses.
The element <em>address_10_bit</em> in \ref ARM_I2C_CAPABILITIES indicates that the driver is able to handle 10-bit addresses.
A 10-bit Slave address is ORed with \ref ARM_I2C_ADDRESS_10BIT.
I<sup>2</sup>C also supports a General Call to all Slaves by using the slave address value \token{0}.
A General Call is recognized by Slaves have a slave address value \ref ARM_I2C_ADDRESS_GC registered with the
function \ref ARM_I2C_Control.
<b>Block Diagram</b>
The I2C driver allows you to connect low-speed peripherals to a motherboard, embedded system, cellphone, or other electronic device.
\image html I2C_BlockDiagram.png "Master/Slave connected via I2C interface"
<b>I<sup>2</sup>C API</b>
The following header files define the Application Programming Interface (API) for the I<sup>2</sup>C interface:
- \b %Driver_I2C.h : Driver API for I2C Bus Peripheral
The driver implementation is a typical part of the Device Family Pack (DFP) that supports the
peripherals of the microcontroller family.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_I2C : access struct for I2C driver functions
\anchor example <b>Example Code</b>
The following example code shows the usage of the I<sup>2</sup>C interface in Master mode.
\include I2C_Demo.c
The following example code shows the usage of the I<sup>2</sup>C interface in Slave mode.
\include I2C_SlaveDemo.c
@{
*/
/**
\struct ARM_DRIVER_I2C
\details
The functions of the I2C interface are accessed by function pointers exposed by this structure. Refer to \ref DriverFunctions for
overview information.
Each instance of an I2C provides such an access structure. The instance is indicated by
a postfix in the symbol name of the access structure, for example:
- \b Driver_I2C0 is the name of the access struct of the first instance (no. 0).
- \b Driver_I2C1 is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>%Driver_I2C<i>n</i></b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*******************************************************************************************************************/
/**
\struct ARM_I2C_CAPABILITIES
\details
An I2C driver can be implemented with different capabilities.
The data fields of this struct encode the capabilities implemented by this driver.
The element \em address_10_bit indicates that the driver is able to handle 10-bit addressing natively.
User can still emulate the 10-bit addressing in software if the driver does not support it.
<b>Returned by:</b>
- \ref ARM_I2C_GetCapabilities
*******************************************************************************************************************/
/**
\struct ARM_I2C_STATUS
\details
Structure with information about the status of the I2C.
The flag \em busy indicates that the driver is busy executing Master/Slave Transmit/Receive operation.
It is set:
- when Master operation starts: after calling \ref ARM_I2C_MasterTransmit or \ref ARM_I2C_MasterReceive
- when Slave operation starts: after calling \ref ARM_I2C_SlaveTransmit or \ref ARM_I2C_SlaveReceive and after being addressed by a Master as the Slave
It is cleared when Master/Slave operation has finished.
The flag \em mode indicates the current mode which is Master when Master Transmit/Receive is active or Slave otherwise.
The flag \em direction indicates either Transmitter or Receiver mode. It is updated during Master/Slave operation when the Slave is addressed by a Master.
The flag \em general_call indicates a General call (address \token{0}) when in Slave mode.
The flag \em arbitration_lost indicates that the Master has lost arbitration. The current Master operation is aborted.
The flag \em bus_error indicates that a bus error has been detected. The current Master/Slave operation is aborted.
<b>Returned by:</b>
- \ref ARM_I2C_GetStatus
*******************************************************************************************************************/
/**
\typedef ARM_I2C_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_I2C_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_I2C_Initialize
*******************************************************************************************************************/
/**
\defgroup I2C_events I2C Events
\ingroup i2c_interface_gr
\brief The I2C driver generates call back events that are notified via the function \ref ARM_I2C_SignalEvent.
\details
This section provides the event values for the \ref ARM_I2C_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_I2C_EVENT_TRANSFER_DONE
\def ARM_I2C_EVENT_TRANSFER_INCOMPLETE
\def ARM_I2C_EVENT_SLAVE_TRANSMIT
\def ARM_I2C_EVENT_SLAVE_RECEIVE
\def ARM_I2C_EVENT_ADDRESS_NACK
\def ARM_I2C_EVENT_GENERAL_CALL
\def ARM_I2C_EVENT_ARBITRATION_LOST
\def ARM_I2C_EVENT_BUS_ERROR
\def ARM_I2C_EVENT_BUS_CLEAR
@}
*/
//
// Functions
//
ARM_DRIVER_VERSION ARM_I2C_GetVersion (void) {
return { 0, 0 };
};
/**
\fn ARM_DRIVER_VERSION ARM_I2C_GetVersion (void)
\details
The function \b ARM_I2C_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_I2C Driver_I2C0;
ARM_DRIVER_I2C *drv_info;
void setup_i2c (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_I2C0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*******************************************************************************************************************/
ARM_I2C_CAPABILITIES ARM_I2C_GetCapabilities (void) {
return { 0 };
};
/**
\fn ARM_I2C_CAPABILITIES ARM_I2C_GetCapabilities (void)
\details
The function \b ARM_I2C_GetCapabilities returns information about capabilities of this driver implementation.
The data fields of the struct \ref ARM_I2C_CAPABILITIES encodes the driver capabilities.
Example:
\code
extern ARM_DRIVER_I2C Driver_I2C0;
ARM_DRIVER_I2C *drv_info;
void read_capabilities (void) {
ARM_I2C_CAPABILITIES drv_capabilities;
drv_info = &Driver_I2C0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*******************************************************************************************************************/
int32_t ARM_I2C_Initialize (ARM_I2C_SignalEvent_t cb_event) {
return ARM_DRIVER_OK;
};
/**
\fn int32_t ARM_I2C_Initialize (ARM_I2C_SignalEvent_t cb_event)
\details
The function \b ARM_I2C_Initialize initializes the I2C interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes and the I/O resources for the I2C interface.
- Registers the \ref ARM_I2C_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_I2C_SignalEvent callback function.
Use a NULL pointer when no callback events are required.
Can be called multiple times. If the peripheral is already initialized the function performs no operation and
returns with \ref ARM_DRIVER_OK. Refer to \ref CallSequence for more information.
\sa ARM_I2C_PowerControl
\sa ARM_I2C_Uninitialize
\b Example:
- refer to \ref example "Example Code"
*******************************************************************************************************************/
int32_t ARM_I2C_Uninitialize (void) {
return ARM_DRIVER_OK;
};
/**
\fn int32_t ARM_I2C_Uninitialize (void)
\details
The function \b ARM_I2C_Uninitialize releases the I/O resources of I2C interface.
It is called when the middleware component stops operation and releases the I/O resources used by the I2C interface.
Refer to \ref CallSequence for more information.
\sa ARM_I2C_Initialize
\sa ARM_I2C_PowerControl
*******************************************************************************************************************/
int32_t ARM_I2C_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
};
/**
\fn int32_t ARM_I2C_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_I2C_PowerControl operates the power modes of the I2C interface.
The parameter \em state can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode,
then the function performs no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
\sa ARM_I2C_Initialize
\sa ARM_I2C_Uninitialize
*******************************************************************************************************************/
int32_t ARM_I2C_MasterTransmit (uint32_t addr, const uint8_t *data, uint32_t num, bool xfer_pending) {
return ARM_DRIVER_OK;
};
/**
\fn int32_t ARM_I2C_MasterTransmit (uint32_t addr, const uint8_t *data, uint32_t num, bool xfer_pending)
\details
This function \b ARM_I2C_MasterTransmit transmits data as Master to the selected Slave.
The operation consists of:
- Master generates START condition
- Master addresses the Slave as Master Transmitter
- Master transmits data to the addressed Slave
- Master generates STOP condition (if \em xfer_pending is "false")
The parameter \em addr is the address of the slave to transmit the data to. The value can be ORed with \ref ARM_I2C_ADDRESS_10BIT to
identify a 10-bit address value. \n
The parameter \em data and \em num specify the address of a data buffer and the number of bytes to transmit. \n
Set the parameter \em xfer_pending to 'true' if another transfer operation follows. With \em xfer_pending set to 'false' a STOP condition is generated.
The function is non-blocking and returns as soon as the driver has started the operation.
During the operation it is not allowed to call any Master function again. Also the data buffer must stay allocated and the contents of data must not be modified.
When transmit operation has finished the \ref ARM_I2C_EVENT_TRANSFER_DONE event is generated.
When not all the data is transferred then the \ref ARM_I2C_EVENT_TRANSFER_INCOMPLETE flag is set at the same time.
Number of data bytes transmitted and acknowledged is returned by the function \ref ARM_I2C_GetDataCount during and after the operation has finished.
The operation is aborted in the following cases (\ref ARM_I2C_EVENT_TRANSFER_DONE event is generated together with):
- selected slave has not acknowledged the address: \ref ARM_I2C_EVENT_ADDRESS_NACK event
- arbitration has been lost: \ref ARM_I2C_EVENT_ARBITRATION_LOST event
- bus error has been detected: \ref ARM_I2C_EVENT_BUS_ERROR event
Status can be monitored by calling the \ref ARM_I2C_GetStatus and checking the flags.
Transmit operation can be aborted also by calling \ref ARM_I2C_Control with the parameter \em control \ref ARM_I2C_ABORT_TRANSFER.
*******************************************************************************************************************/
int32_t ARM_I2C_MasterReceive (uint32_t addr, uint8_t *data, uint32_t num, bool xfer_pending) {
return ARM_DRIVER_OK;
};
/**
\fn int32_t ARM_I2C_MasterReceive (uint32_t addr, uint8_t *data, uint32_t num, bool xfer_pending)
\details
This function \b ARM_I2C_MasterReceive is used to receive data as Master from the selected Slave.
The operation consists of:
- Master generates START condition
- Master addresses the Slave as Master Receiver
- Master receives data from the addressed Slave
- Master generates STOP condition (if \em xfer_pending is "false")
The parameter \em addr is the address of the slave to receive the data from. The value can be ORed with \ref ARM_I2C_ADDRESS_10BIT to
identify a 10-bit address value. \n
The parameter \em data and \em num specify the address of a data buffer and the number of bytes to receive. \n
Set the parameter \em xfer_pending to 'true' if another transfer operation follows. With \em xfer_pending set to 'false' a STOP condition is generated.
The function is non-blocking and returns as soon as the driver has started the operation.
During the operation it is not allowed to call any Master function again. Also the data buffer must stay allocated.
When receive operation has finished the \ref ARM_I2C_EVENT_TRANSFER_DONE event is generated.
When not all the data is transferred then the \ref ARM_I2C_EVENT_TRANSFER_INCOMPLETE flag is set at the same time.
Number of data bytes received is returned by the function \ref ARM_I2C_GetDataCount during and after the operation has finished.
The operation is aborted in the following cases (\ref ARM_I2C_EVENT_TRANSFER_DONE event is generated together with):
- selected slave has not acknowledged the address: \ref ARM_I2C_EVENT_ADDRESS_NACK event
- arbitration has been lost: \ref ARM_I2C_EVENT_ARBITRATION_LOST event
- bus error has been detected: \ref ARM_I2C_EVENT_BUS_ERROR event
Status can be monitored by calling the \ref ARM_I2C_GetStatus and checking the flags.
Receive operation can be aborted also by calling \ref ARM_I2C_Control with the parameter \em control = \ref ARM_I2C_ABORT_TRANSFER.
*******************************************************************************************************************/
int32_t ARM_I2C_SlaveTransmit (const uint8_t *data, uint32_t num) {
return ARM_DRIVER_OK;
};
/**
\fn int32_t ARM_I2C_SlaveTransmit (const uint8_t *data, uint32_t num)
\details
This function \b ARM_I2C_SlaveTransmit is used to transmit data as Slave to the Master.
The parameter \em data is a pointer to the data to transmit. \n
The parameter \em num specifies the number of bytes to transmit.
The function is non-blocking and returns as soon as the driver has registered the operation.
The actual operation will start after being addressed by the master as a Slave Transmitter. If the operation has not been registered at that point the \ref ARM_I2C_EVENT_SLAVE_TRANSMIT event is generated.
The same event is also generated if the operation has finished (specified number of bytes transmitted) but more data is requested by the master.
It is not allowed to call this function again if the operation has started until it finishes. Also the data buffer must stay allocated and the contents of data must not be modified.
When transmit operation has finished the \ref ARM_I2C_EVENT_TRANSFER_DONE event is generated.
When not all the data is transferred then the \ref ARM_I2C_EVENT_TRANSFER_INCOMPLETE flag is set at the same time.
Number of data bytes transmitted is returned by the function \ref ARM_I2C_GetDataCount during and after the operation has finished.
In case that a General call has been detected the \ref ARM_I2C_EVENT_GENERAL_CALL flag is indicated together with the \ref ARM_I2C_EVENT_TRANSFER_DONE event (also with \ref ARM_I2C_EVENT_SLAVE_TRANSMIT event).
In case that bus error has been detected then the operation is aborted and the \ref ARM_I2C_EVENT_BUS_ERROR event is generated together with \ref ARM_I2C_EVENT_TRANSFER_DONE.
Slave will only respond to its own address (or General call if enabled) that is specified by calling \ref ARM_I2C_Control with \ref ARM_I2C_OWN_ADDRESS as control parameter.
Using address \token{0} disables the slave.
Status can be monitored by calling the \ref ARM_I2C_GetStatus and checking the flags.
Transmit operation can be canceled or aborted by calling \ref ARM_I2C_Control with the parameter \em control = \ref ARM_I2C_ABORT_TRANSFER.
*******************************************************************************************************************/
int32_t ARM_I2C_SlaveReceive (uint8_t *data, uint32_t num) {
return ARM_DRIVER_OK;
};
/**
\fn int32_t ARM_I2C_SlaveReceive (uint8_t *data, uint32_t num)
\details
This function \b ARM_I2C_SlaveReceive receives data as Slave from the Master.
The parameter \em data is a pointer to the data to receive. \n
The parameter \em num specifies the number of bytes to receive.
The function is non-blocking and returns as soon as the driver has registered the operation.
The actual operation will start after being addressed by the master as a Slave Receiver. If the operation has not been registered at that point the \ref ARM_I2C_EVENT_SLAVE_RECEIVE event is generated.
It is not allowed to call this function again if the operation has started until it finishes. Also the data buffer must stay allocated.
When receive operation has finished the \ref ARM_I2C_EVENT_TRANSFER_DONE event is generated.
When not all the data is transferred then the \ref ARM_I2C_EVENT_TRANSFER_INCOMPLETE flag is set at the same time.
Number of data bytes received and acknowledged is returned by the function \ref ARM_I2C_GetDataCount during and after the operation has finished.
In case that a General call has been detected the \ref ARM_I2C_EVENT_GENERAL_CALL flag is indicated together with the \ref ARM_I2C_EVENT_TRANSFER_DONE event (also with \ref ARM_I2C_EVENT_SLAVE_RECEIVE event).
In case that bus error has been detected then the operation is aborted and the \ref ARM_I2C_EVENT_BUS_ERROR event is generated together with \ref ARM_I2C_EVENT_TRANSFER_DONE.
Slave will only respond to its own address (or General call if enabled) that is specified by calling \ref ARM_I2C_Control with \ref ARM_I2C_OWN_ADDRESS as control parameter.
Using address \token{0} disables the slave.
Status can be monitored by calling the \ref ARM_I2C_GetStatus and checking the flags.
Receive operation can be canceled or aborted by calling \ref ARM_I2C_Control with the parameter \em control = \ref ARM_I2C_ABORT_TRANSFER.
*******************************************************************************************************************/
int32_t ARM_I2C_GetDataCount (void) {
return 0;
}
/**
\fn int32_t ARM_I2C_GetDataCount (void)
\details
The function \b ARM_I2C_GetDataCount returns the number of currently transferred data bytes during and after:
- \ref ARM_I2C_MasterTransmit : number of data bytes transmitted and acknowledged
- \ref ARM_I2C_MasterReceive : number of data bytes received
- \ref ARM_I2C_SlaveTransmit : number of data bytes transmitted
- \ref ARM_I2C_SlaveReceive : number of data bytes received and acknowledged
When the Slave is not yet addressed by the Master then \token{-1} is returned.
*****************************************************************************************************************/
int32_t ARM_I2C_Control (uint32_t control, uint32_t arg) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_I2C_Control (uint32_t control, uint32_t arg)
\details
The function \b ARM_I2C_Control operates the I2C interface and executes various operations.
The parameter \em control specifies various operations as listed in the table below. \n
The parameter \em arg provides, depending on the operation, additional information. \n
Parameter \em control | Operation
:--------------------------------|:--------------------------------------------
\ref ARM_I2C_OWN_ADDRESS | Set Own Slave Address; \em arg = slave address
\ref ARM_I2C_BUS_SPEED | Set Bus Speed; \em arg = bus speed
\ref ARM_I2C_BUS_CLEAR | Clear the bus by sending nine clock pulses
\ref ARM_I2C_ABORT_TRANSFER | Aborts the data transfer between Master and Slave for Transmit or Receive
<b>Set Own Slave Address</b>
After initialization, the I2C Device has no slave address assigned and does not accept any requests from
an I2C Master.
The \em control operation \ref ARM_I2C_OWN_ADDRESS sets the slave address with the parameter \em arg.
The slave address can be ORed with \ref ARM_I2C_ADDRESS_10BIT to indicate a 10-bit address.
The slave address can be ORed with \ref ARM_I2C_ADDRESS_GC to indicate that the slave accepts a General Call.
If the slave address value is only \ref ARM_I2C_ADDRESS_GC, then the slave only accepts a General Call.
The slave address value \token{0} disables Slave mode and clears any assigned slave address.
**Examples:**
Set the Slave address value \token{0x45} as 7-bit address.
\code
I2Cdrv->Control (ARM_I2C_OWN_ADDRESS, 0x45);
\endcode
Set the Slave address value \token{0x135} as 10-bit address and accept a General Call.
\code
I2Cdrv->Control (ARM_I2C_OWN_ADDRESS, 0x135 | ARM_I2C_ADDRESS_10BIT | ARM_I2C_ADDRESS_GC);
\endcode
<b>Bus Speed</b>
The \em control operation \ref ARM_I2C_BUS_SPEED sets the bus speed using the parameter \em arg.
Parameter \em arg | Bus Speed
:--------------------------------|:--------------------------------------------
\ref ARM_I2C_BUS_SPEED_STANDARD | Standard Speed to (\token{100 kHz})
\ref ARM_I2C_BUS_SPEED_FAST | Fast Speed (\token{400kHz})
\ref ARM_I2C_BUS_SPEED_FAST_PLUS | Fast + Speed (\token{1MHz})
\ref ARM_I2C_BUS_SPEED_HIGH | High Speed (\token{3.4MHz})
**Example:**
\code
I2Cdrv->Control (ARM_I2C_BUS_SPEED, I2C_BUS_SPEED_FAST);
\endcode
*****************************************************************************************************************/
ARM_I2C_STATUS ARM_I2C_GetStatus (void) {
return { 0 };
}
/**
\fn ARM_I2C_STATUS ARM_I2C_GetStatus (void)
\details
The function \b ARM_I2C_GetStatus returns the current I2C interface status.
Refer to \ref ARM_I2C_STATUS for details.
*****************************************************************************************************************/
void ARM_I2C_SignalEvent (uint32_t event) {
// function body
}
/**
\fn void ARM_I2C_SignalEvent (uint32_t event)
\details
The function \b ARM_I2C_SignalEvent is a callback function registered by the function \ref ARM_I2C_Initialize..
It is called by the I2C driver to notify the application about \ref I2C_events occured during operation.
The parameter \a event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
The following events can be generated:
Parameter \em event | Bit | Description
:---------------------------------------- |:---------:|:----------------------------------------------------------
\ref ARM_I2C_EVENT_TRANSFER_DONE | 1UL << 0 | Occurs after Master/Slave Transmit/Receive operation has finished.
\ref ARM_I2C_EVENT_TRANSFER_INCOMPLETE | 1UL << 1 | Occurs together with \ref ARM_I2C_EVENT_TRANSFER_DONE when less data is transferred then requested.
\ref ARM_I2C_EVENT_SLAVE_TRANSMIT | 1UL << 2 | Occurs when addressed as Slave Transmitter and \ref ARM_I2C_SlaveTransmit has not been started.
\ref ARM_I2C_EVENT_SLAVE_RECEIVE | 1UL << 3 | Occurs when addressed as Slave Receiver and \ref ARM_I2C_SlaveReceive has not been started.
\ref ARM_I2C_EVENT_ADDRESS_NACK | 1UL << 4 | Occurs in master mode when address is not acknowledged from slave.
\ref ARM_I2C_EVENT_GENERAL_CALL | 1UL << 5 | Indicates General Call in slave mode together with \ref ARM_I2C_EVENT_TRANSFER_DONE, \ref ARM_I2C_EVENT_SLAVE_TRANSMIT and \ref ARM_I2C_EVENT_SLAVE_RECEIVE.
\ref ARM_I2C_EVENT_ARBITRATION_LOST | 1UL << 6 | Occurs in master mode when arbitration is lost.
\ref ARM_I2C_EVENT_BUS_ERROR | 1UL << 7 | Occurs when bus error is detected.
\ref ARM_I2C_EVENT_BUS_CLEAR | 1UL << 8 | Occurs after \ref ARM_I2C_BUS_CLEAR Control operation has finished.
**************************************************************************************************************************/
/**
\defgroup i2c_control_gr I2C Control Codes
\ingroup i2c_interface_gr
\brief Many parameters of the I2C driver are configured using the \ref ARM_I2C_Control function.
@{
\details
The various I2C control codes define:
- \ref i2c_control_codes specify operation parameters and various controls
- \ref i2c_bus_speed_ctrls specify the I2C bus speed
Refer to the \ref ARM_I2C_Control function for further details.
*/
/**
\defgroup i2c_control_codes I2C Control Codes
\ingroup i2c_control_gr
\brief Specify operation parameters and various controls.
\details
@{
\def ARM_I2C_OWN_ADDRESS
\sa ARM_I2C_Control
\def ARM_I2C_BUS_SPEED
Speed is specified using the following values: \ref i2c_bus_speed_ctrls
\sa ARM_I2C_Control
\def ARM_I2C_BUS_CLEAR
\sa ARM_I2C_Control
\def ARM_I2C_ABORT_TRANSFER
\sa ARM_I2C_Control
@}
*/
/**
\defgroup i2c_bus_speed_ctrls I2C Bus Speed
\ingroup i2c_control_gr
\brief Specify the I2C bus speed.
\details
@{
\def ARM_I2C_BUS_SPEED_STANDARD
\sa ARM_I2C_Control
\def ARM_I2C_BUS_SPEED_FAST
\sa ARM_I2C_Control
\def ARM_I2C_BUS_SPEED_FAST_PLUS
\sa ARM_I2C_Control
\def ARM_I2C_BUS_SPEED_HIGH
\sa ARM_I2C_Control
@}
*/
/**
@}
*/
/**
\defgroup i2c_address_flags I2C Address Flags
\ingroup i2c_interface_gr
\brief Specify address flags
\details
Specifies the address type for the functions \ref ARM_I2C_MasterReceive, \ref ARM_I2C_MasterTransmit and \ref ARM_I2C_OWN_ADDRESS.
@{
\def ARM_I2C_ADDRESS_10BIT
\sa ARM_I2C_OWN_ADDRESS
\sa ARM_I2C_MasterTransmit
\sa ARM_I2C_MasterReceive
\def ARM_I2C_ADDRESS_GC
\sa ARM_I2C_OWN_ADDRESS
@}
*/
/**
@}
*/
// End I2C Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_I2C.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 6,429 |
```c
/**
\defgroup can_interface_gr CAN Interface
\brief Driver API for CAN Bus Peripheral (%Driver_CAN.h)
\details
The <b>Controller Area Network</b> Interface Bus (CAN) implements a multi-master serial bus for connecting
microcontrollers and devices, also known as nodes, to communicate with each other in applications without a host computer.
CAN is a message-based protocol, designed originally for automotive applications, but meanwhile used also in many other surroundings.
The complexity of the node can range from a simple I/O device up to an embedded computer with a CAN interface and sophisticated software.
The node may also be a gateway allowing a standard computer to communicate over a USB or Ethernet port to the devices on a CAN network.
Devices are connected to the bus through a host processor, a CAN controller, and a CAN transceiver.
The CAN Driver API allows to implement CAN Interfaces that conform to the
<a href="path_to_url" target="_blank">
CAN specifications available from BOSCH</a>:
- CAN 2.0B: CAN Specification 2.0B (released Sep. 1991) which is now superseded by ISO 11898-1.
- CAN FD: CAN with Flexible Data Rate introduced in 2012 (released April 17th, 2012).
Wikipedia offers more information about the <a href="path_to_url" target="_blank"><b>CAN Bus</b></a>.
**CAN 2.0B**
Every CAN CMSIS-Driver supports the CAN 2.0B standard
CAN 2.0B supports:
- message can contain up to 8 data bytes
- bitrates of up to 1Mbits/s
- \ref Remote_Frame requests
\anchor CAN_FD
<b>CAN FD</b>
Support for CAN FD depends on the hardware.
A CMSIS-Driver that supports CAN FD has the capability \ref ARM_CAN_CAPABILITIES data field \b fd_mode = \token{1}, which can be
retrieved with the function \ref ARM_CAN_GetCapabilities.
CAN FD supports:
- message can contain up to 64 data bytes
- faster data transfers with faster bitrate used during the data phase
CAN FD does not support \ref Remote_Frame requests.
<b>Block Diagram</b>
The CAN Driver API defines a <b>CAN</b> interface for middleware components. The CAN Driver supports multiple
nodes, which are able to send and receive messages, but not simultaneously.
\image html CAN_Node.png "CAN Node Schematic"
CAN API
-------
The following header files define the Application Programming Interface (API) for the CAN interface:
- \b %Driver_CAN.h : Driver API for CAN Bus Peripheral
The driver implementation is a typical part of the Device Family Pack (DFP) that supports the
peripherals of the microcontroller family.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_CAN : access struct for CAN driver functions
<b>Example Code</b>
The following example code shows the usage of the CAN interface.
\code
#include <stdio.h>
#include <string.h>
#include "cmsis_os.h"
#include "Driver_CAN.h"
// CAN Driver Controller selector
#define CAN_CONTROLLER 1 // CAN Controller number
#define _CAN_Driver_(n) Driver_CAN##n
#define CAN_Driver_(n) _CAN_Driver_(n)
extern ARM_DRIVER_CAN CAN_Driver_(CAN_CONTROLLER);
#define ptrCAN (&CAN_Driver_(CAN_CONTROLLER))
uint32_t rx_obj_idx = 0xFFFFFFFFU;
uint8_t rx_data[8];
ARM_CAN_MSG_INFO rx_msg_info;
uint32_t tx_obj_idx = 0xFFFFFFFFU;
uint8_t tx_data[8];
ARM_CAN_MSG_INFO tx_msg_info;
static void Error_Handler (void) { while (1); }
void CAN_SignalUnitEvent (uint32_t event) {}
void CAN_SignalObjectEvent (uint32_t obj_idx, uint32_t event) {
if (obj_idx == rx_obj_idx) { // If receive object event
if (event == ARM_CAN_EVENT_RECEIVE) { // If message was received successfully
if (ptrCAN->MessageRead(rx_obj_idx, &rx_msg_info, rx_data, 8U) > 0U) {
// Read received message
// process received message ...
}
}
}
if (obj_idx == tx_obj_idx) { // If transmit object event
if (event == ARM_CAN_EVENT_SEND_COMPLETE) { // If message was sent successfully
// acknowledge sent message ...
}
}
}
int main (void) {
ARM_CAN_CAPABILITIES can_cap;
ARM_CAN_OBJ_CAPABILITIES can_obj_cap;
int32_t status;
uint32_t i, num_objects;
can_cap = ptrCAN->GetCapabilities (); // Get CAN driver capabilities
num_objects = can_cap.num_objects; // Number of receive/transmit objects
status = ptrCAN->Initialize (CAN_SignalUnitEvent, CAN_SignalObjectEvent); // Initialize CAN driver
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
status = ptrCAN->PowerControl (ARM_POWER_FULL); // Power-up CAN controller
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
status = ptrCAN->SetMode (ARM_CAN_MODE_INITIALIZATION); // Activate initialization mode
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
status = ptrCAN->SetBitrate (ARM_CAN_BITRATE_NOMINAL, // Set nominal bitrate
100000U, // Set bitrate to 100 kbit/s
ARM_CAN_BIT_PROP_SEG(5U) | // Set propagation segment to 5 time quanta
ARM_CAN_BIT_PHASE_SEG1(1U) | // Set phase segment 1 to 1 time quantum (sample point at 87.5% of bit time)
ARM_CAN_BIT_PHASE_SEG2(1U) | // Set phase segment 2 to 1 time quantum (total bit is 8 time quanta long)
ARM_CAN_BIT_SJW(1U)); // Resynchronization jump width is same as phase segment 2
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
for (i = 0U; i < num_objects; i++) { // Find first available object for receive and transmit
can_obj_cap = ptrCAN->ObjectGetCapabilities (i); // Get object capabilities
if ((rx_obj_idx == 0xFFFFFFFFU) && (can_obj_cap.rx == 1U)) { rx_obj_idx = i; }
else if ((tx_obj_idx == 0xFFFFFFFFU) && (can_obj_cap.tx == 1U)) { tx_obj_idx = i; break; }
}
if ((rx_obj_idx == 0xFFFFFFFFU) || (tx_obj_idx == 0xFFFFFFFFU)) { Error_Handler(); }
// Set filter to receive messages with extended ID 0x12345678 to receive object
status = ptrCAN->ObjectSetFilter(rx_obj_idx, ARM_CAN_FILTER_ID_EXACT_ADD, ARM_CAN_EXTENDED_ID(0x12345678U), 0U);
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
status = ptrCAN->ObjectConfigure(tx_obj_idx, ARM_CAN_OBJ_TX); // Configure transmit object
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
status = ptrCAN->ObjectConfigure(rx_obj_idx, ARM_CAN_OBJ_RX); // Configure receive object
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
status = ptrCAN->SetMode (ARM_CAN_MODE_NORMAL); // Activate normal operation mode
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
memset(&tx_msg_info, 0U, sizeof(ARM_CAN_MSG_INFO)); // Clear message info structure
tx_msg_info.id = ARM_CAN_EXTENDED_ID(0x12345678U); // Set extended ID for transmit message
tx_data[0] = 0xFFU; // Initialize transmit data
while (1) {
tx_data[0]++; // Increment transmit data
status = ptrCAN->MessageSend(tx_obj_idx, &tx_msg_info, tx_data, 1U); // Send data message with 1 data byte
if (status != 1U) { Error_Handler(); }
for (i = 0U; i < 1000000U; i++) { __nop(); } // Wait a little while
}
}
\endcode
\section can_objects CAN Message Objects
The CMSIS-Driver for the CAN interface provides multiple CAN message objects, which can be seen as individual communication channels.
The number of available CAN message objects depends on the CAN peripheral. The function \ref ARM_CAN_GetCapabilities returns
the maximum number of available CAN message objects. The number is encoded in the structure \ref ARM_CAN_CAPABILITIES in the data field \em num_objects.
CAN message objects are addressed with the functions listed below, whereby the parameter \em obj_idx addresses an individual object.
The valid range for \em obj_idx is \token{[0 .. (\em num_objects - 1)]}.
Function | Description
:----------------------------------|:--------------------------------------------
\ref ARM_CAN_ObjectGetCapabilities | Retrieves message object capabilities such as receive, transmit, \ref Remote_Frame automatic handling and \ref can_filtering.
\ref ARM_CAN_ObjectSetFilter | Allows to set-up CAN ID filtering for the message object.
\ref ARM_CAN_ObjectConfigure | Allows to configure the message object for receive, transmit or \ref Remote_Frame automatic handling.
\ref ARM_CAN_MessageRead | Read received message from the message object.
\ref ARM_CAN_MessageSend | Send CAN message or send \ref Remote_Frame or set CAN message to be sent automatically on reception of matching \ref Remote_Frame on the message object.
\ref ARM_CAN_SignalObjectEvent | Callback function that signals a message transfer or a received message overrun.
Each CAN message object may have different capabilities. Before using a CAN message object, call the
function \ref ARM_CAN_ObjectGetCapabilities to verify the available features.
\section can_filtering CAN Message Filtering
The CMSIS-Driver for the CAN interface supports ID filtering for the receiving message objects. The receiving CAN node examines the identifier
to decide if it was relevant. This filtering is done by the CAN peripheral according the settings configured with the function \ref ARM_CAN_ObjectSetFilter.
The function \ref ARM_CAN_ObjectGetCapabilities retrieves the filter capabilities of the CAN message objects stored in \ref ARM_CAN_OBJ_CAPABILITIES.
Data Fields | CAN Messages Object can be filtered with ...
:--------------------------|:--------------------------------------------
\em exact_filtering | an exact ID value set by using the function \ref ARM_CAN_ObjectSetFilter with \em control = \ref ARM_CAN_FILTER_ID_EXACT_ADD.
\em range_filtering | a range ID value set by using the function \ref ARM_CAN_ObjectSetFilter with \em control = \ref ARM_CAN_FILTER_ID_RANGE_ADD.
\em mask_filtering | a mask ID value set by as using the function \ref ARM_CAN_ObjectSetFilter with \em control = \ref ARM_CAN_FILTER_ID_MASKABLE_ADD.
\em multiple_filters | ... several filters to capture multiple ID values, or ID value ranges.
<b>CAN message filtering using an exact ID</b>
Example: accept in message object #1 only frames with extended ID = 0x1567.
\code
status = ptrCAN->ObjectSetFilter (1, ARM_CAN_FILTER_ID_EXACT_ADD, ARM_CAN_EXTENDED_ID(0x1567), 0);
if (status != ARM_DRIVER_OK) ... // error handling
\endcode
Example: accept in message object #2 frames with extended ID = 0x3167 and extended ID = 0x42123.
\code
status = ptrCAN->ObjectSetFilter (2, ARM_CAN_FILTER_ID_EXACT_ADD, ARM_CAN_EXTENDED_ID(0x3167), 0);
if (status != ARM_DRIVER_OK) ... // error handling
status = ptrCAN->ObjectSetFilter (2, ARM_CAN_FILTER_ID_EXACT_ADD, ARM_CAN_EXTENDED_ID(0x42123), 0);
if (status != ARM_DRIVER_OK) ... // error handling
\endcode
<b>CAN message filtering using a range ID</b>
Example: accept in message object #3 only frames with extended ID >= 0x1567 and extended ID <= 0x1577.
\code
status = ptrCAN->ObjectSetFilter (3, ARM_CAN_FILTER_ID_RANGE_ADD, ARM_CAN_EXTENDED_ID(0x1567), ARM_CAN_EXTENDED_ID(0x1577));
if (status != ARM_DRIVER_OK) ... // error handling
\endcode
<b>CAN message filtering using a mask ID</b>
Using the function \ref ARM_CAN_ObjectSetFilter with \em control = \ref ARM_CAN_FILTER_ID_MASKABLE_ADD allows to specify with \em arg a mask value.
- if a mask bit is \token{0}, the corresponding \em ID bit will be accepted, regardless of the value.
- if a mask bit is \token{1}, the corresponding \em ID bit will be compared with the value of the ID filter bit; if they match the message will be accepted otherwise the frame is rejected.
Example: accept in message object #0 only frames with extended IDs 0x1560 to 0x156F.
\code
status = ptrCAN->ObjectSetFilter (0, ARM_CAN_FILTER_ID_MASKABLE_ADD, ARM_CAN_EXTENDED_ID(0x1560), 0x1FFFFFF0);
if (status != ARM_DRIVER_OK) ... // error handling
\endcode
Example: accept in message object #2 only frames with extended IDs 0x35603, 0x35613, 0x35623, and 0x35633.
\code
status = ptrCAN->ObjectSetFilter (2, ARM_CAN_FILTER_ID_MASKABLE_ADD, ARM_CAN_EXTENDED_ID(0x35603), 0x1FFFFFCF);
if (status != ARM_DRIVER_OK) ... // error handling
\endcode
Example: accept any message in object #4 regardless of the ID.
\code
status = ptrCAN->ObjectSetFilter (4, ARM_CAN_FILTER_ID_MASKABLE_ADD, ARM_CAN_EXTENDED_ID(0), 0);
if (status != ARM_DRIVER_OK) ... // error handling
\endcode
\section Remote_Frame Remote Frame
In general, data transmission is performed on an autonomous basis with the data source node sending out Data Frames.
However, sending a <b>Remote Frame</b> allows a destination node to request the data from the source node.
The examples below shows the data exchange using a <b>Remote Transmission Request (RTR)</b>.
<b>Example for automatic Data Message response on RTR</b>
For automatic data message response on an RTR, the object is configured with the function \ref ARM_CAN_ObjectConfigure \em obj_cfg = \ref ARM_CAN_OBJ_RX_RTR_TX_DATA.
In this case, the function \ref ARM_CAN_MessageSend sets a data message that is transmitted when an RTR with a matching CAN ID is received.
If \ref ARM_CAN_MessageSend was not called before the RTR is received, the response is hardware dependent (either last data message is repeated
or no data message is sent until \ref ARM_CAN_MessageSend is called).
After data transmission is completed, the driver calls a callback function \ref ARM_CAN_SignalObjectEvent with \em event = \ref ARM_CAN_EVENT_SEND_COMPLETE
and the related \em obj_idx.
<b>Example:</b>
\code
status = ptrCAN->ObjectSetFilter(0, ARM_CAN_FILTER_ID_EXACT_ADD, ARM_CAN_EXTENDED_ID(0x12345678U), 0U);
if (status != ARM_DRIVER_OK) ... // error handling
status = trCAN->ObjectConfigure(0, ARM_CAN_OBJ_RX_RTR_TX_DATA);
if (status != ARM_DRIVER_OK) ... // error handling
memset(&tx_msg_info, 0, sizeof(ARM_CAN_MSG_INFO)); // Clear transmit message structure
tx_msg_info.id = ARM_CAN_EXTENDED_ID(0x12345678U); // Set ID of message
data_buf[0] = '1'; data_buf[1] = '2'; // Prepare data to transmit
data_buf[2] = '3'; data_buf[3] = '4';
data_buf[4] = '5'; data_buf[5] = '6';
data_buf[6] = '7'; data_buf[7] = '8';
ptrCAN->MessageSend(0, &tx_msg_info, data_buf, 8); // Start send message that will be triggered on RTR reception
\endcode
<b>Example for automatic Data Message reception using RTR</b>
For automatic data message reception on an RTR, the object is configured with the function \ref ARM_CAN_ObjectConfigure \em obj_cfg = \ref ARM_CAN_OBJ_TX_RTR_RX_DATA.
The receiver or consumer requests data with transmission of an RTR with the \ref ARM_CAN_MessageSend. This RTR requests from the transmitter or producer to send the data message.
Once the data message is received, the driver calls a callback function \ref ARM_CAN_SignalObjectEvent with \em event = \ref ARM_CAN_EVENT_RECEIVE
and the related \em obj_idx. The received data message can then be read with the function \ref ARM_CAN_MessageRead.
<b>Example:</b>
\code
status = ptrCAN->ObjectSetFilter(0, ARM_CAN_FILTER_ID_EXACT_ADD, ARM_CAN_EXTENDED_ID(0x12345678U), 0U);
if (status != ARM_DRIVER_OK) ... // error handling
status = ptrCAN->ObjectConfigure(0, ARM_CAN_OBJ_TX_RTR_RX_DATA);
if (status != ARM_DRIVER_OK) ... // error handling
memset(&tx_msg_info, 0, sizeof(ARM_CAN_MSG_INFO)); // Clear transmit message structure
tx_msg_info.id = ARM_CAN_EXTENDED_ID(0x12345678U); // Set ID of message
tx_msg_info.rtr = 1; // Set RTR flag of message to send RTR
tx_msg_info.dlc = 1; // Set data length code of message to 1 to request 1 data byte
ptrCAN->MesageSend(0, &tx_msg_info, 0, 0); // Send RTR
// Wait for ARM_CAN_EVENT_RECEIVE
ptrCAN->MessageRead(0, &rx_msg_info, data_buf, 8); // Read received message
\endcode
@{
*****************************************************************************************************************/
/**
\struct ARM_DRIVER_CAN
\details
The functions of the CAN are accessed by function pointers exposed by this structure. Refer to \ref DriverFunctions for overview information.
Each instance of a CAN provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_CAN0 is the name of the access struct of the first instance (no. 0).
- \b Driver_CAN1 is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows you to connect the middleware to a specific driver instance <b>Driver_CAN<i>n</i></b>.
*******************************************************************************************************************/
/**
\struct ARM_CAN_CAPABILITIES
\details
A CAN driver can be implemented with different capabilities encoded in the data fields of this structure.
<b>Returned by:</b>
- \ref ARM_CAN_GetCapabilities
\sa \ref ARM_CAN_OBJ_CAPABILITIES for information about CAN objects.
*******************************************************************************************************************/
/**
\struct ARM_CAN_STATUS
\details
Structure with information about the status of the CAN unit state and errors.
The data fields encode the unit bus state, last error code, transmitter error count, and receiver error count.
<b>Returned by:</b>
- \ref ARM_CAN_GetStatus
*****************************************************************************************************************/
/**
\struct ARM_CAN_MSG_INFO
\brief CAN Message Information
\details
Structure with information about the CAN message.
In CAN mode, the following \ref ARM_CAN_MSG_INFO data fields are ignored: \em edl, \em brs, \em esi. \n
In CAN FD mode, the following \ref ARM_CAN_MSG_INFO data field is ignored: \em rtr.
<b>Parameter for:</b>
- \ref ARM_CAN_MessageSend
- \ref ARM_CAN_MessageRead
\sa \ref can_filtering
\sa \ref Remote_Frame
*****************************************************************************************************************/
/**
\typedef ARM_CAN_SignalUnitEvent_t
\details
Provides the typedef for the callback function \ref ARM_CAN_SignalUnitEvent.
<b>Parameter for:</b>
- \ref ARM_CAN_Initialize
*******************************************************************************************************************/
/**
\typedef ARM_CAN_SignalObjectEvent_t
\details
Provides the typedef for the callback function \ref ARM_CAN_SignalObjectEvent.
<b>Parameter for:</b>
- \ref ARM_CAN_Initialize
*******************************************************************************************************************/
/**
\defgroup can_status_code_ctrls Status Error Codes
\ingroup can_interface_gr
\brief Status codes of the CAN driver.
\details
The following callback notification unit events are generated:
@{
\def ARM_CAN_UNIT_STATE_INACTIVE
\def ARM_CAN_UNIT_STATE_ACTIVE
\def ARM_CAN_UNIT_STATE_PASSIVE
\def ARM_CAN_UNIT_STATE_BUS_OFF
\def ARM_CAN_LEC_NO_ERROR
\def ARM_CAN_LEC_BIT_ERROR
\def ARM_CAN_LEC_STUFF_ERROR
\def ARM_CAN_LEC_CRC_ERROR
\def ARM_CAN_LEC_FORM_ERROR
\def ARM_CAN_LEC_ACK_ERROR
@}
*******************************************************************************************************************/
/**
\defgroup CAN_unit_events CAN Unit Events
\ingroup can_interface_gr
\brief Callback unit events notified via \ref ARM_CAN_SignalUnitEvent.
\details
The CAN driver generates callback unit events that are notified via the function \ref ARM_CAN_SignalUnitEvent.
The following callback notification unit events are generated:
@{
\def ARM_CAN_EVENT_UNIT_INACTIVE
\sa \ref ARM_CAN_SignalUnitEvent
\def ARM_CAN_EVENT_UNIT_ACTIVE
\sa \ref ARM_CAN_SignalUnitEvent
\def ARM_CAN_EVENT_UNIT_WARNING
\sa \ref ARM_CAN_SignalUnitEvent
\def ARM_CAN_EVENT_UNIT_PASSIVE
\sa \ref ARM_CAN_SignalUnitEvent
\def ARM_CAN_EVENT_UNIT_BUS_OFF
\sa \ref ARM_CAN_SignalUnitEvent
@}
*******************************************************************************************************************/
/**
\defgroup CAN_events CAN Object Events
\brief Callback objects events notified via \ref ARM_CAN_SignalObjectEvent.
\details
The CAN driver generates callback objects events that are notified via the function \ref ARM_CAN_SignalObjectEvent.
The following callback notification object events are generated:
@{
\def ARM_CAN_EVENT_SEND_COMPLETE
\sa \ref ARM_CAN_SignalObjectEvent
\def ARM_CAN_EVENT_RECEIVE
\sa \ref ARM_CAN_SignalObjectEvent
\def ARM_CAN_EVENT_RECEIVE_OVERRUN
\sa \ref ARM_CAN_SignalObjectEvent
@}
*******************************************************************************************************************/
/**
\defgroup can_control CAN Control Codes
\ingroup can_interface_gr
\brief Codes to configure the CAN driver.
\details
@{
The various CAN control codes define:
- \ref can_identifer_ctrls specify CAN identifier. Refer to \ref ARM_CAN_ObjectConfigure.
- \ref can_mode_ctrls control CAN interface operation. Refer to \ref ARM_CAN_Control.
- \ref can_timeseg_ctrls specify CAN bit rate and timing. Refer to \ref ARM_CAN_SetBitrate.
- \ref can_bus_mode_ctrls specify CAN bus operating mode. Refer to \ref ARM_CAN_SetMode.
- \ref can_filter_operation_ctrls specify CAN filter operations. Refer to \ref ARM_CAN_ObjectSetFilter.
- \ref can_obj_config_ctrls specify CAN object configuration modes. Refer to \ref ARM_CAN_ObjectConfigure.
*****************************************************************************************************************/
/**
\defgroup can_identifer_ctrls CAN Identifier
\brief Set object to standard or extended.
\details
@{
\def ARM_CAN_STANDARD_ID(id)
\sa \ref ARM_CAN_ObjectConfigure
\def ARM_CAN_EXTENDED_ID(id)
\sa \ref ARM_CAN_ObjectConfigure
@}
*******************************************************************************************************************/
/**
\defgroup can_mode_ctrls CAN Operation Codes
\brief Set CAN operation modes.
\details
These controls set the CAN operation using the function \ref ARM_CAN_Control.
@{
\def ARM_CAN_SET_FD_MODE
\sa \ref ARM_CAN_Control
\def ARM_CAN_ABORT_MESSAGE_SEND
\sa \ref ARM_CAN_Control
\def ARM_CAN_ABORT_MESSAGE_SEND
\sa \ref ARM_CAN_Control
\def ARM_CAN_CONTROL_RETRANSMISSION
\sa \ref ARM_CAN_Control
\def ARM_CAN_SET_TRANSCEIVER_DELAY
\sa \ref ARM_CAN_Control
@}
*****************************************************************************************************************/
/**
\defgroup can_bus_mode_ctrls CAN Bus Communication Mode
@{
\brief Set or initialize the CAN bus
\enum ARM_CAN_MODE
\details
The enumerations below initialize and set the bus communication mode.
<b>Parameter for:</b>
- \ref ARM_CAN_SetMode
@}
*/
/**
\defgroup can_timeseg_ctrls CAN Bit Timing Codes
@{
\brief Set bit timing
\details
The following codes are used with the function \ref ARM_CAN_SetBitrate.
\def ARM_CAN_BIT_PROP_SEG(x)
\sa \ref ARM_CAN_SetBitrate
\def ARM_CAN_BIT_PHASE_SEG1(x)
\sa \ref ARM_CAN_SetBitrate
\def ARM_CAN_BIT_PHASE_SEG2(x)
\sa \ref ARM_CAN_SetBitrate
\def ARM_CAN_BIT_SJW(x)
\sa \ref ARM_CAN_SetBitrate
*******************************************************************************************************************/
/**
\enum ARM_CAN_BITRATE_SELECT
\brief Set the bit rate.
\details
Provides the typedef for setting the bit rate.
<b>Parameter for:</b>
- \ref ARM_CAN_SetBitrate
*******************************************************************************************************************/
/**
@}
*/
/**
\defgroup can_filter_operation_ctrls CAN Filter Operation Codes
@{
\brief Set CAN filter manipulation codes.
\enum ARM_CAN_FILTER_OPERATION
\details
\b ARM_CAN_FILTER_OPERATION provides the controls for setting the filter type.
Refer to \ref can_filtering for details.
<b>Parameter for:</b>
- \ref ARM_CAN_ObjectSetFilter
@}
*****************************************************************************************************************/
/**
\defgroup can_obj_config_ctrls CAN Object Configuration Codes
@{
\brief CAN Object Configuration codes
\enum ARM_CAN_OBJ_CONFIG
\details
Provides defined values for the configuration of CAN objects.
<b>Parameter for:</b>
- \ref ARM_CAN_ObjectConfigure
@}
**************************************************************************************************************************/
/**
@}
*/ /* End Control Code */
/**
\struct ARM_CAN_OBJ_CAPABILITIES
@{
\details
A CAN object can be implemented with different capabilities encoded in the
data fields of this structure.
<b>Returned by</b>:
- \ref ARM_CAN_ObjectGetCapabilities
\sa \ref ARM_CAN_ObjectConfigure
\sa \ref ARM_CAN_MessageSend
\sa \ref ARM_CAN_MessageRead
\sa \ref ARM_CAN_MSG_INFO
\sa \ref can_filtering
@}
*****************************************************************************************************************/
//
// Functions
//
ARM_DRIVER_VERSION ARM_CAN_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_CAN_GetVersion (void)
\details
The function \b ARM_CAN_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_CAN Driver_CAN0;
ARM_DRIVER_CAN *drv_info;
void setup_can (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_CAN0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*******************************************************************************************************************/
ARM_CAN_CAPABILITIES ARM_CAN_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_CAN_CAPABILITIES ARM_CAN_GetCapabilities (void)
\details
The function \b ARM_CAN_GetCapabilities returns information about the capabilities in this driver implementation.
The data fields of the structure \ref ARM_CAN_CAPABILITIES encode various capabilities.
Example:
\code
extern ARM_DRIVER_CAN Driver_CAN0;
ARM_DRIVER_CAN *drv_info;
void read_capabilities (void) {
ARM_CAN_CAPABILITIES drv_capabilities;
drv_info = &Driver_CAN0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*******************************************************************************************************************/
int32_t ARM_CAN_Initialize (ARM_CAN_SignalUnitEvent_t cb_unit_event, ARM_CAN_SignalObjectEvent_t cb_object_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_Initialize (ARM_CAN_SignalUnitEvent_t cb_unit_event, ARM_CAN_SignalObjectEvent_t cb_object_event)
\details
The function \b initializes the CAN interface.
The function performs the following operations:
- Initializes the resources needed for the CAN interface, for example dynamic memory allocation, RTOS object allocation, and possibly hardware pin configuration.
- Registers the \ref ARM_CAN_SignalUnitEvent callback function.
- Registers the \ref ARM_CAN_SignalObjectEvent callback function.
The parameter \em cb_unit_event is a pointer to the \ref ARM_CAN_SignalUnitEvent callback function; use a NULL pointer
when no callback signals are required.
The parameter \em cb_object_event is a pointer to the \ref ARM_CAN_SignalObjectEvent callback function; use a NULL pointer
when no callback signals are required.
\b Example:
- see \ref can_interface_gr
**************************************************************************************************************************/
int32_t ARM_CAN_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_Uninitialize (void)
\details
The function \b ARM_CAN_Uninitialize de-initializes the resources of the CAN interface.
It is called to release the software resources used by the interface such as deallocate any RTOS objects, dynamic memory and pin de-configuration.
*******************************************************************************************************************/
int32_t ARM_CAN_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_CAN_PowerControl controls the power modes of the CAN interface.
The parameter \em state can be:
- ARM_POWER_FULL: Activate clocks and driver functionality as if peripheral was reset.
- ARM_POWER_OFF: Unconditionally put peripheral into non-functional (reset) state.
- ARM_POWER_LOW: Put peripheral into low power consumption state ready to wake up on bus event.
**************************************************************************************************************************/
uint32_t ARM_CAN_GetClock (void) {
return ARM_DRIVER_OK;
}
/**
\fn uint32_t ARM_CAN_GetClock (void)
\details
The function \b ARM_CAN_GetClock returns the CAN base clock frequency in \token{[Hz]}.
This value may be used to validate the \em bitrate for the function \ref ARM_CAN_SetBitrate.
<b>Example</b>:
\code
CAN_clock = ARM_CAN_GetClock(); // CAN base clock frequency
\endcode
**************************************************************************************************************************/
int32_t ARM_CAN_SetBitrate (ARM_CAN_BITRATE_SELECT select, uint32_t bitrate, uint32_t bit_segments) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_SetBitrate (ARM_CAN_BITRATE_SELECT select, uint32_t bitrate, uint32_t bit_segments)
\details
The function \b ARM_CAN_SetBitrate sets the CAN communication bit rate.
The parameter \em select selects the bit rate affected by function call as defined in \ref ARM_CAN_BITRATE_SELECT and listed in the table below.
Parameter \em select | CAN Mode Bit Rate
:--------------------------------------------|:------------------------------
\ref ARM_CAN_BITRATE_NOMINAL | Select nominal (flexible data-rate arbitration) bitrate (CAN 2.0B)
\ref ARM_CAN_BITRATE_FD_DATA | Select flexible data-rate data bitrate (\ref CAN_FD)
The parameter \em bitrate is the bit rate for the selected CAN mode.
The parameter \em bit_segments is used to setup the time quanta for sampling (see picture below).
The values listed in the table below are ORed and specify the various sampling segments.
The CAN controller samples each bit on the bus at the <i>Sample Point</i>.
<table class="cmtable" summary="">
<tr>
<th>Parameter \em bit_segments</th>
<th>Bit</th>
<th> for \em select = \ref ARM_CAN_BITRATE_NOMINAL \n (CAN specification)</th>
<th> for \em select = \ref ARM_CAN_BITRATE_NOMINAL \n (CAN FD specification)</th>
<th> for \em select = \ref ARM_CAN_BITRATE_FD_DATA \n (CAN FD specification)</th>
</tr>
<tr>
<td>\ref ARM_CAN_BIT_PROP_SEG(<i>x</i>) \n
Propagation Time Segment \n (PROP_SEG)
</td>
<td>0..7 </td>
<td>\em x = \token{[1..8]}</td>
<td>\em x = \token{[1..32] or more}</td>
<td>\em x = \token{[0..8]}</td>
</tr>
<tr>
<td>\ref ARM_CAN_BIT_PHASE_SEG1(<i>x</i>) \n
Phase Buffer Segment 1 \n (PHASE_SEG1)
</td>
<td>8..15 </td>
<td>\em x = \token{[1..8]}</td>
<td>\em x = \token{[1..32] or more}</td>
<td>\em x = \token{[1..8]}</td>
</tr>
<tr>
<td rowspan="2">\ref ARM_CAN_BIT_PHASE_SEG2(<i>x</i>) \n
Phase Buffer Segment 2 \n (PHASE_SEG2)
</td>
<td rowspan="2">16..23 </td>
<td>\em x = \token{[1..8]} </td>
<td>\em x = \token{[1..32] or more}</td>
<td>\em x = \token{[1..8]}</td>
<tr>
<td colspan="3">The maximum allowed value is \token{x = MAX (PHASE_SEG1, IPT)}.
IPT = Information Processing Time. Usually, IPT = \token{2}.
Exceptions apply. Read the specifications of your CAN controller.</td>
</tr>
<tr>
<td rowspan="2">\ref ARM_CAN_BIT_SJW(<i>x</i>) \n
(Re-)Synchronization Jump Width \n (SJW).
</td>
<td rowspan="2">24..31 </td>
<td>\em x = \token{[1..4]}</td>
<td>\em x = \token{[1..4]}</td>
<td>\em x = \token{[1..4]}</td>
<tr>
<td colspan="3">The maximum allowed value is \token{x = MIN (MIN (PHASE_SEG1, PHASE_SEG2), 4)}.
SJW is not allowed to be greater than either PHASE segment.
</td>
</tr>
</table>
<p>
The picture shows a Nominal Bit Time with 10 time quanta.
\image html CAN_Bit_Timing.png "CAN Bit Timing"
</p>
The time quanta (N) per bit is:
\code
N = 1 + PROP_SEG + PHASE_SEG1 + PHASE_SEG2; // note SYNC_SEG is always 1
\endcode
The driver uses this value and the CAN clock to calculate a suitable prescaler value (P).
If the driver cannot achieve the requested \em bitrate it returns with \ref ARM_CAN_INVALID_BITRATE.
The formula for the \em bitrate is:
\code
bitrate = (CAN_Clock / P) / N;
\endcode
<b>Example</b>:
\code
status = ptrCAN->SetBitrate (ARM_CAN_BITRATE_NOMINAL, // Set nominal bitrate
125000U, // Set bitrate to 125 kbit/s
ARM_CAN_BIT_PROP_SEG(5U) | // Set propagation segment to 5 time quanta
ARM_CAN_BIT_PHASE_SEG1(1U) | // Set phase segment 1 to 1 time quantum (sample point at 87.5% of bit time)
ARM_CAN_BIT_PHASE_SEG2(1U) | // Set phase segment 2 to 1 time quantum (total bit is 8 time quanta long)
ARM_CAN_BIT_SJW(1U)); // Resynchronization jump width is same as phase segment 2
\endcode
In this example, N = 8 and with a CAN_Clock = 8MHz the prescaler (P) is calculated by the driver to 8.
**************************************************************************************************************************/
int32_t ARM_CAN_SetMode (ARM_CAN_MODE mode) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_SetMode (ARM_CAN_MODE mode)
\details
The function \b ARM_CAN_SetMode sets the CAN bus communication mode using the parameter \em mode.
The table lists the values for \em mode.
<table class="cmtable" summary="">
<tr><th>Parameter \em mode</th>
<th>Bus Communication Mode</th>
<th>supported when \ref ARM_CAN_OBJ_CAPABILITIES data field</th>
</tr>
<tr><td>\ref ARM_CAN_MODE_INITIALIZATION</td>
<td>Initialization mode; Used to setup communication parameters for the reception
objects and global filtering, while peripheral is not active on the bus.
Refer to \ref can_filtering for details.</td>
<td><i>always supported</i></td>
</tr>
<tr><td>\ref ARM_CAN_MODE_NORMAL</td>
<td>Normal operation mode. Used when peripheral is in active mode to
receive, transmit, and acknowledge messages on the bus. Depending on the current unit state,
it can generate error or overload messages. Verify the unit state with \ref ARM_CAN_GetStatus.
<td><i>always supported</i></td>
</tr>
<tr><td>\ref ARM_CAN_MODE_RESTRICTED</td>
<td>Restricted operation mode. Used for monitoring the bus communication non-intrusively
without transmitting.</td>
<td>\em restricted_mode = \token{1}</td>
</tr>
<tr><td>\ref ARM_CAN_MODE_MONITOR</td>
<td>Bus monitoring mode.</td>
<td>\em monitor_mode = \token{1}</td>
</tr>
<tr><td>\ref ARM_CAN_MODE_LOOPBACK_INTERNAL</td>
<td>Test mode; loopback of CAN transmission to its receiver. No transmission visible on CAN bus.</td>
<td>\em internal_loopback = \token{1}</td>
</tr>
<tr><td>\ref ARM_CAN_MODE_LOOPBACK_EXTERNAL</td>
<td>Test mode; loopback of CAN transmission to its receiver. Transmission is visible on CAN bus.</td>
<td>\em external_loopback = \token{1}</td>
</tr>
</table>
**************************************************************************************************************************/
ARM_CAN_OBJ_CAPABILITIES ARM_CAN_ObjectGetCapabilities (uint32_t obj_idx) {
// your code
// return type ARM_CAN_OBJ_CAPABILITIES;
}
/**
\fn ARM_CAN_OBJ_CAPABILITIES ARM_CAN_ObjectGetCapabilities (uint32_t obj_idx)
\details
The function \b ARM_CAN_ObjectGetCapabilities retrieves the capabilities of a CAN object.
The structure \ref ARM_CAN_OBJ_CAPABILITIES stores the values.
The parameter \em obj_idx is the message object index.
\sa ARM_CAN_ObjectConfigure
\sa ARM_CAN_ObjectSetFilter
**************************************************************************************************************************/
int32_t ARM_CAN_ObjectSetFilter (uint32_t obj_idx, ARM_CAN_FILTER_OPERATION operation, uint32_t id, uint32_t arg) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_ObjectSetFilter (uint32_t obj_idx, ARM_CAN_FILTER_OPERATION operation, uint32_t id, uint32_t arg)
\details
The function \b ARM_CAN_ObjectSetFilter sets or removes the filter for message reception. Refer to \ref can_filtering for details on filtering.
The parameter \em obj_idx is the message object index. \n
The parameter \em operation is the operation on the filter as listed in the table below and
which are defined in the structure \ref ARM_CAN_FILTER_OPERATION.
Parameter \em operation | Operation on Filter | supported when \ref ARM_CAN_OBJ_CAPABILITIES data field
:---------------------------------------|:------------------------------|:------------------------------------------
\ref ARM_CAN_FILTER_ID_EXACT_ADD | Add exact ID filter | \em exact_filtering = \token{1}
\ref ARM_CAN_FILTER_ID_EXACT_REMOVE | Remove exact ID filter | \em exact_filtering = \token{1}
\ref ARM_CAN_FILTER_ID_RANGE_ADD | Add range ID filter | \em range_filtering = \token{1}
\ref ARM_CAN_FILTER_ID_RANGE_REMOVE | Remove range ID filter | \em range_filtering = \token{1}
\ref ARM_CAN_FILTER_ID_MASKABLE_ADD | Add maskable ID filter | \em mask_filtering = \token{1}
\ref ARM_CAN_FILTER_ID_MASKABLE_REMOVE | Remove maskable ID filter | \em mask_filtering = \token{1}
The parameter \em id is the identifier of the filter or defines the start of the filter range (depends on the filter operation). \n
The parameter \em arg is the mask of the filter or defines the end of the filter range (depends on the filter operation).
\sa ARM_CAN_ObjectConfigure
**************************************************************************************************************************/
int32_t ARM_CAN_ObjectConfigure (uint32_t obj_idx, ARM_CAN_OBJ_CONFIG obj_cfg) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_ObjectConfigure (uint32_t obj_idx, ARM_CAN_OBJ_CONFIG obj_cfg)
\details
The function \b ARM_CAN_ObjectConfigure configures the message object, which can be a mailbox or FIFO.
Refer to \ref can_filtering for details.
The parameter \em obj_idx specifies the message object index. \n
The parameter \em obj_cfg configures the \b object with values as shown in the following table.
<table class="cmtable" summary="">
<tr>
<th>Parameter \em obj_cfg</th>
<th>Object Configuration</th>
<th>supported when \ref ARM_CAN_OBJ_CAPABILITIES data field</th>
</tr>
<tr>
<td>\ref ARM_CAN_OBJ_INACTIVE</td>
<td>Deactivate object (default after \ref ARM_CAN_Initialize)
</td>
<td><i>always supported</i></td>
</tr>
<tr>
<td>\ref ARM_CAN_OBJ_RX</td>
<td>Receive object; read received message with \ref ARM_CAN_MessageRead.
</td>
<td>\em rx = \token{1}</td>
</tr>
<tr>
<td>\ref ARM_CAN_OBJ_TX </td>
<td>Transmit object; send message with \ref ARM_CAN_MessageSend.
</td>
<td>\em tx = \token{1}</td>
</tr>
<tr>
<td>\ref ARM_CAN_OBJ_RX_RTR_TX_DATA</td>
<td>\ref Remote_Frame Receive; when \b RTR is received data message is transmitted; set data message with \ref ARM_CAN_MessageSend.
</td>
<td>\em rx_rtr_tx_data = \token{1}</td>
</tr>
<tr>
<td>\ref ARM_CAN_OBJ_TX_RTR_RX_DATA</td>
<td>\ref Remote_Frame Transmit; a \b RTR is sent with \ref ARM_CAN_MessageSend to trigger object reception; read received data message with \ref ARM_CAN_MessageRead.
</td>
<td>\em tx_rtr_rx_data = \token{1}</td>
</tr>
</table>
When the \b object is deactivated, it is not used for data communication.
\sa ARM_CAN_ObjectSetFilter
**************************************************************************************************************************/
int32_t ARM_CAN_MessageSend (uint32_t obj_idx, ARM_CAN_MSG_INFO *msg_info, const uint8_t *data, uint8_t size) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_MessageSend (uint32_t obj_idx, ARM_CAN_MSG_INFO *msg_info, const uint8_t *data, uint8_t size)
\details
The function \b ARM_CAN_MessageSend sends a CAN message on the CAN bus, or sets data message that will be automatically returned upon RTR reception with matching CAN ID.
Only one message can be sent with a call to this function (for CAN up to \token{8} bytes; for CAN FD up to \token{64} bytes of data).
A message transmission can be terminated with a call to the function \ref ARM_CAN_Control with \em control = \ref ARM_CAN_ABORT_MESSAGE_SEND.
The parameter \em obj_idx specifies the message object index.
The parameter \em msg_info is a pointer to the structure \ref ARM_CAN_MSG_INFO, which contains the following relevant data fields for sending message:
- \em id: Identifier of the message; bit \token{31} specifies if this is an \token{11-bit} or \token{29-bit} identifier.
- \em rtr: Specifies if Remote Transmission Request should be sent (\em dlc is used for number of requested bytes), otherwise the data message will be sent. Refer to \ref Remote_Frame for details.
- \em edl: Specifies if Extended Data Length is used; for CAN FD, message can contain up to \token{64} data bytes.
- \em brs: Specifies if Bit Rate Switching is to be used; for CAN FD, the bit rate can be increased during data phase.
- \em dlc: Data Length Code of requested data bytes when sending Remote Transmission Request.
The parameter \em data is a pointer to the data buffer.\n
The parameter \em size is the number of data bytes to send.\n
The function returns the number of bytes accepted to be sent or \ref ARM_DRIVER_ERROR_BUSY if the hardware is not
ready to accept a new message for transmission.
When the message is sent, the callback function \ref ARM_CAN_SignalObjectEvent is called signalling \ref ARM_CAN_EVENT_SEND_COMPLETE
on specified object.
\sa \ref can_filtering
<b>Example:</b>
\code
status = ptrCAN->ObjectConfigure(0, ARM_CAN_OBJ_TX);
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
memset(&tx_msg_info, 0, sizeof(ARM_CAN_MSG_INFO)); // Clear transmit message structure
tx_msg_info.id = ARM_CAN_EXTENDED_ID(0x12345678U); // Set ID of message
data_buf[0] = '1'; data_buf[1] = '2'; // Prepare data to transmit
data_buf[2] = '3'; data_buf[3] = '4';
data_buf[4] = '5'; data_buf[5] = '6';
data_buf[6] = '7'; data_buf[7] = '8';
status = ptrCAN->MesageSend(0, &tx_msg_info, data_buf, 8); // Send message
if (status != ARM_DRIVER_OK ) { Error_Handler(); }
\endcode
**************************************************************************************************************************/
int32_t ARM_CAN_MessageRead (uint32_t obj_idx, ARM_CAN_MSG_INFO *msg_info, uint8_t *data, uint8_t size) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_MessageRead (uint32_t obj_idx, ARM_CAN_MSG_INFO *msg_info, uint8_t *data, uint8_t size)
\details
The function \b ARM_CAN_MessageRead reads the message received on the CAN bus, if \em obj_idx was configured for reception or
for automatic Data Message reception using RTR and the callback function \ref ARM_CAN_SignalObjectEvent was called
signalling \ref ARM_CAN_EVENT_RECEIVE.
If the message was overrun by another received message, then the callback function \ref ARM_CAN_SignalObjectEvent
will be called signalling \ref ARM_CAN_EVENT_RECEIVE_OVERRUN.
The function can read a maximum of \token{8} data bytes for CAN and \token{64} bytes for CAN FD.
The parameter \em obj_idx specifies the message object index. \n
The parameter \em msg_info is a pointer to the CAN information structure. \n
The parameter \em data is a pointer to the data buffer for reading data. \n
The parameter \em size is data buffer size in bytes and indicates the maximum number of bytes that can be read.
The function returns the number of read data in bytes or the \ref execution_status.
All data fields of the structure \ref ARM_CAN_MSG_INFO are updated as described below:
- id: Identifier of the message that was received, bit \token{31} specifies if it is a \token{11-bit} identifier or \token{29-bit} identifier.
- rtr: \token{1} = Remote Frame Request was received (\em dlc is number of requested bytes). \token{0} = data message
- edl: \token{1} = CAN FD Extended Data Length message was received. \token{0} = not Extended Data Length message.
- brs: \token{1} = CAN FD Bit Rate Switching was used for message transfer. \token{0} = no Bit Rate Switching was used.
- esi: \token{1} = CAN FD Error State Indicator is active for received message. \token{0} = Error State Indicator is not active.
- dlc: Data Length Code is the number of data bytes in the received message or number of data bytes requested by RTR.
Message reception can be disabled by de-configuring the receive object with the function \ref ARM_CAN_ObjectConfigure.
**************************************************************************************************************************/
int32_t ARM_CAN_Control (uint32_t control, uint32_t arg) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_CAN_Control (uint32_t control, uint32_t arg)
\details
The function \b ARM_CAN_Control controls the CAN interface settings and executes various operations.
The parameter \em control specifies various operations that are listed in the table below.
The parameters \em arg provides, depending on the \em control value, additional information or set values.
Parameter \em control | Operation
:--------------------------------------------|:------------------------------
\ref ARM_CAN_SET_FD_MODE | Select <a href="#CAN_FD"><b>CAN FD</b></a> mode; \em arg : \token{0} = CAN 2.0B; \token{1} = CAN FD.
\ref ARM_CAN_ABORT_MESSAGE_SEND | Abort sending of CAN message; \em arg : object index
\ref ARM_CAN_CONTROL_RETRANSMISSION | Enable/disable automatic retransmission; \em arg : \token{0 = disable, 1 = enable (default state)}
\ref ARM_CAN_SET_TRANSCEIVER_DELAY | Set transceiver delay; \em arg : delay in time quanta
Verify the CAN interface capabilities with \ref ARM_CAN_GetCapabilities.
*******************************************************************************************************************/
ARM_CAN_STATUS ARM_CAN_GetStatus (void) {
return ARM_DRIVER_OK;
}
/**
\fn ARM_CAN_STATUS ARM_CAN_GetStatus (void)
\details
The function \b ARM_CAN_GetStatus retrieves runtime information on CAN bus and CAN unit state.
The following defines give information about the current unit involvement in bus communication:
Unit State | Description
:--------------------------------------|:------------
\ref ARM_CAN_UNIT_STATE_INACTIVE | Unit state: Not active on the bus. Unit is in initialization state.
\ref ARM_CAN_UNIT_STATE_ACTIVE | Unit state: Active on the bus. Unit can generate active error frames.
\ref ARM_CAN_UNIT_STATE_PASSIVE | Unit state: Error passive. Unit is interacting on the bus but does not send active error frames.
\ref ARM_CAN_UNIT_STATE_BUS_OFF | Unit state: Bus-off. Unit does not participate on the bus but monitors it and can recover to active state.
The following defines are error codes of the last error that happened on the bus:
Last Error Code | Description
:--------------------------------------|:------------
\ref ARM_CAN_LEC_NO_ERROR | No error. There was no error since last read of status or last successful transmit or receive.
\ref ARM_CAN_LEC_BIT_ERROR | Bit error. The bit monitored is different than the bit sent (except during arbitration phase).
\ref ARM_CAN_LEC_STUFF_ERROR | Bit stuffing error. There were 6 consecutive same bit levels on the bus.
\ref ARM_CAN_LEC_CRC_ERROR | CRC error. CRC of received data is not as expected.
\ref ARM_CAN_LEC_FORM_ERROR | Illegal fixed-form bit. Error in fixed form bits.
\ref ARM_CAN_LEC_ACK_ERROR | Acknowledgment error. Message was not acknowledged by any receiver on the bus.
*******************************************************************************************************************/
void ARM_CAN_SignalUnitEvent (uint32_t event) {
// function body
}
/**
\fn void ARM_CAN_SignalUnitEvent (uint32_t event)
\details
The function \b ARM_CAN_SignalUnitEvent is a callback function registered by the function \ref ARM_CAN_Initialize.
The parameter \em event indicates unit event that occurred during driver operation.
The following callback notifications are generated:
Parameter \em event | Value |Description
:----------------------------------|:-----:|:-------------------------------------------------
\ref ARM_CAN_EVENT_UNIT_INACTIVE | 0 | Unit entered Inactive state.
\ref ARM_CAN_EVENT_UNIT_ACTIVE | 1 | Unit entered Error Active state.
\ref ARM_CAN_EVENT_UNIT_WARNING | 2 | Unit entered Error Warning state (one or both error counters >= \token{96}).
\ref ARM_CAN_EVENT_UNIT_PASSIVE | 3 | Unit entered Error Passive state.
\ref ARM_CAN_EVENT_UNIT_BUS_OFF | 4 | Unit entered Bus-off state.
\sa \ref ARM_CAN_GetStatus
*******************************************************************************************************************/
void ARM_CAN_SignalObjectEvent (uint32_t obj_idx, uint32_t event) {
// function body
}
/**
\fn void ARM_CAN_SignalObjectEvent (uint32_t obj_idx, uint32_t event)
\details
The function \b ARM_CAN_SignalObjectEvent is a callback function registered by the function \ref ARM_CAN_Initialize and
signals a CAN message object event.
The parameter \em obj_idx is the index of the message object. \n
The parameter \em event indicates object event that occurred during driver operation.
The following events can be generated:
Parameter \em event | Bit | Description
:------------------------------------|:---:|:your_sha256_hash---------
\ref ARM_CAN_EVENT_SEND_COMPLETE | 0 | Message was sent successfully by the \em obj_idx object.
\ref ARM_CAN_EVENT_RECEIVE | 1 | Message was received successfully by the \em obj_idx object.
\ref ARM_CAN_EVENT_RECEIVE_OVERRUN | 2 | Message was overwritten before it was read on the \em obj_idx object.
\sa \ref ARM_CAN_MessageSend
\sa \ref ARM_CAN_MessageRead
\sa \ref ARM_CAN_ObjectConfigure
*******************************************************************************************************************/
/**
@}
*/
// End CAN Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_CAN.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 12,087 |
```c
/**
\defgroup spi_interface_gr SPI Interface
\brief Driver API for SPI Bus Peripheral (%Driver_SPI.h)
\details
The <b>Serial Peripheral Interface Bus</b> (SPI) implements a synchronous serial bus for data exchange. In microcontroller (MCU) applications,
the interface is often used to connect peripheral components at board (PCB) level. SPI devices can operate as Master (SCLK and SS are outputs) or
Slave (SCLK and SS are inputs). Wikipedia offers more information about
the <a href="path_to_url" target="_blank"><b>Serial Peripheral Interface Bus</b></a>.
<b>Block Diagram</b>
The SPI Driver API defines a <b>SPI</b> interface for middleware components. The SPI Driver supports multiple
slaves, but if only one slave is connected, then the Slave Select signal can be omitted.
\image html SPI_Master1Slaves.png "SPI Master connected to a single slave"
<p> </p>
\image html SPI_Master3Slaves.png "SPI Master connected to 3 slaves"
The SPI Driver functions control the following SPI signal lines.
Signal | Name | Description
-------|-------------------------------------|your_sha256_hash--------------
SS | Slave Select (active low) | Selects the slave. This signal can be part of the SPI peripheral or implemented using a GPIO pin.
MOSI | Master Out, Slave In | MOSI output of the Master connects to MOSI input of the Slave.
SCLK | Serial Clock | Serial clock output from Master. Controls the transfer speed and when data are sent and read.
MISO | Master In, Slave Out | MISO input of the Master connects to MISO output of the Slave.
<b>SPI API</b>
The following header files define the Application Programming Interface (API) for the SPI interface:
- \b %Driver_SPI.h : Driver API for SPI Bus Peripheral
The driver implementation is a typical part of the Device Family Pack (DFP) that supports the
peripherals of the microcontroller family.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_SPI : access struct for SPI driver functions
<b>Example Code</b>
The following example code shows the usage of the SPI interface.
\include SPI_Demo.c
@{
*/
/**
\struct ARM_DRIVER_SPI
\details
The functions of the SPI driver are accessed by function pointers exposed by this structure.
Refer to \ref DriverFunctions for overview information.
Each instance of a SPI interface provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_SPI0 is the name of the access struct of the first instance (no. 0).
- \b Driver_SPI1 is the name of the access struct of the second instance (no. 1).
A middleware configuration setting allows connecting the middleware to a specific driver instance \b %Driver_SPI<i>n</i>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
**************************************************************************************************************************/
/**
\struct ARM_SPI_CAPABILITIES
\details
A SPI driver can be implemented with different capabilities.
The data fields of this structure encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_SPI_GetCapabilities
**************************************************************************************************************************/
/**
\struct ARM_SPI_STATUS
\details
Structure with information about the status of the SPI. The data fields encode busy flag and error flags.
<b>Returned by:</b>
- \ref ARM_SPI_GetStatus
*****************************************************************************************************************/
/**
\typedef ARM_SPI_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_SPI_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_SPI_Initialize
*******************************************************************************************************************/
/**
\defgroup spi_execution_status Status Error Codes
\ingroup common_drv_gr
\brief Negative values indicate errors (SPI has specific codes in addition to common \ref execution_status).
\details
The SPI driver has additional status error codes that are listed below.
Note that the SPI driver also returns the common \ref execution_status.
@{
\def ARM_SPI_ERROR_MODE
The \b mode requested with the function \ref ARM_SPI_Control is not supported by this driver.
\def ARM_SPI_ERROR_FRAME_FORMAT
The <b>frame format</b> requested with the function \ref ARM_SPI_Control is not supported by this driver.
\def ARM_SPI_ERROR_DATA_BITS
The number of <b>data bits</b> requested with the function \ref ARM_SPI_Control is not supported by this driver.
\def ARM_SPI_ERROR_BIT_ORDER
The <b>bit order</b> requested with the function \ref ARM_SPI_Control is not supported by this driver.
\def ARM_SPI_ERROR_SS_MODE
The <b>slave select mode</b> requested with the function \ref ARM_SPI_Control is not supported by this driver.
@}
*/
/**
\defgroup SPI_events SPI Events
\ingroup spi_interface_gr
\brief The SPI driver generates call back events that are notified via the function \ref ARM_SPI_SignalEvent.
\details
This section provides the event values for the \ref ARM_SPI_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_SPI_EVENT_TRANSFER_COMPLETE
\def ARM_SPI_EVENT_DATA_LOST
\def ARM_SPI_EVENT_MODE_FAULT
@}
*/
//
// Functions
//
ARM_DRIVER_VERSION ARM_SPI_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_SPI_GetVersion (void)
\details
The function \b ARM_SPI_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_SPI Driver_SPI0;
ARM_DRIVER_SPI *drv_info;
void setup_spi (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_SPI0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
**************************************************************************************************************************/
ARM_SPI_CAPABILITIES ARM_SPI_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_SPI_CAPABILITIES ARM_SPI_GetCapabilities (void)
\details
The function \b ARM_SPI_GetCapabilities returns information about the capabilities in this driver implementation.
The data fields of the structure \ref ARM_SPI_CAPABILITIES encode various capabilities, for example
supported modes.
Example:
\code
extern ARM_DRIVER_SPI Driver_SPI0;
ARM_DRIVER_SPI *drv_info;
void read_capabilities (void) {
ARM_SPI_CAPABILITIES drv_capabilities;
drv_info = &Driver_SPI0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
**************************************************************************************************************************/
int32_t ARM_SPI_Initialize (ARM_SPI_SignalEvent_t cb_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SPI_Initialize (ARM_SPI_SignalEvent_t cb_event)
\details
The function \b ARM_SPI_Initialize initializes the SPI interface.
The parameter \em cb_event is a pointer to the \ref ARM_SPI_SignalEvent callback function; use a NULL pointer
when no callback signals are required.
The function is called when the middleware component starts operation and performs the following:
- Initializes the resources needed for the SPI interface.
- Registers the \ref ARM_SPI_SignalEvent callback function.
\b Example:
- see \ref spi_interface_gr - Driver Functions
**************************************************************************************************************************/
int32_t ARM_SPI_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SPI_Uninitialize (void)
\details
The function \b ARM_SPI_Uninitialize de-initializes the resources of SPI interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
**************************************************************************************************************************/
int32_t ARM_SPI_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SPI_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_SPI_PowerControl controls the power modes of the SPI interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
**************************************************************************************************************************/
int32_t ARM_SPI_Send (const void *data, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SPI_Send (const void *data, uint32_t num)
\details
This function \b ARM_SPI_Send is used to send data to the SPI transmitter (received data is ignored).
The parameter \em data specifies the data buffer. \n
The parameter \em num specifies the number of items to send. \n
The item size is defined by the data type, which depends on the configured number of data bits.
Data type is:
- \em uint8_t when configured for 1..8 data bits
- \em uint16_t when configured for 9..16 data bits
- \em uint32_t when configured for 17..32 data bits
Calling the function \b ARM_SPI_Send only starts the send operation.
When in slave mode, the operation is only registered and started when the master starts the transfer.
The function is non-blocking and returns as soon as the driver has started the operation
(driver typically configures DMA or the interrupt system for continuous transfer).
During the operation it is not allowed to call this function or any other data transfer function again.
Also the data buffer must stay allocated and the contents of unsent data must not be modified.
When send operation is completed (requested number of items sent), the \ref ARM_SPI_EVENT_TRANSFER_COMPLETE event is generated.
Progress of send operation can also be monitored by reading the number of items already sent by calling \ref ARM_SPI_GetDataCount.
Status of the transmitter can also be monitored by calling the \ref ARM_SPI_GetStatus and checking the \em busy data field,
which indicates if transmission is still in progress or pending.
When in master mode and configured to monitor slave select and the slave select gets deactivated during transfer,
then the SPI mode changes to inactive and the \ref ARM_SPI_EVENT_MODE_FAULT event is generated (instead of \ref ARM_SPI_EVENT_TRANSFER_COMPLETE).
When in slave mode but send/receive/transfer operation is not started and data is sent/requested by the master,
then the \ref ARM_SPI_EVENT_DATA_LOST event is generated.
Send operation can be aborted by calling \ref ARM_SPI_Control with \ref ARM_SPI_ABORT_TRANSFER as the control parameter.
**************************************************************************************************************************/
int32_t ARM_SPI_Receive (void *data, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SPI_Receive (void *data, uint32_t num)
\details
The function \b ARM_SPI_Receive is used to receive data
(transmits the default value as specified by \ref ARM_SPI_Control with \ref ARM_SPI_SET_DEFAULT_TX_VALUE as control parameter).
The parameter \em data specifies the data buffer. \n
The parameter \em num specifies the number of items to receive. \n
The item size is defined by the data type, which depends on the configured number of data bits.
Data type is:
- \em uint8_t when configured for 1..8 data bits
- \em uint16_t when configured for 9..16 data bits
- \em uint32_t when configured for 17..32 data bits
Calling the function \b ARM_SPI_Receive only starts the receive operation.
The function is non-blocking and returns as soon as the driver has started the operation
(driver typically configures DMA or the interrupt system for continuous transfer).
When in slave mode, the operation is only registered and started when the master starts the transfer.
During the operation it is not allowed to call this function or any other data transfer function again. Also the data buffer must stay allocated.
When receive operation is completed (requested number of items received), the \ref ARM_SPI_EVENT_TRANSFER_COMPLETE event is generated.
Progress of receive operation can also be monitored by reading the number of items already received by calling \ref ARM_SPI_GetDataCount.
Status of the receiver can also be monitored by calling the \ref ARM_SPI_GetStatus and checking the \em busy data field,
which indicates if reception is still in progress or pending.
When in master mode and configured to monitor slave select and the slave select gets deactivated during transfer,
then the SPI mode changes to inactive and the \ref ARM_SPI_EVENT_MODE_FAULT event is generated (instead of \ref ARM_SPI_EVENT_TRANSFER_COMPLETE).
When in slave mode but send/receive/transfer operation is not started and data is sent/requested by the master,
then the \ref ARM_SPI_EVENT_DATA_LOST event is generated.
Receive operation can be aborted by calling \ref ARM_SPI_Control with \ref ARM_SPI_ABORT_TRANSFER as the control parameter.
**************************************************************************************************************************/
int32_t ARM_SPI_Transfer (const void *data_out, void *data_in, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SPI_Transfer (const void *data_out, void *data_in, uint32_t num)
\details
The function \b ARM_SPI_Transfer transfers data via SPI. It synchronously sends data to the SPI transmitter and receives data from the SPI receiver.
The parameter \em data_out is a pointer to the buffer with data to send. \n
The parameter \em data_in is a pointer to the buffer which receives data. \n
The parameter \em num specifies the number of items to transfer. \n
The item size is defined by the data type which depends on the configured number of data bits.
Data type is:
- \em uint8_t when configured for 1..8 data bits
- \em uint16_t when configured for 9..16 data bits
- \em uint32_t when configured for 17..32 data bits
Calling the function \b ARM_SPI_Transfer only starts the transfer operation.
The function is non-blocking and returns as soon as the driver has started the operation
(driver typically configures DMA or the interrupt system for continuous transfer).
When in slave mode, the operation is only registered and started when the master starts the transfer.
During the operation it is not allowed to call this function or any other data transfer function again.
Also the data buffers must stay allocated and the contents of unsent data must not be modified.
When transfer operation is completed (requested number of items transferred), the \ref ARM_SPI_EVENT_TRANSFER_COMPLETE event is generated.
Progress of transfer operation can also be monitored by reading the number of items already transferred by calling \ref ARM_SPI_GetDataCount.
Status of the transmitter and receiver can also be monitored by calling the \ref ARM_SPI_GetStatus and checking the \em busy flag.
When in master mode and configured to monitor slave select and the slave select gets deactivated during transfer,
then the SPI mode changes to inactive and the \ref ARM_SPI_EVENT_MODE_FAULT event is generated (instead of \ref ARM_SPI_EVENT_TRANSFER_COMPLETE).
When in slave mode but send/receive/transfer operation is not started and data is sent/requested by the master,
then the \ref ARM_SPI_EVENT_DATA_LOST event is generated.
Transfer operation can also be aborted by calling \ref ARM_SPI_Control with \ref ARM_SPI_ABORT_TRANSFER as the control parameter.
**************************************************************************************************************************/
uint32_t ARM_SPI_GetDataCount (void) {
return 0;
}
/**
\fn uint32_t ARM_SPI_GetDataCount (void)
\details
The function \b ARM_SPI_GetDataCount returns the number of currently transferred data items
during \ref ARM_SPI_Send, \ref ARM_SPI_Receive and \ref ARM_SPI_Transfer operation.
*****************************************************************************************************************/
int32_t ARM_SPI_Control (uint32_t control, uint32_t arg) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_SPI_Control (uint32_t control, uint32_t arg)
\details
The function \b ARM_SPI_Control controls the SPI interface settings and executes various operations.
The parameter \em control is a bit mask that specifies various operations.
- Controls form different categories can be ORed.
- If one control is omitted, then the default value of that category is used.
- Miscellaneous controls cannot be combined.
The parameter \em arg provides (depending on the parameter \em control) additional information, for example the Bus Speed.
<table class="cmtable" summary="">
<tr><th> Parameter \em control </th>
<th style="text-align:right"> Bit </th>
<th> Category </th>
<th> Description
</th></tr>
<tr><td> \ref ARM_SPI_MODE_INACTIVE </td>
<td rowspan="3" style="text-align:right"> 0..7 </td>
<td rowspan="3"> \anchor spi_mode_tab Mode Controls </td>
<td> Set SPI to inactive.
</td></tr>
<tr><td> \ref ARM_SPI_MODE_MASTER </td>
<td> Set the SPI Master (Output on MOSI, and the Input on MISO); \em arg = Bus Speed in \token{bps}
</td></tr>
<tr><td> \ref ARM_SPI_MODE_SLAVE </td>
<td> Set the SPI Slave (Output on MISO, and the Input on MOSI)
</td></tr>
<tr><td> \ref ARM_SPI_CPOL0_CPHA0 (default) </td>
<td rowspan="6" style="text-align:right"> 8..11 </td>
<td rowspan="6"> Clock Polarity <br> (Frame Format) </td><td> CPOL=\token{0} and CPHA=\token{0}: Clock Polarity 0, Clock Phase 0 </td>
</tr>
<tr><td> \ref ARM_SPI_CPOL0_CPHA1 </td>
<td> CPOL=\token{0} and CPHA=\token{1}: Clock Polarity 0, Clock Phase 1
</td></tr>
<tr><td> \ref ARM_SPI_CPOL1_CPHA0 </td>
<td> CPOL=\token{1} and CPHA=\token{0}: Clock Polarity 1, Clock Phase 0
</td></tr>
<tr><td> \ref ARM_SPI_CPOL1_CPHA1 </td>
<td> CPOL=\token{1} and CPHA=\token{1}: Clock Polarity 1, Clock Phase 1
</td></tr>
<tr><td> \ref ARM_SPI_TI_SSI </td>
<td> Specifies that the frame format corresponds to the Texas Instruments Frame Format
</td></tr>
<tr><td> \ref ARM_SPI_MICROWIRE </td>
<td> Specifies that the frame format corresponds to the National Semiconductor Microwire Frame Format
</td></tr>
<tr><td> \ref ARM_SPI_DATA_BITS(n) </td>
<td style="text-align:right"> 12..17 </td>
<td> Data Bits </td>
<td> Set the number of bits per SPI frame; range for \em n = \token{1..32}.
This is the minimum required parameter.
</td></tr>
<tr><td> \ref ARM_SPI_MSB_LSB (default) </td>
<td rowspan="2" style="text-align:right"> 18 </td>
<td rowspan="2"> Bit Order </td>
<td> Set the bit order from MSB to LSB
</td></tr>
<tr><td> \ref ARM_SPI_LSB_MSB </td>
<td> Set the bit order from LSB to MSB
</td></tr>
<tr><td nowrap>\ref ARM_SPI_SS_MASTER_UNUSED (default) </td>
<td rowspan="6" style="text-align:right"> 19..21 </td>
<td rowspan="6"> Slave Select
<br>when Master
<div style="min-height:200px"> </div>
Must be used with the corresponding master or slave controls from category <a href="#spi_mode_tab"><b>Mode Controls</b></a>.
<div style="min-height:200px"> </div>
Slave Select
<br>when Slave
</td>
<td>Set the Slave Select mode for the master to <b>Not used</b>. Used with Mode Control ARM_SPI_MODE_MASTER.
Master does not drive or monitor the SS line. For example, when connecting to a single slave,
which has the SS line connected to a fixed low level.
</td></tr>
<tr><td>\ref ARM_SPI_SS_MASTER_SW</td>
<td>Set the Slave Select mode for the master to <b>Software controlled</b>. Used with Mode Control ARM_SPI_MODE_MASTER.
The Slave Select line is configured as output and controlled via the Miscellaneous Control \ref ARM_SPI_CONTROL_SS.
By default, the line it is not active (high), and is not affected by transfer-, send-, or receive functions.
</td></tr>
<tr><td>\ref ARM_SPI_SS_MASTER_HW_OUTPUT</td>
<td>Set the Slave Select mode for the master to <b>Hardware controlled Output</b>. Used with Mode Control ARM_SPI_MODE_MASTER.
The Slave Select line is configured as output and controlled by hardware.
The line gets activated or deactivated automatically by the hardware for transfers and is not controlled by the Miscellaneous Control \ref ARM_SPI_CONTROL_SS.
When exactly the line is activated or deactivated is hardware dependent. Typically, the hardware will activate the line before starting the transfer
and deactivate it after the transfer completes. Some hardware will keep the line active as long as the SPI stays master.
\note Some devices require that the SS signal is strictly defined regarding transfers. Refer to the documentation of your device.
</td></tr>
<tr>
<td>\ref ARM_SPI_SS_MASTER_HW_INPUT</td>
<td>Set the Slave Select mode for the master to <b>Hardware monitored Input</b>. Used with Mode Control ARM_SPI_MODE_MASTER.
Used in multi-master configuration where a master does not drive the Slave Select when driving the bus, but rather monitors it.
When another master activates this line, the active master backs off. This is called Mode Fault. Slave Select is configured as input
and hardware only monitors the line. When the line is activated externally while we are master,
it presents a Mode Fault (\ref ARM_SPI_EVENT_MODE_FAULT) and the SPI switches to inactive mode.
</td></tr>
<tr><td>\ref ARM_SPI_SS_SLAVE_HW (default)</td>
<td>Set the Slave Select mode for the slave to <b>Hardware monitored</b>. Used with Mode Control ARM_SPI_MODE_SLAVE.
Hardware monitors the Slave Select line and accepts transfers only when the line is active. Transfers are ignored while the Slave Select line is inactive.
</td></tr>
<tr><td>\ref ARM_SPI_SS_SLAVE_SW</td>
<td>Set the Slave Select mode for the slave to <b>Software controlled</b>. Used with Mode Control ARM_SPI_MODE_SLAVE.
Used only when the Slave Select line is not used. For example, when a single master and slave are connected in the system
then the Slave Select line is not needed. Software controls if the slave is responding or not (by default it is not responding).
Software enables or disables transfers by using the Miscellaneous Control \ref ARM_SPI_CONTROL_SS.
</td></tr>
<tr><td> \ref ARM_SPI_SET_BUS_SPEED </td>
<td rowspan="5" style="text-align:right"> 0..21 </td>
<td rowspan="5"> Miscellaneous Controls <br>(cannot be ORed)</td>
<td>Set the bus speed; \em arg= Bus Speed in \token{bps}
</td></tr>
<tr><td> \ref ARM_SPI_GET_BUS_SPEED </td>
<td> Get the bus speed; Return values >= \token{0} represent the bus speed in \token{bps}. Negative values are \ref spi_execution_status.
</td></tr>
<tr><td> \ref ARM_SPI_SET_DEFAULT_TX_VALUE </td>
<td> Set the default transmission value; the parameter \em arg sets the value
</td></tr>
<tr><td> \ref ARM_SPI_CONTROL_SS </td>
<td> Control the Slave Select signal (SS); the values for the parameter \em arg are: \token{ARM_SPI_SS_INACTIVE; ARM_SPI_SS_ACTIVE}
</td></tr>
<tr><td> \ref ARM_SPI_ABORT_TRANSFER </td>
<td> Abort the current data transfer
</td></tr>
</table>
\b Example
\code
extern ARM_DRIVER_SPI Driver_SPI0;
// configure: SPI master | clock polarity=1, clock phase=1 | bits per frame=16 | bus speed : 1000000
status = Driver_SPI0.Control(ARM_SPI_MODE_MASTER |
ARM_SPI_CPOL1_CPHA1 |
ARM_SPI_DATA_BITS(16), 1000000);
\endcode
*****************************************************************************************************************/
ARM_SPI_STATUS ARM_SPI_GetStatus (void) {
return { 0 };
}
/**
\fn ARM_SPI_STATUS ARM_SPI_GetStatus (void)
\details
The function \b ARM_SPI_GetStatus returns the current SPI interface status.
*****************************************************************************************************************/
void ARM_SPI_SignalEvent (uint32_t event) {
// function body
}
/**
\fn void ARM_SPI_SignalEvent (uint32_t event)
\details
The function \b ARM_SPI_SignalEvent is a callback function registered by the function \ref ARM_SPI_Initialize.
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_SPI_CAPABILITIES, which can be retrieved with the function \ref ARM_SPI_GetCapabilities.
The following events can be generated:
<table class="cmtable" summary="">
<tr>
<th> Parameter \em event </th><th> Bit </th><th> Description </th>
<th> supported when ARM_SPI_CAPABILITIES </th>
</tr>
<tr>
<td> \ref ARM_SPI_EVENT_TRANSFER_COMPLETE </td><td> 0 </td><td> Occurs after call to \ref ARM_SPI_Send, \ref ARM_SPI_Receive,
or \ref ARM_SPI_Transfer
to indicate that all the data has been transferred.
The driver is ready for the next transfer operation. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_SPI_EVENT_DATA_LOST </td><td> 1 </td><td> Occurs in slave mode when data is requested/sent by master
but send/receive/transfer operation has not been started and
indicates that data is lost. Occurs also in master mode when
driver cannot transfer data fast enough. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_SPI_EVENT_MODE_FAULT </td><td> 2 </td><td> Occurs in master mode when Slave Select is deactivated and
indicates Master Mode Fault.
The driver is ready for the next transfer operation. </td>
<td> data field \em event_mode_fault = \token{1} </td>
</tr>
</table>
**************************************************************************************************************************/
/**
\defgroup SPI_control SPI Control Codes
\ingroup spi_interface_gr
\brief Many parameters of the SPI driver are configured using the \ref ARM_SPI_Control function.
\details
@{
The various SPI control codes define:
- \ref spi_mode_ctrls specifies SPI mode
- \ref spi_frame_format_ctrls defines the frame format
- \ref spi_data_bits_ctrls defines the number of data bits
- \ref spi_bit_order_ctrls defines the bit order
- \ref spi_slave_select_mode_ctrls specifies slave select mode
- \ref spi_misc_ctrls specifies additional miscellaneous controls
Refer to the \ref ARM_SPI_Control function for further details.
*/
/**
\defgroup spi_mode_ctrls SPI Mode Controls
\ingroup SPI_control
\brief Specifies SPI mode.
\details
@{
\def ARM_SPI_MODE_INACTIVE
\sa ARM_SPI_Control
\def ARM_SPI_MODE_MASTER
\sa ARM_SPI_Control
\def ARM_SPI_MODE_SLAVE
\sa ARM_SPI_Control
@}
*/
/**
\defgroup spi_frame_format_ctrls SPI Frame Format
\ingroup SPI_control
\brief Defines the frame format.
\details
@{
\def ARM_SPI_CPOL0_CPHA0
\sa ARM_SPI_Control
\def ARM_SPI_CPOL0_CPHA1
\sa ARM_SPI_Control
\def ARM_SPI_CPOL1_CPHA0
\sa ARM_SPI_Control
\def ARM_SPI_CPOL1_CPHA1
\sa ARM_SPI_Control
\def ARM_SPI_TI_SSI
\sa ARM_SPI_Control
\def ARM_SPI_MICROWIRE
\sa ARM_SPI_Control
@}
*/
/**
\defgroup spi_data_bits_ctrls SPI Data Bits
\ingroup SPI_control
\brief Defines the number of data bits.
\details
@{
\def ARM_SPI_DATA_BITS(n)
\sa ARM_SPI_Control
@}
*/
/**
\defgroup spi_bit_order_ctrls SPI Bit Order
\ingroup SPI_control
\brief Defines the bit order.
\details
@{
\def ARM_SPI_MSB_LSB
\sa ARM_SPI_Control
\def ARM_SPI_LSB_MSB
\sa ARM_SPI_Control
@}
*/
/**
\defgroup spi_slave_select_mode_ctrls SPI Slave Select Mode
\ingroup SPI_control
\brief Specifies SPI slave select mode.
\details
\b SPI \b Slave \b Select \b Mode configures the behavior of the \b Slave \b Select \b (SS) signal. The configuration is
separate for \b Master (ARM_SPI_SS_MASTER_*) and for \b Slave (\ref ARM_SPI_SS_SLAVE_HW, \ref ARM_SPI_SS_SLAVE_SW). The
active configuration depends on the current state (Master/Slave).
@{
\def ARM_SPI_SS_MASTER_UNUSED
An SPI master does not drive or monitor the SS line. For example, when connecting to a single slave, the SS line can be connected
to a fixed low level.
\sa ARM_SPI_Control
\def ARM_SPI_SS_MASTER_SW
SS is configured as an output and controlled via \ref ARM_SPI_Control (\ref ARM_SPI_CONTROL_SS). By default, it is not active
(high). It is activated (low) by \ref ARM_SPI_Control (\ref ARM_SPI_CONTROL_SS, \ref ARM_SPI_SS_ACTIVE) and deactivated by
\ref ARM_SPI_Control (\ref ARM_SPI_CONTROL_SS, \ref ARM_SPI_SS_INACTIVE). It is not affected by transfer/send/receive
functions.
\sa ARM_SPI_Control
\def ARM_SPI_SS_MASTER_HW_OUTPUT
Here, SS is configured as an output. It will be automatically activated/deactivated for the transfers by hardware (not
controlled by \ref ARM_SPI_Control (\ref ARM_SPI_CONTROL_SS)). The activation/deactivation of the line is completely hardware
dependent. Typically, the hardware will activate it before starting a transfer and deactivate it after a transfer completes.
Some hardware will keep the line active as long as the SPI stays master. Due to different hardware behavior, this mode is
typically not useful because certain devices require that the SS signal is strictly defined with regards to transfers.
\sa ARM_SPI_Control
\def ARM_SPI_SS_MASTER_HW_INPUT
This is normally used in a multi-master configuration, where a master does not drive the SS line when driving the bus but only
monitors it. When another master activates this line, the active master backs off. This is called \b mode \b fault. SS is
configured as input and the hardware only monitors it. When it is externally deactivated while being the master, it presents
a mode fault and the SPI switches to \b inactive mode.
\sa ARM_SPI_Control
\def ARM_SPI_SS_SLAVE_HW
Hardware monitors the SS line and accepts transfers only when SS line is activate. Transfers while SS is not active are
ignored.
\sa ARM_SPI_Control
\def ARM_SPI_SS_SLAVE_SW
Used only when SS line is not used. For example, when a single master and slave are connected in a system, the SS line is not
needed (reduces the number of lines and pins used). Slave responses are controlled by software (by default, it is not
responding). Software enables/disables transfers by calling \ref ARM_SPI_Control (\ref ARM_SPI_CONTROL_SS, \ref ARM_SPI_SS_ACTIVE / \ref ARM_SPI_SS_INACTIVE).
\sa ARM_SPI_Control
@}
*/
/**
\defgroup spi_misc_ctrls SPI Miscellaneous Controls
\ingroup SPI_control
\brief Specifies additional miscellaneous controls.
\details
@{
\def ARM_SPI_SET_BUS_SPEED
\sa ARM_SPI_Control
\def ARM_SPI_GET_BUS_SPEED
\sa ARM_SPI_Control
\def ARM_SPI_SET_DEFAULT_TX_VALUE
\sa ARM_SPI_Control
\def ARM_SPI_CONTROL_SS
\sa ARM_SPI_Control
\def ARM_SPI_ABORT_TRANSFER
\sa ARM_SPI_Control
@}
*/
/**
@}
*/
// end group SPI_control
/**
@}
*/
// End SPI Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_SPI.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 7,370 |
```c
/**
\defgroup wifi_interface_gr WiFi Interface
\brief Driver API for WiFi (%Driver_WiFi.h)
\details
Wi-Fi is technology for radio wireless local area networking of devices. Wi-Fi compatible devices typically
connect to the Internet via a WLAN and a wireless access point (AP) also called hotspot.
Wikipedia offers more information about
the <a href="path_to_url" target="_blank"><b>WiFi</b></a>.
<b>Driver Block Diagram</b>
\image html WiFi.png "Block Diagram of the WiFi interface"
<b>WiFi API</b>
The following header files define the Application Programming Interface (API) for the WiFi interface:
- \b %Driver_WiFi.h : Driver API for WiFi
The CMSIS-Driver WiFi provides access to the following interfaces:
- \ref wifi_control_gr "Control interface": setup and control the WiFi module.
- \ref wifi_management_gr "Management interface": allows you to configure and manage the connection
to the WiFi access point (AP) or configure and manage the access point (AP).
- \ref wifi_socket_gr "Socket interface": provides the interface to an IP stack that is running
on the WiFi module. This IP stack handles data communication.
- \ref wifi_bypass_gr "Bypass interface": is an optional interface and enables the transmission of
Ethernet frames with the WiFi module. Using this interface requires the IP stack running on the microcontroller.
The WiFi interface usually requires CMSIS-RTOS features (i.e. mutex) and is often implemented
with a peripheral device that is connected to the system using the SPI or UART interface. However,
there are also some microcontroller devices with WiFi interface on the chip.
The implementation of the WiFi CMSIS-Driver is therefore generally provided as a separate software pack.
It is often implemented as wrapper to the SDK (Software Development Kit) of the WiFi chipset.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_WIFI : access struct for WiFi driver functions
<b>Example Code</b>
@{
*/
/**
\struct ARM_DRIVER_WIFI
\details
The functions of the WiFi driver are accessed by function pointers exposed by this structure.
Refer to \ref DriverFunctions for overview information.
Each instance of a WiFi interface provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_WiFi0 is the name of the access struct of the first instance (no. \token{0}).
- \b Driver_WiFi1 is the name of the access struct of the second instance (no. \token{1}).
A middleware configuration setting allows connecting the middleware to a specific driver instance \b %Driver_WiFi<i>n</i>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*******************************************************************************************************************/
/**
\defgroup wifi_control_gr WiFi Control
\ingroup wifi_interface_gr
\brief Control functions for the WiFi module
\details
The \ref wifi_control_gr functions setup and control the WiFi module.
@{
*/
/**
\struct ARM_WIFI_CAPABILITIES
\details
A WiFi driver can be implemented with different capabilities.
The data fields of this structure encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_WIFI_GetCapabilities
*******************************************************************************************************************/
/**
\typedef ARM_WIFI_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_WIFI_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_WIFI_Initialize
*******************************************************************************************************************/
/**
\defgroup wifi_event WiFi Events
\ingroup wifi_control_gr
\brief The WiFi driver generates call back events that are notified via the function \ref ARM_WIFI_SignalEvent.
\details The following call back notification events are generated:
@{
\def ARM_WIFI_EVENT_AP_CONNECT
\def ARM_WIFI_EVENT_AP_DISCONNECT
\def ARM_WIFI_EVENT_ETH_RX_FRAME
@}
*/
ARM_DRIVER_VERSION ARM_WIFI_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_WIFI_GetVersion (void)
\details
The function \b ARM_WIFI_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION.
API version is the version of the CMSIS-Driver specification used to implement this driver.
Driver version is source code version of the actual driver implementation.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void get_wifi_version (void) {
ARM_DRIVER_VERSION version;
wifi= &Driver_WiFi0;
version = wifi->GetVersion ();
if (version.api < 0x100U) { // requires at minimum API version 1.0 or higher
// error handling
return;
}
}
\endcode
*/
ARM_WIFI_CAPABILITIES ARM_WIFI_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_WIFI_CAPABILITIES ARM_WIFI_GetCapabilities (void)
\details
The function \b ARM_WIFI_GetCapabilities retrieves information about capabilities in this driver implementation.
The data fields of the struct \ref ARM_WIFI_CAPABILITIES encode various capabilities, for example
if a WiFi module supports the Access Point mode or the bypass mode, or is capable to signal events using
the \ref ARM_WIFI_SignalEvent callback function.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void get_wifi_capabilities (void) {
ARM_WIFI_CAPABILITIES capabilities;
wifi = &Driver_WiFi0;
capabilities = wifi->GetCapabilities ();
// interrogate capabilities
:
}
\endcode
*/
int32_t ARM_WIFI_Initialize (ARM_WIFI_SignalEvent_t cb_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_Initialize (ARM_WIFI_SignalEvent_t cb_event)
\details
The function \b ARM_WIFI_Initialize initializes the WiFi module.
It is called when the middleware component starts operation.
The \ref ARM_WIFI_Initialize function performs the following operations:
- Initializes the resources and peripherals required for the WiFi module.
- Registers the \ref ARM_WIFI_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_WIFI_SignalEvent callback function;
use a \token{NULL} pointer when no callback signals are required.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
static ARM_ETH_MAC_ADDR own_mac_address;
void initialize_wifi (void) {
wifi = &Driver_WiFi0;
// Initialize and Power-on WiFi Module
wifi->Initialize (NULL);
wifi->PowerControl (ARM_POWER_FULL);
// Populate own_mac_address with the address to use
wifi->SetOption(ARM_WIFI_MAC, &own_mac_address, 6U);
}
\endcode
*/
int32_t ARM_WIFI_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_Uninitialize (void)
\details
The function \b ARM_WIFI_Uninitialize de-initializes the resources of the WiFi module.
It is called when the middleware component stops operation and releases the software resources
used by the module.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void uninitialize_wifi (void) {
wifi = &Driver_WiFi0;
// Power off and De-initialize WiFi Module
wifi->PowerControl (ARM_POWER_OFF);
wifi->Uninitialize ();
}
\endcode
*/
int32_t ARM_WIFI_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_WIFI_PowerControl allows you to configure the power modes of the WiFi module.
The parameter \em state specifies the \ref ARM_POWER_STATE.
Low-power mode depends on additional options set by \ref ARM_WIFI_SetOption :
- Deep-sleep mode is entered when \ref ARM_WIFI_LP_TIMER option is set to a value different than 0
- Sleep mode is entered otherwise
\b Deep-sleep mode (only for station):
Module turns off the radio and also internal CPU thus reducing power consumption to minimum,
only the timer is running that wakes-up the module after specified time.
When timer expires the module reconnects to the access point.
This mode is used when power consumption is a priority (battery powered devices) and when WiFi
is used in short intervals that do not occur very often
(example: sending a temperature from a sensor to a cloud every 10 seconds).
\b Sleep mode (only for station):
Module reduces power consumption by going into sleep and waking up periodically to listen for beacons.
Delivery Traffic Indication Message (DTIM) interval can be configured with option \ref ARM_WIFI_DTIM
(station and access point) and beacon interval with option \ref ARM_WIFI_BEACON (only for access point).
Default module intervals are used when those options are not explicitly set.
If power \em state specifies an unsupported mode, the function returns \ref ARM_DRIVER_ERROR_UNSUPPORTED as
status information and the previous power state of the peripheral is unchanged. Multiple calls with the same
\em state generate no error.
\b Example:
- see \ref ARM_WIFI_Initialize
- see \ref ARM_WIFI_Uninitialize
*/
int32_t ARM_WIFI_GetModuleInfo (char *module_info, uint32_t max_len) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_GetModuleInfo (char *module_info, uint32_t max_len)
\details
The function \b ARM_WIFI_GetModuleInfo retrieves string containing information about the WiFi module.
The information might include module name, firmware version, ...
\note Module must be initialized and powered before module information can be retrieved.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void initialize_wifi (void) {
char info[32];
wifi = &Driver_WiFi0;
// Initialize and Power-on WiFi Module
wifi->Initialize (NULL);
wifi->PowerControl (ARM_POWER_FULL);
// Retrieve module information
wifi->GetModuleInfo(&info, sizeof(info));
}
\endcode
*/
void ARM_WIFI_SignalEvent (uint32_t event, void *arg) {
}
/**
\fn void ARM_WIFI_SignalEvent (uint32_t event, void *arg)
\details
The function \b ARM_WIFI_SignalEvent is a callback function registered by the function \ref ARM_WIFI_Initialize.
It is called by the WiFi driver to notify the application about WiFi Events occurred during operation.
The parameter \em event indicates the event that occurred during driver operation.
The parameter \em arg provides additional information about the event.
The following events can be generated:
Parameter \em event | Description
:------------------------------------|:------------------------------------------
\ref ARM_WIFI_EVENT_AP_CONNECT | Occurs in access point mode when a station has connected to the access point.
\ref ARM_WIFI_EVENT_AP_DISCONNECT | Occurs in access point mode when a station has disconnected from the access point.
\ref ARM_WIFI_EVENT_ETH_RX_FRAME | Occurs in \ref wifi_bypass_gr when an ethernet frame is received.
*/
/**
@}
*/
// end group wifi_control_gr
/**
\defgroup wifi_management_gr WiFi Management
\ingroup wifi_interface_gr
\brief Configure and manage the connection to a WiFi access point (AP) or configure and manage the access point (AP).
\details The \ref wifi_management_gr functions are used to configure and manage the connection to a WiFi access point (AP)
also called hotspot when in station mode. They are also used to configure and manage the access point (AP) itself
when in access point mode.
@{
*/
/**
\defgroup WiFi_option WiFi Option Codes
\ingroup wifi_management_gr
\brief WiFi Option Codes for \ref ARM_WIFI_SetOption or \ref ARM_WIFI_GetOption function.
\details
Many parameters of the WiFi module are configured using the \ref ARM_WIFI_SetOption or \ref ARM_WIFI_GetOption function.
@{
\def ARM_WIFI_BSSID
\details Specifies the BSSID of the access point to connect or the access point itself.
\sa WiFi_option
\def ARM_WIFI_TX_POWER
\details Specifies the transmit power in dBm.
\sa WiFi_option
\def ARM_WIFI_LP_TIMER
\details Specifies the low-power deep-sleep time in seconds for station (disabled when 0 - default).
\sa WiFi_option
\def ARM_WIFI_DTIM
\details Specifies the DTIM interval in number of beacons.
\sa WiFi_option
\def ARM_WIFI_BEACON
\details Specifies the beacon interval in milliseconds for access point.
\sa WiFi_option
\def ARM_WIFI_MAC
\details Specifies the MAC address.
\sa WiFi_option
\def ARM_WIFI_IP
\details Specifies the IP address.
\sa WiFi_option
\def ARM_WIFI_IP_SUBNET_MASK
\details Specifies the subnet mask.
\sa WiFi_option
\def ARM_WIFI_IP_GATEWAY
\details Specifies the gateway IP address.
\sa WiFi_option
\def ARM_WIFI_IP_DNS1
\details Specifies the IP address of the primary DNS server.
\sa WiFi_option
\def ARM_WIFI_IP_DNS2
\details Specifies the IP address of the secondary DNS server.
\sa WiFi_option
\def ARM_WIFI_IP_DHCP
\details Enables or disables the DHCP client for station or DHCP server for access point.
\sa WiFi_option
\def ARM_WIFI_IP_DHCP_POOL_BEGIN
\details Specifies the start IP address for DHCP server (access point).
\sa WiFi_option
\def ARM_WIFI_IP_DHCP_POOL_END
\details Specifies the end IP address for DHCP server (access point).
\sa WiFi_option
\def ARM_WIFI_IP_DHCP_LEASE_TIME
\details Specifies the lease time for DHCP server (access point).
\sa WiFi_option
\def ARM_WIFI_IP6_GLOBAL
\details Specifies the global IPv6 address.
\sa WiFi_option
\def ARM_WIFI_IP6_LINK_LOCAL
\details Specifies the link-local IPv6 address.
\sa WiFi_option
\def ARM_WIFI_IP6_SUBNET_PREFIX_LEN
\details Specifies the address prefix length.
\sa WiFi_option
\def ARM_WIFI_IP6_GATEWAY
\details Specifies the gateway IPv6 address.
\sa WiFi_option
\def ARM_WIFI_IP6_DNS1
\details Specifies the IPv6 address of the primary DNS server.
\sa WiFi_option
\def ARM_WIFI_IP6_DNS2
\details Specifies the IPv6 address of the secondary DNS server.
\sa WiFi_option
\def ARM_WIFI_IP6_DHCP_MODE
\details Specifies the operation mode of the DHCPv6 client.
\sa WiFi_option
@}
*/
/**
\defgroup wifi_sec_type WiFi Security Type
\ingroup wifi_management_gr
\brief Specifies WiFi security type for \ref ARM_WIFI_Activate.
\details
The WiFi security type defines the standard used to protect the wireless network from unauthorized access.
@{
\def ARM_WIFI_SECURITY_OPEN
\details This is an open system which provides \b no security.
\sa wifi_sec_type
\def ARM_WIFI_SECURITY_WEP
\details This security standard provides \b weak level of security.
\sa wifi_sec_type
\def ARM_WIFI_SECURITY_WPA
\details This security standard provides \b medium level of security.
\sa wifi_sec_type
\def ARM_WIFI_SECURITY_WPA2
\details This security standard provides \b strong level of security.
\sa wifi_sec_type
\def ARM_WIFI_SECURITY_UNKNOWN
\details Unknown security standard (reported by \ref ARM_WIFI_Scan).
\sa wifi_sec_type
@}
*/
/**
\defgroup wifi_wps_method WiFi Protected Setup (WPS) Method
\ingroup wifi_management_gr
\brief Specifies WiFi WPS method for \ref ARM_WIFI_Activate.
\details
The WiFi WPS method defines which WPS method is used.
@{
\def ARM_WIFI_WPS_METHOD_NONE
\details WPS not used.
\sa wifi_wps_method
\def ARM_WIFI_WPS_METHOD_PBC
\details WPS with Push Button Configuration.
\sa wifi_wps_method
\def ARM_WIFI_WPS_METHOD_PIN
\details WPS with PIN.
\sa wifi_wps_method
@}
*/
/**
\defgroup wifi_dhcp_v6_mode WiFi DHCPv6 Mode
\ingroup wifi_management_gr
\brief Specifies IPv6 Dynamic Host Configuration Protocol (DHCP) Mode.
\details
The WiFi DHCPv6 mode defines the DHCP mode in IPv6.
@{
\def ARM_WIFI_IP6_DHCP_OFF
\details
In the static host configuration mode, the IPv6 address, the default gateway address,
and the addresses of DNS servers are statically configured from the preset values.
\sa wifi_dhcp_v6_mode
\def ARM_WIFI_IP6_DHCP_STATELESS
\details
In the stateless DHCP configuration mode, the client obtains only extended information
from a DHCPv6 server, such as DNS server addresses. Stateless auto-configuration of
IPv6 allows the client device to self configure it's IPv6 addresses and routing based
on the router advertisements.
\sa wifi_dhcp_v6_mode
\def ARM_WIFI_IP6_DHCP_STATEFULL
\details
In the stateful DHCP configuration mode, the client connects to a DHCPv6 server for
a leased IPv6 address and DNS server addresses.
\sa wifi_dhcp_v6_mode
@}
*/
/**
\struct ARM_WIFI_CONFIG_t
\details
Provides information needed to connect to the WiFi network for station or how to configure the access point (AP).
<b>Used in:</b>
- \ref ARM_WIFI_Activate
*******************************************************************************************************************/
/**
\struct ARM_WIFI_SCAN_INFO_t
\details
Provides information about the wireless networks that were detected when searching for available WiFi networks. The structure
contains the information needed to connect to the WiFi network. Of course, the access password is not included and must
be provided separately.
<b>Used in:</b>
- \ref ARM_WIFI_Scan
*******************************************************************************************************************/
/**
\struct ARM_WIFI_NET_INFO_t
\details
Provides information about the network that the station is connected to.
<b>Used in:</b>
- \ref ARM_WIFI_GetNetInfo
*******************************************************************************************************************/
int32_t ARM_WIFI_SetOption (uint32_t interface, uint32_t option, const void *data, uint32_t len) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_SetOption (uint32_t interface, uint32_t option, const void *data, uint32_t len)
\details
The function \b ARM_WIFI_SetOption sets the value of the specified option of the WiFi module.
The argument \em interface specifies the interface (0 = Station, 1 = Access Point).
The argument \em option specifies the option that is to be set (see below).
The argument \em data points to a buffer containing the value of the option to be set
and must be aligned to the data type of the corresponding option.
The argument \em len specifies the length of the buffer \em data and must be equal (or higher)
to the length of the corresponding option.
Option | Description | Data | Type/Length
:--------------------------------------|:---------------------------------------|:--------------|:-----------
\ref ARM_WIFI_BSSID | BSSID of AP to connect or AP | bssid | uint8_t[6]
\ref ARM_WIFI_TX_POWER | Transmit power | power[dbm] | uint32_t
\ref ARM_WIFI_LP_TIMER | Low-power deep-sleep time | time[seconds] | uint32_t
\ref ARM_WIFI_DTIM | DTIM interval | dtim[beacons] | uint32_t
\ref ARM_WIFI_BEACON | Beacon interval | interval[ms] | uint32_t
\ref ARM_WIFI_MAC | MAC address | mac | uint8_t[6]
\ref ARM_WIFI_IP | IPv4 address | ip | uint8_t[4]
\ref ARM_WIFI_IP_SUBNET_MASK | IPv4 subnet mask | mask | uint8_t[4]
\ref ARM_WIFI_IP_GATEWAY | IPv4 gateway address | ip | uint8_t[4]
\ref ARM_WIFI_IP_DNS1 | IPv4 primary DNS server address | ip | uint8_t[4]
\ref ARM_WIFI_IP_DNS2 | IPv4 secondary DNS server address | ip | uint8_t[4]
\ref ARM_WIFI_IP_DHCP | IPv4 DHCP client/server enable/disable | dhcp (0, 1) | uint32_t
\ref ARM_WIFI_IP_DHCP_POOL_BEGIN | IPv4 DHCP server begin address | ip | uint8_t[4]
\ref ARM_WIFI_IP_DHCP_POOL_END | IPv4 DHCP server end address | ip | uint8_t[4]
\ref ARM_WIFI_IP_DHCP_LEASE_TIME | IPv4 DHCP server lease time | time[seconds] | uint32_t
\ref ARM_WIFI_IP6_GLOBAL | IPv6 global address | ip6 | uint8_t[16]
\ref ARM_WIFI_IP6_LINK_LOCAL | IPv6 link-local address | ip6 | uint8_t[16]
\ref ARM_WIFI_IP6_SUBNET_PREFIX_LEN | IPv6 subnet prefix length | len (1..127) | uint32_t
\ref ARM_WIFI_IP6_GATEWAY | IPv6 gateway address | ip6 | uint8_t[16]
\ref ARM_WIFI_IP6_DNS1 | IPv6 primary DNS server address | ip6 | uint8_t[16]
\ref ARM_WIFI_IP6_DNS2 | IPv6 secondary DNS server address | ip6 | uint8_t[16]
\ref ARM_WIFI_IP6_DHCP_MODE | IPv6 DHCP client mode | mode | uint32_t
\b Example:
\code
uint8_t ip[4];
ip[0] = 192U;
ip[1] = 168U;
ip[2] = 0U;
ip[3] = 1U;
// Set IP static address of the Station
wifi->SetOption (0U, ARM_WIFI_IP, &ip, sizeof(ip));
\endcode
*/
int32_t ARM_WIFI_GetOption (uint32_t interface, uint32_t option, void *data, uint32_t *len) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_GetOption (uint32_t interface, uint32_t option, void *data, uint32_t *len)
\details
The function \b ARM_WIFI_GetOption retrieves the current value of the specified option of
the WiFi module.
The argument \em interface specifies the interface (0 = Station, 1 = Access Point).
The argument \em option specifies the option that is to be retrieved (see \ref ARM_WIFI_SetOption).
The argument \em data points to a buffer that will be used to store the value of
the \em option and must be aligned to the data type of the corresponding option.
The argument \em len is a pointer to the length of the buffer at input and returns the length
of the option information on the output.
\b Example:
\code
uint8_t ip[4]; // IP address
uint8_t mask[4]; // Subnet mask
uint8_t gateway[4]; // Gateway address
// Get IP address, Subnet mask and Gateway address of the Station
wifi->GetOption (0U, ARM_WIFI_IP, &ip, sizeof(ip));
wifi->GetOption (0U, ARM_WIFI_IP_SUBNET_MASK, &mask, sizeof(mask));
wifi->GetOption (0U, ARM_WIFI_IP_GATEWAY, &gateway, sizeof(gateway));
\endcode
*/
int32_t ARM_WIFI_Scan (ARM_WIFI_SCAN_INFO_t scan_info[], uint32_t max_num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_Scan (ARM_WIFI_SCAN_INFO_t scan_info[], uint32_t max_num)
\details
The function \b ARM_WIFI_Scan searches for available WiFi networks. Using this function,
you can determine which wireless networks are available for the connection. If the network is
secured, you must also know the password to connect.
The argument \em scan_info is a pointer to an array of network information structures, where
the available network information will be returned.
The argument \em max_num specifies maximum number of network information structures,
that can be stored to the \em scan_info.
\b Example:
\code
ARM_WIFI_SCAN_INFO_t scan_info[8];
num = wifi->Scan (scan_info, 8U);
// Print SSIDs of available WiFi networks
for (i = 0; i < num; i++) {
printf ("%d. ssid=%s\n", i, scan_info[i].ssid);
}
\endcode
*/
int32_t ARM_WIFI_Activate (uint32_t interface, const ARM_WIFI_CONFIG_t *config) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_Activate (uint32_t interface, const ARM_WIFI_CONFIG_t *config)
\details
The function \b ARM_WIFI_Activate activates the specified interface.
The argument \em interface specifies the interface (0 = Station, 1 = Access Point).
When station interface is specified, the WiFi module connects to a wireless network.
The wireless network trying to connect to must be available,
otherwise the operation will fail after a timeout.
Available wireless networks can be scanned by using the function \ref ARM_WIFI_Scan.
When access point interface is specified, the WiFi module creates a wireless network
by activating the access point.
The argument \em config is a pointer to the configuration \ref ARM_WIFI_CONFIG_t
which provides information needed to connect to a WiFi network for station interface
or information used to configure the access point (AP) for access point interface.
\em ssid specifies the name of the network to connect to or the network to create.
\em pass specifies the password for accessing the wireless network.
\em security specifies the security type which will be used for the connection.
\em ch specifies the WiFi channel which will be used for the connection.
Valid channels for 2.4 GHz frequency are from \token{1} to \token{13}. If the value for \em ch = \token{0},
the system automatically selects the channel.
For station interface the channel of the AP being connected to is used.
For access point interface the module automatically selects the best channel for the WiFi connection.
\note
Optionally BSSID parameter can be also set using \ref ARM_WIFI_SetOption.
It allows connection to specific BSSID when connecting to an access point or specifies
the BSSID of the access point.
\em wps_method specifies if WiFi Protected Setup (WPS) is used and which method.
\em wps_pin specifies the PIN used with WPS (\ref ARM_WIFI_WPS_METHOD_PIN).
With the \b push-button method, you typically press the button, either real or virtual,
both at the access point and the station. No credentials are needed.
With \b PIN method, you must provide the PIN code that you read from the label or screen
on the wireless device.
WPS configuration for station is used when station connects to an access point.
It enables to connect without specifying SSID, Password, Security Type or WiFi Channel.
The actual network information can be retrieved once connected with \ref ARM_WIFI_GetNetInfo.
WPS configuration for access point is used when access point is activated.
Subsequent activate calls re-trigger the WPS procedure.
\note
WPS is typically activated by pressing the WPS button at the access point.
During the discovery mode (usually 2 minutes or less) any wireless device may connect
to the access point (PIN needs to match when PIN method is selected).
\b Example:
\code
ARM_WIFI_CONFIG_t wifi_config;
wifi_config.ssid = "GuestAccess";
wifi_config.pass = "guest";
wifi_config.security = ARM_WIFI_SECURITY_WPA2;
wifi_config.ch = 0U;
wifi_config.wps_method = ARM_WIFI_WPS_METHOD_NONE;
// Connect to wireless network
status = wifi->Activate (0U, &wifi_config);
if (status != ARM_DRIVER_OK) {
// error handling
}
\endcode
*/
int32_t ARM_WIFI_Deactivate (uint32_t interface) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_Deactivate (uint32_t interface)
\details
The function \b ARM_WIFI_Deactivate deactivates the specified interface.
The argument \em interface specifies the interface (0 = Station, 1 = Access Point).
When station interface is specified, the WiFi module disconnects from the wireless network.
When access point interface is specified, the WiFi module deactivates the access point.
\b Example:
- see \ref ARM_WIFI_GetNetInfo
*/
uint32_t ARM_WIFI_IsConnected (void) {
return 0;
}
/**
\fn uint32_t ARM_WIFI_IsConnected (void)
\details
The function \b ARM_WIFI_IsConnected checks if the station is connected to a wireless network
and returns the connection status.
The function returns a \token{non-zero} value, if the station is connected. If the station
is not connected, the function returns \token{0}.
\b Example:
- see \ref ARM_WIFI_GetNetInfo
*/
int32_t ARM_WIFI_GetNetInfo (ARM_WIFI_NET_INFO_t *net_info) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_GetNetInfo (ARM_WIFI_NET_INFO_t *net_info)
\details
The function \b ARM_WIFI_GetNetInfo retrieves wireless network information of a connected station.
It can be used to retrieve network connection information for subsequent connections
after initially connecting using WPS.
\b Example:
\code
ARM_WIFI_CONFIG_t wifi_config;
ARM_WIFI_NET_INFO_t net_info;
memset(&wifi_config, 0, sizeof(wifi_config));
wifi_config.wps_method = ARM_WIFI_WPS_METHOD_PBC;
// Connect to wireless network (WPS)
status = wifi->Activate (0U, &wifi_config);
if (status != ARM_DRIVER_OK) {
// error handling
}
// Retrieve network information
if (wifi->IsConnected ()) {
status = wifi->GetNetInfo (&net_info);
if (status != ARM_DRIVER_OK) {
// error handling
}
printf("SSID=%s, Password=%s",net_info.ssid, net_info.pass);
}
// Disconnect from wireless network
wifi->Deactivate (0U);
\endcode
*/
/**
@}
*/
// end group wifi_management_gr
/**
\defgroup wifi_bypass_gr WiFi Bypass Mode
\ingroup wifi_interface_gr
\brief Transfer Ethernet frames by WiFi module.
\details The \ref wifi_bypass_gr functions are an optional interface and enable the transmission of
Ethernet frames with WiFi modules. The use of this interface requires that the TCP/IP stack is running
on the microcontroller (usually a third-party or open-source networking component). The internal TCP/IP
stack of the WiFi module is therefore not used, and this usually means that the \ref wifi_socket_gr
functions can not be used.
@{
*/
int32_t ARM_WIFI_BypassControl (uint32_t interface, uint32_t mode) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_BypassControl (uint32_t interface, uint32_t mode)
\details
The function \b ARM_WIFI_BypassControl enables or disables the WiFi bypass mode.
The WiFi Bypass mode can only be enabled, if there is a bypass mode supported in the WiFi driver.
You can check this by checking the driver's capabilities.
\note
Bypass mode is enabled by default if the module does not support the Socket interface.
The argument \em mode specifies the desired state of the WiFi Bypass mode, which is
enabled or disabled.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
static ARM_ETH_MAC_ADDR own_mac_address;
static void wifi_notify (uint32_t event, ,void *arg) {
switch (event) {
:
}
}
void initialize_wifi_bypass (void) {
ARM_WIFI_CAPABILITIES capabilities;
wifi = &Driver_WiFi0;
capabilities = wifi->GetCapabilities ();
if (capabilities.bypass_mode == 0) {
// error handling
}
// Initialize and Power-on WiFi Interface
wifi->Initialize ((capabilities.eth_rx_frame_event) ? wifi_notify : NULL);
wifi->PowerControl (ARM_POWER_FULL);
// populate own_mac_address with the address to use for station
wifi->SetOption(0U, ARM_WIFI_MAC, &own_mac_address, 6U);
wifi->BypassControl (0U, 1U); // Enable bypass mode for station
}
\endcode
*/
int32_t ARM_WIFI_EthSendFrame (uint32_t interface, const uint8_t *frame, uint32_t len) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_EthSendFrame (uint32_t interface, const uint8_t *frame, uint32_t len)
\details
The function \b ARM_WIFI_EthSendFrame writes an <b>Ethernet frame</b> to the WiFi transmit buffer.
The WiFi bypass mode must be enabled by using the function \ref ARM_WIFI_BypassControl
before a call to this function.
The frame data addressed by \em frame starts with MAC destination and ends with the last
Payload data byte. The frame data is copied into the transmit buffer of the WiFi interface.
The maximum value for \em len is implied by the size restrictions of the Ethernet frame
but is not verified. Using an invalid value for \em len may generate unpredicted results.
\b Example:
\code
status = wifi->EthSendFrame (0U, &frame_data[0], frame_length);
if (status != ARM_DRIVER_OK) {
// error handling
}
\endcode
*/
int32_t ARM_WIFI_EthReadFrame (uint32_t interface, uint8_t *frame, uint32_t len) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_EthReadFrame (uint32_t interface, uint8_t *frame, uint32_t len)
\details
The function \b ARM_WIFI_EthReadFrame reads an <b>Ethernet frame</b> from the WiFi interface
in the bypass mode.
The \em len of the Ethernet frame can be checked using the function \ref ARM_WIFI_EthGetRxFrameSize.
The frame data addressed by \em frame starts with MAC destination and ends with the last
Payload data byte. The frame data is read from the receive buffer of the WiFi interface and
the number of bytes written into the memory addressed by \em frame is returned.
A negative return value indicates an error whereby the status code is defined with
driver common return codes.
The function \ref ARM_WIFI_EthReadFrame may be called with \em buf = \token{NULL} and \em len = \token{0}
to discard or release a frame. This is useful when an incorrect frame has been received or
no memory is available to hold the Ethernet frame.
\b Example:
\code
size = wifi->EthGetRxFrameSize ();
if ((size < 14) || (size > 1514)) { // frame excludes CRC
wifi->EthReadFrame (NULL, 0); // Frame error, release it
}
len = wifi->ReadFrame (0U, &frame_data[0], size);
if (len < 0) {
// error handling
}
\endcode
*/
uint32_t ARM_WIFI_EthGetRxFrameSize (uint32_t interface) {
return 0;
}
/**
\fn uint32_t ARM_WIFI_EthGetRxFrameSize (uint32_t interface)
\details
The function \b ARM_WIFI_EthGetRxFrameSize returns the size of a received <b>Ethernet frame</b>
in the bypass mode. This function can be called before \ref ARM_WIFI_EthReadFrame and retrieves
the value \em len.
The frame size includes MAC destination and ends with the last Payload data byte.
Value \token{0} indicates that no Ethernet frame is available in the receive buffer.
Values smaller than minimum size of Ethernet frame or larger than maximum size of Ethernet frame
indicate an invalid frame which needs to be discarded by calling \ref ARM_WIFI_EthReadFrame.
\b Example:
- see \ref ARM_WIFI_EthReadFrame
*/
/**
@}
*/
// end group wifi_bypass_gr
/**
\defgroup wifi_socket_gr WiFi Socket
\ingroup wifi_interface_gr
\brief Socket interface to IP stack running on WiFi module
\details The \ref wifi_socket_gr functions provide the interface to an IP stack that is running
on the WiFi module. This IP stack handles data communication with the network and provides the user
with a communication endpoint called sockets.
@{
*/
/**
\defgroup wifi_addr_family WiFi Socket Address Family definitions
\ingroup wifi_socket_gr
\brief WiFi Socket Address Family definitions.
\details The WiFi Socket Address Family specifies the addressing scheme that an instance of the WiFi socket can use.
@{
\def ARM_SOCKET_AF_INET
\details Internet Address Family version 4.
\def ARM_SOCKET_AF_INET6
\details Internet Address Family version 6.
@}
*/
/**
\defgroup wifi_socket_type WiFi Socket Type definitions
\ingroup wifi_socket_gr
\brief WiFi Socket Type definitions.
\details The WiFi Socket Type specifies the type of the WiFi socket.
@{
\def ARM_SOCKET_SOCK_STREAM
\details Stream Socket is connection-oriented, sequenced and reliable, implemented on top of the TCP protocol.
\def ARM_SOCKET_SOCK_DGRAM
\details Datagram Socket is connectionless, unreliable, using the UDP protocol.
@}
*/
/**
\defgroup wifi_protocol WiFi Socket Protocol definitions
\ingroup WiFi_socket_gr
\brief WiFi Socket Protocol definitions.
\details The WiFi Socket Protocol specifies the Internet Protocol Type that the socket is using.
@{
\def ARM_SOCKET_IPPROTO_TCP
\details Transmission Control Protocol.
\def ARM_SOCKET_IPPROTO_UDP
\details User Datagram Protocol.
@}
*/
/**
\defgroup wifi_soc_opt WiFi Socket Option definitions
\ingroup WiFi_socket_gr
\brief WiFi Socket Option definitions.
\details The WiFi Socket Option specifies the socket option for which the value is to be set or obtained.
@{
\def ARM_SOCKET_IO_FIONBIO
\details Enables or disables the non-blocking mode for the WiFi socket.
\sa wifi_soc_opt
\def ARM_SOCKET_SO_RCVTIMEO
\details Specifies the time limit for receiving in blocking mode. The time limit is in milliseconds.
\sa wifi_soc_opt
\def ARM_SOCKET_SO_SNDTIMEO
\details Specifies the time limit for sending in blocking mode. The time limit is in milliseconds.
\sa wifi_soc_opt
\def ARM_SOCKET_SO_KEEPALIVE
\details Enables or disables the keep-alive mode for the stream socket.
\sa wifi_soc_opt
\def ARM_SOCKET_SO_TYPE
\details Obtains the type of the Wifi socket.
\sa wifi_soc_opt
@}
*/
/**
\defgroup wifi_soc_func WiFi Socket Function return codes
\ingroup WiFi_socket_gr
\brief WiFi Socket Function return codes.
\details This section lists all the return errors the WiFi socket functions will return.
The error codes are negative. This makes it easy to check an error when the return
code is less than \token{0}.
@{
\def ARM_SOCKET_ERROR
\sa wifi_soc_func
\def ARM_SOCKET_ESOCK
\sa wifi_soc_func
\def ARM_SOCKET_EINVAL
\sa wifi_soc_func
\def ARM_SOCKET_ENOTSUP
\sa wifi_soc_func
\def ARM_SOCKET_ENOMEM
\sa wifi_soc_func
\def ARM_SOCKET_EAGAIN
\sa wifi_soc_func
\def ARM_SOCKET_EINPROGRESS
\sa wifi_soc_func
\def ARM_SOCKET_ETIMEDOUT
\sa wifi_soc_func
\def ARM_SOCKET_EISCONN
\sa wifi_soc_func
\def ARM_SOCKET_ENOTCONN
\sa wifi_soc_func
\def ARM_SOCKET_ECONNREFUSED
\sa wifi_soc_func
\def ARM_SOCKET_ECONNRESET
\sa wifi_soc_func
\def ARM_SOCKET_ECONNABORTED
\sa wifi_soc_func
\def ARM_SOCKET_EALREADY
\sa wifi_soc_func
\def ARM_SOCKET_EADDRINUSE
\sa wifi_soc_func
\def ARM_SOCKET_EHOSTNOTFOUND
\sa wifi_soc_func
@}
*/
int32_t ARM_WIFI_SocketCreate (int32_t af, int32_t type, int32_t protocol) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketCreate (int32_t af, int32_t type, int32_t protocol)
\details
The function \b ARM_WIFI_SocketCreate creates a communication endpoint called a socket.
The argument \em af specifies the address family. The following values are supported:
Family | Description
:----------------------------|:-------------------------------------------------
\ref ARM_SOCKET_AF_INET | Address Family Internet
\ref ARM_SOCKET_AF_INET6 | Address Family Internet version 6
The argument \em type specifies the communication semantics. The following are the currently supported types:
Type | Description
:----------------------------|:-------------------------------------------------
\ref ARM_SOCKET_SOCK_STREAM | Provides a reliable connection based data stream that is full-duplex
\ref ARM_SOCKET_SOCK_DGRAM | Provides connectionless communication that is unreliable
The argument \em protocol specifies the protocol that must be used with the socket type:
Protocol | Description
:----------------------------|:-------------------------------------------------
\ref ARM_SOCKET_IPPROTO_TCP | Must be used with ARM_SOCKET_SOCK_STREAM socket type
\ref ARM_SOCKET_IPPROTO_UDP | Must be used with ARM_SOCKET_SOCK_DGRAM socket type
\token{0} | The system selects a matching protocol for the socket type
\b Example:
- see \ref ARM_WIFI_SocketListen, \ref ARM_WIFI_SocketConnect
*/
int32_t ARM_WIFI_SocketBind (int32_t socket, const uint8_t *ip, uint32_t ip_len, uint16_t port) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketBind (int32_t socket, const uint8_t *ip, uint32_t ip_len, uint16_t port)
\details
The function \b ARM_WIFI_SocketBind assigns a name to an unnamed socket. The name represents the local address
and port of the communication endpoint.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em ip is a pointer to the buffer containing the IP address octets of the local IP address.
The argument \em ip_len specifies the length of the local IP address. The length is \token{4} bytes
for the IPv4 address and \token{16} bytes for the IPv6 address.
The argument \em port specifies the local port. If the argument \em port is \token{0}, the function returns error,
because this port is reserved.
\b Example:
- see \ref ARM_WIFI_SocketListen
*/
int32_t ARM_WIFI_SocketListen (int32_t socket, int32_t backlog) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketListen (int32_t socket, int32_t backlog)
\details
The function \b ARM_WIFI_SocketListen sets the specified socket to listening mode, that is to the
server mode of operation. Before calling the \b ARM_WIFI_SocketListen function, the \ref ARM_WIFI_SocketBind
function must be called.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em backlog specifies a maximum number of connection requests that can be queued.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void Echo_Server_Thread (void *arg) {
uint8_t ip[4] = { 0U, 0U, 0U, 0U };
int32_t sock, sd, res;
char dbuf[120];
while (1) {
wifi = &Driver_WiFi0;
sock = wifi->SocketCreate (ARM_SOCKET_AF_INET, ARM_SOCKET_SOCK_STREAM, ARM_SOCKET_IPPROTO_TCP);
wifi->SocketBind (sock, (uint8_t *)ip, sizeof(ip), 7U);
wifi->SocketListen (sock, 1);
sd = wifi->SocketAccept (sock, NULL, NULL, NULL);
wifi->SocketClose (sock);
sock = sd;
while (1) {
res = wifi->SocketRecv (sock, dbuf, sizeof(dbuf));
if (res < 0) {
break; // Error occurred
}
if (res > 0) {
wifi->SocketSend (sock, dbuf, res); // Echo the data
}
}
wifi->SocketClose (sock);
}
}
\endcode
*/
int32_t ARM_WIFI_SocketAccept (int32_t socket, uint8_t *ip, uint32_t *ip_len, uint16_t *port) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketAccept (int32_t socket, uint8_t *ip, uint32_t *ip_len, uint16_t *port)
\details
The function \b ARM_WIFI_SocketAccept accepts a connection request queued for a listening socket.
If a connection request is pending, \b ARM_WIFI_SocketAccept removes the request from the queue,
and creates a new socket for the connection. The original listening socket remains open and continues
to queue new connection requests. The \em socket must be a socket of type \b ARM_SOCKET_SOCK_STREAM.
In blocking mode, which is enabled by default, this function waits for a connection request. In
non blocking mode, you must call the \b ARM_WIFI_SocketAccept function again if the error code
\c ARM_SOCKET_EAGAIN is returned.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em ip is a pointer to the buffer that will receive the IP address of the connection node.
If the \em ip is \token{NULL}, the IP address is not returned.
The argument \em ip_len is a pointer to the IP address length. It should initially contain the amount of
space pointed to by \em ip. On return it contains the actual length of the address returned in bytes.
The argument \em port is a pointer to the buffer, that will receive the port number of the connection node.
If the \em port is \token{NULL}, the port number is not returned.
\b Example:
- see \ref ARM_WIFI_SocketListen
*/
int32_t ARM_WIFI_SocketConnect (int32_t socket, const uint8_t *ip, uint32_t ip_len, uint16_t port) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketConnect (int32_t socket, const uint8_t *ip, uint32_t ip_len, uint16_t port)
\details
The function \b ARM_WIFI_SocketConnect assigns the address of the peer communication endpoint. The function
behaves differently according to the type of socket:
- \b ARM_SOCKET_SOCK_STREAM: A connection is established between the endpoints.
In blocking mode, which is enabled by default, this function waits for a connection to be established.
In non blocking mode, the function returns the error code \c ARM_SOCKET_EINPROGRESS and the connection
is established asynchronously. Subsequent calls to \b ARM_WIFI_SocketConnect for the same socket,
before the connection is established, return the error code \c ARM_SOCKET_EALREADY. When the connection
is established, the call to \b ARM_WIFI_SocketConnect returns the error code \c ARM_SOCKET_EISCONN.
- \b ARM_SOCKET_SOCK_DGRAM: An address filter is established between the endpoints.
The address filter is changed with another \b ARM_WIFI_SocketConnect function call. If the socket
is not yet bound, the system implicitly binds to a random dynamic port.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em ip is a pointer to the buffer containing the IP address octets of the endpoint node.
The argument \em ip_len specifies the length of the IP address. The length is \token{4} bytes
for the IPv4 address and \token{16} bytes for the IPv6 address.
The argument \em port specifies the port of the endpoint node. If the argument \em port is \token{0},
the function returns error, because this port is reserved.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
static const char message[] = { "The quick brown fox jumps over the lazy dog." };
void Echo_Client_Thread (void *arg) {
uint8_t ip[4] = { 192U, 168U, 0U, 100U };
int32_t sock, res;
char dbuf[120];
while (1) {
wifi = &Driver_WiFi0;
sock = wifi->SocketCreate (ARM_SOCKET_AF_INET, ARM_SOCKET_SOCK_STREAM, ARM_SOCKET_IPPROTO_TCP);
res = wifi->SocketConnect (sock, (uint8_t *)ip, sizeof(ip), 7U);
if (res == 0) {
wifi->SocketSend (sock, message, sizeof(message));
res = wifi->SocketRecv (sock, dbuf, sizeof(dbuf));
if (res < 0) {
break; // Error occured
}
if (res > 0) {
if (memcmp (dbuf, message, res) != 0) {
// error handling, message is not the same as sent
}
}
}
wifi->SocketClose (sock);
osDelay (1000U);
}
}
\endcode
*/
int32_t ARM_WIFI_SocketRecv (int32_t socket, void *buf, uint32_t len) {
return 1;
}
/**
\fn int32_t ARM_WIFI_SocketRecv (int32_t socket, void *buf, uint32_t len)
\details
The function \b ARM_WIFI_SocketRecv receives incoming data that has been queued for the socket.
You can use this function with both, the stream and the datagram socket. It reads as much
information as currently available up to the size of the buffer specified.
In blocking mode, which is enabled by default, this function waits for received data. In non
blocking mode, you must call the \b ARM_WIFI_SocketRecv function again if the error code
\c ARM_SOCKET_EAGAIN is returned.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em buf is a pointer to the application data buffer for storing the data to.
If the available data is too large to fit in the supplied application buffer \em buf, excess bytes
are discarded in case of a datagram sockets. For stream sockets, the data is buffered internally
so the application can retrieve all data by multiple calls of \b ARM_WIFI_SocketRecv function.
The argument \em len specifies the size of the application data buffer.
\note
The function can also be used to check if the socket has data available to read by specifying \token{0}
for argument \em len (argument \em buf is ignored).
The function returns \token{0} if data is available or error code otherwise.
In blocking mode, the function waits until data is available, in non blocking mode the function returns instantly.
\b Example:
- see \ref ARM_WIFI_SocketListen
*/
int32_t ARM_WIFI_SocketRecvFrom (int32_t socket, void *buf, uint32_t len, uint8_t *ip, uint32_t *ip_len, uint16_t *port) {
return 1;
}
/**
\fn int32_t ARM_WIFI_SocketRecvFrom (int32_t socket, void *buf, uint32_t len, uint8_t *ip, uint32_t *ip_len, uint16_t *port)
\details
The function \b ARM_WIFI_SocketRecvFrom is used to receive data that has been queued for a socket.
It is normally used to receive messages on datagram sockets, but can also be used to receive a reliable,
ordered stream of data on a connected stream sockets. It reads as much information as currently available
up to the size of the buffer specified.
In blocking mode, which is enabled by default, this function waits for received data. In non
blocking mode, you must call the \b ARM_WIFI_SocketRecv function again if the error code
\c ARM_SOCKET_EAGAIN is returned.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em buf is a pointer to the application data buffer for storing the data to.
If the available data is too large to fit in the supplied application buffer \em buf, excess bytes
are discarded in case of a datagram sockets. For stream sockets, the data is buffered internally
so the application can retrieve all data by multiple calls of \b ARM_WIFI_SocketRecv function.
The argument \em len specifies the size of the application data buffer.
The argument \em ip is a pointer to the buffer that will receive the IP address of the sender.
If the \em ip is \token{NULL}, the IP address is not returned.
The argument \em ip_len is a pointer to the IP address length. It should initially contain the amount of
space pointed to by \em ip. On return it contains the actual length of the address returned in bytes.
The argument \em port is a pointer to the buffer, that will receive the port number of the sender.
If the \em port is \token{NULL}, the port number is not returned.
\note
The function can also be used to check if the socket has data available to read by specifying \token{0}
for argument \em len (arguments \em buf, \em ip, \em ip_len and \em port are ignored).
The function returns \token{0} if data is available or error code otherwise.
In blocking mode, the function waits until data is available, in non blocking mode the function returns instantly.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void Echo_Server_Thread (void *arg) {
uint8_t ip[4];
uint16_t port;
int32_t sock, res;
uint32_t ip_len;
char dbuf[120];
while (1) {
wifi = &Driver_WiFi0;
sock = wifi->SocketCreate (ARM_SOCKET_AF_INET, ARM_SOCKET_SOCK_DGRAM, ARM_SOCKET_IPPROTO_UDP);
ip[0] = 0U; // Unspecified address
ip[1] = 0U;
ip[2] = 0U;
ip[3] = 0U;
port = 7U; // Standard port for Echo service
wifi->SocketBind (sock, (uint8_t *)ip, sizeof(ip), port);
while (1) {
ip_len = sizeof(ip);
res = wifi->SocketRecvFrom (sock, dbuf, sizeof(dbuf), (uint8_t *)ip, &ip_len, &port);
if (res < 0) {
break; // Error occurred
}
if (res > 0) { // Echo the data
wifi->SocketSendTo (sock, dbuf, res, (uint8_t *)ip, ip_len, port);
}
}
wifi->SocketClose (sock);
}
}
\endcode
*/
int32_t ARM_WIFI_SocketSend (int32_t socket, const void *buf, uint32_t len) {
return 1;
}
/**
\fn int32_t ARM_WIFI_SocketSend (int32_t socket, const void *buf, uint32_t len)
\details
The function \b ARM_WIFI_SocketSend is used to send data on an already connected socket. This function is
normally used to send a reliable, ordered stream of data bytes on a stream sockets. It can also be used
to send messages on datagram sockets.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \a buf is a pointer to the application data buffer containing data to transmit. The buffer
data length is not limited in size. If the data length is too large for one packet, the \b ARM_WIFI_SocketSend function
will fragment the data and send it in several successive data packets:
- In blocking mode, which is enabled by default, this function returns after the data has been successfully queued for transmission.
- In non blocking mode, the function returns immediately without blocking the system.
The argument \a len specifies the length of data in bytes.
Return value, when positive, represents the number of bytes sent, which can be less than \a len.
\note
The function can also be used to check if the socket is ready to send data by specifying \token{0}
for argument \em len (argument \em buf is ignored).
The function returns \token{0} if the socket is writable or error code otherwise.
\b Example:
- see \ref ARM_WIFI_SocketListen
*/
int32_t ARM_WIFI_SocketSendTo (int32_t socket, const void *buf, uint32_t len, const uint8_t *ip, uint32_t ip_len, uint16_t port) {
return 1;
}
/**
\fn int32_t ARM_WIFI_SocketSendTo (int32_t socket, const void *buf, uint32_t len, const uint8_t *ip, uint32_t ip_len, uint16_t port)
\details
The function \b ARM_WIFI_SocketSendTo is used to send data. It is normally used to send messages
on a datagram sockets, but can also be used to send data on a connected stream sockets.
If the datagram socket is not yet bound, the system implicitly binds to a random dynamic port.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \a buf is a pointer to the application data buffer containing data to transmit. The buffer
data length is not limited in size. If the data length is too large for one packet, the \b ARM_WIFI_SocketSend function
will fragment the data and send it in several successive data packets:
- In blocking mode, which is enabled by default, this function returns after the data has been successfully queued for transmission.
- In non blocking mode, the function returns immediately without blocking the system.
The argument \a len specifies the length of data in bytes.
The argument \em ip is a pointer to the buffer containing the IP address octets of the endpoint node.
The argument \em ip_len specifies the length of the IP address. The length is \token{4} bytes
for the IPv4 address and \token{16} bytes for the IPv6 address.
The argument \em port specifies the port of the endpoint node. If the argument \em port is \token{0},
the function returns error, because this port is reserved.
For the stream sockets, arguments \em ip, \em ip_len and \em port are ignored.
Return value, when positive, represents the number of bytes sent, which can be less than \a len.
\note
The function can also be used to check if the socket is ready to send data by specifying \token{0}
for argument \em len (arguments \em buf, \em ip, \em ip_len and \em port are ignored).
The function returns \token{0} if the socket is writable or error code otherwise.
\b Example:
- see \ref ARM_WIFI_SocketRecvFrom
*/
int32_t ARM_WIFI_SocketGetSockName (int32_t socket, uint8_t *ip, uint32_t *ip_len, uint16_t *port) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketGetSockName (int32_t socket, uint8_t *ip, uint32_t *ip_len, uint16_t *port)
\details
The function \b ARM_WIFI_SocketGetSockName retrieves the local IP address and port for a socket.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em ip is a pointer to the buffer that will receive the local IP address.
If the \em ip is \token{NULL}, the local IP address is not returned.
The argument \em ip_len is a pointer to the IP address length. It should initially contain the amount of
space pointed to by \em ip. On return it contains the actual length of the address returned in bytes.
The argument \em port is a pointer to the buffer, that will receive the local port number.
If the \em port is \token{NULL}, the local port number is not returned.
\b Example:
\code
static uint8_t local_ip[4]; // Socket address and port
static uint16_t local_port;
static void get_socket_local_info (void) {
uint32_t ip_len;
ip_len = sizeof(local_ip);
wifi->SocketGetSockName (sock, (uint8_t *)local_ip, &ip_len, &local_port);
}
\endcode
*/
int32_t ARM_WIFI_SocketGetPeerName (int32_t socket, uint8_t *ip, uint32_t *ip_len, uint16_t *port) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketGetPeerName (int32_t socket, uint8_t *ip, uint32_t *ip_len, uint16_t *port)
\details
The function \b ARM_WIFI_SocketGetPeerName retrieves the IP address and port of the peer to which
a socket is connected.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em ip is a pointer to the buffer that will receive the IP address of the peer.
If the \em ip is \token{NULL}, the IP address is not returned.
The argument \em ip_len is a pointer to the IP address length. It should initially contain the amount of
space pointed to by \em ip. On return it contains the actual length of the address returned in bytes.
The argument \em port is a pointer to the buffer, that will receive the port number of the peer.
If the \em port is \token{NULL}, the port number is not returned.
\b Example:
\code
static uint8_t peer_ip[4]; // Socket address and port
static uint16_t peer_port;
static void get_socket_peer_info (void) {
uint32_t ip_len;
ip_len = sizeof(peer_ip);
wifi->SocketGetPeerName (sock, (uint8_t *)peer_ip, &ip_len, &peer_port);
}
\endcode
*/
int32_t ARM_WIFI_SocketGetOpt (int32_t socket, int32_t opt_id, void *opt_val, uint32_t *opt_len) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketGetOpt (int32_t socket, int32_t opt_id, void *opt_val, uint32_t *opt_len)
\details
The function \b ARM_WIFI_SocketGetOpt retrieves options for a socket.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em opt_id is the socket option for which the value is to be retrieved. The following
socket options are supported:
Option | Description
:----------------------------|:-------------------------------------------------
\ref ARM_SOCKET_SO_RCVTIMEO | Timeout for receiving in blocking mode
\ref ARM_SOCKET_SO_SNDTIMEO | Timeout for sending in blocking mode
\ref ARM_SOCKET_SO_KEEPALIVE | Keep-alive mode for the stream socket
\ref ARM_SOCKET_SO_TYPE | Type of the socket (stream or datagram)
The argument \em opt_val points to the buffer that will receive the value of the \em opt_id.
The argument \em opt_len contains the length of the buffer at the input and returns the length
of the option information on the output.
\b Example:
\code
uint32_t type;
wifi->SocketGetOpt (sock, ARM_SOCKET_SO_TYPE, &type, sizeof(type));
if (type == ARM_SOCKET_SOCK_STREAM) {
// Stream socket
}
if (type == ARM_SOCKET_SOCK_DGRAM) {
// Datagram socket
}
\endcode
*/
int32_t ARM_WIFI_SocketSetOpt (int32_t socket, int32_t opt_id, const void *opt_val, uint32_t opt_len) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketSetOpt (int32_t socket, int32_t opt_id, const void *opt_val, uint32_t opt_len)
\details
The function \b ARM_WIFI_SocketSetOpt sets options for a socket.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
The argument \em opt_id is the socket option for which the value is to be set. The following
socket options are supported:
Option | Description
:----------------------------|:-------------------------------------------------
\ref ARM_SOCKET_IO_FIONBIO | Non-blocking mode for the socket
\ref ARM_SOCKET_SO_RCVTIMEO | Timeout for receiving in blocking mode
\ref ARM_SOCKET_SO_SNDTIMEO | Timeout for sending in blocking mode
\ref ARM_SOCKET_SO_KEEPALIVE | Keep-alive mode for the stream socket
The argument \em opt_val points to the buffer containing the value of the \em opt_id.
The argument \em opt_len tells the exact length of the option.
\b Example:
\code
uint32_t nonblocking = 0U; // Blocking mode
uint32_t timeout = 10000U; // Timeout 10 seconds
wifi->SocketSetOpt (sock, ARM_SOCKET_IO_FIONBIO, &nonblocking, sizeof(nonblocking));
wifi->SocketSetOpt (sock, ARM_SOCKET_SO_RCVTIMEO, &timeout, sizeof(timeout));
wifi->SocketSetOpt (sock, ARM_SOCKET_SO_SNDTIMEO, &timeout, sizeof(timeout));
\endcode
*/
int32_t ARM_WIFI_SocketClose (int32_t socket) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketClose (int32_t socket)
\details
The function \b ARM_WIFI_SocketClose closes an existing socket and releases the socket descriptor.
Further references to \em socket fail with \c ARM_SOCKET_EINVAL error code.
The argument \em socket specifies a socket identification number returned from a previous call
to \ref ARM_WIFI_SocketCreate.
In blocking mode, which is enabled by default, this function will wait until a socket is closed.
In non blocking mode, you must call the \b ARM_WIFI_SocketClose function again if the error code
\c ARM_SOCKET_EAGAIN is returned.
\b Example:
- see \ref ARM_WIFI_SocketListen
*/
int32_t ARM_WIFI_SocketGetHostByName (const char *name, int32_t af, uint8_t *ip, uint32_t *ip_len) {
return 0;
}
/**
\fn int32_t ARM_WIFI_SocketGetHostByName (const char *name, int32_t af, uint8_t *ip, uint32_t *ip_len)
\details
The function \b ARM_WIFI_SocketGetHostByName retrieves host information corresponding to
a host name from a host database. It does this by sending DNS requests to the DNS server.
The IP address of the DNS server is specified in the network interface configuration or can be
obtained from the DHCP server for the local area network.
The argument \a name is a pointer to the \token{null}-terminated name of the host to resolve.
The argument \em af specifies the address family, that is, which type of IP address you want
to resolve. The following values are supported:
Family | Description
:----------------------------|:-------------------------------------------------
\ref ARM_SOCKET_AF_INET | Resolve the IPv4 address
\ref ARM_SOCKET_AF_INET6 | Resolve the IPv6 address
The argument \em ip is a pointer to the buffer that will receive the resolved IP address of the host.
If the argument \em ip is \token{NULL}, the function returns error.
The argument \em ip_len is a pointer to the IP address length. It should initially contain the amount of
space pointed to by \em ip. On return it contains the actual length of the address returned in bytes.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void ping_arm_com (void) {
uint8_t ip[4];
uint32_t ip_len;
int32_t res;
wifi = &Driver_WiFi0;
ip_len = sizeof(ip);
res = wifi->SocketGetHostByName ("www.arm.com", ARM_SOCKET_AF_INET, (uint8_t *)ip, &ip_len);
if (res == ARM_DRIVER_OK) {
res = wifi->Ping ((uint8_t *)ip, sizeof(ip));
if (res == ARM_DRIVER_OK) {
// "www.arm.com" responded to ping
}
}
else {
// "www.arm.com" not resolved
}
}
\endcode
*/
int32_t ARM_WIFI_Ping (const uint8_t *ip, uint32_t ip_len) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_WIFI_Ping (const uint8_t *ip, uint32_t ip_len)
\details
The function \b ARM_WIFI_Ping checks if the remote host is reachable. It does this by sending
an echo request and waiting for an echo response. The function then returns the result
of the operation. Check the \ref ARM_WIFI_CAPABILITIES of the driver, if this function
is supported in the driver implementation.
The argument \em ip is a pointer to the buffer containing the IP address octets of the host to ping.
The argument \em ip_len specifies the length of the IP address. The length is \token{4} bytes
for the IPv4 address and \token{16} bytes for the IPv6 address.
\note
The host availability check fails, if the remote host does not respond to echo requests,
or intermediate routers do not forward the echo requests or echo responses.
\b Example:
\code
extern ARM_DRIVER_WIFI Driver_WiFi0;
static ARM_DRIVER_WIFI *wifi;
void ping_host (void) {
uint8_t ip[4] = { 192U, 168U, 0U, 100U };
int32_t res;
wifi = &Driver_WiFi0;
res = wifi->Ping ((uint8_t *)ip, sizeof(ip));
if (res == ARM_DRIVER_OK) {
// Host responded
}
}
\endcode
*/
/**
@}
*/
// end group wifi_socket_gr
/**
@}
*/
// End WiFi Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_WiFi.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 15,233 |
```c
#include "Driver_SPI.h"
#include "cmsis_os.h" // ARM::CMSIS:RTOS:Keil RTX
void mySPI_Thread(void const *argument);
osThreadId tid_mySPI_Thread;
/* SPI Driver */
extern ARM_DRIVER_SPI Driver_SPI0;
void mySPI_callback(uint32_t event)
{
switch (event)
{
case ARM_SPI_EVENT_TRANSFER_COMPLETE:
/* Success: Wakeup Thread */
osSignalSet(tid_mySPI_Thread, 0x01);
break;
case ARM_SPI_EVENT_DATA_LOST:
/* Occurs in slave mode when data is requested/sent by master
but send/receive/transfer operation has not been started
and indicates that data is lost. Occurs also in master mode
when driver cannot transfer data fast enough. */
__breakpoint(0); /* Error: Call debugger or replace with custom error handling */
break;
case ARM_SPI_EVENT_MODE_FAULT:
/* Occurs in master mode when Slave Select is deactivated and
indicates Master Mode Fault. */
__breakpoint(0); /* Error: Call debugger or replace with custom error handling */
break;
}
}
/* Test data buffers */
const uint8_t testdata_out[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
uint8_t testdata_in [8];
void mySPI_Thread(void const* arg)
{
ARM_DRIVER_SPI* SPIdrv = &Driver_SPI0;
osEvent evt;
#ifdef DEBUG
ARM_DRIVER_VERSION version;
ARM_SPI_CAPABILITIES drv_capabilities;
version = SPIdrv->GetVersion();
if (version.api < 0x200) /* requires at minimum API version 2.00 or higher */
{ /* error handling */
return;
}
drv_capabilities = SPIdrv->GetCapabilities();
if (drv_capabilities.event_mode_fault == 0)
{ /* error handling */
return;
}
#endif
/* Initialize the SPI driver */
SPIdrv->Initialize(mySPI_callback);
/* Power up the SPI peripheral */
SPIdrv->PowerControl(ARM_POWER_FULL);
/* Configure the SPI to Master, 8-bit mode @10000 kBits/sec */
SPIdrv->Control(ARM_SPI_MODE_MASTER | ARM_SPI_CPOL1_CPHA1 | ARM_SPI_MSB_LSB | ARM_SPI_SS_MASTER_SW | ARM_SPI_DATA_BITS(8), 10000000);
/* SS line = INACTIVE = HIGH */
SPIdrv->Control(ARM_SPI_CONTROL_SS, ARM_SPI_SS_INACTIVE);
/* thread loop */
while (1)
{
/* SS line = ACTIVE = LOW */
SPIdrv->Control(ARM_SPI_CONTROL_SS, ARM_SPI_SS_ACTIVE);
/* Transmit some data */
SPIdrv->Send(testdata_out, sizeof(testdata_out));
/* Wait for completion */
evt = osSignalWait(0x01, 100);
if (evt.status == osEventTimeout) {
__breakpoint(0); /* Timeout error: Call debugger */
}
/* SS line = INACTIVE = HIGH */
SPIdrv->Control(ARM_SPI_CONTROL_SS, ARM_SPI_SS_INACTIVE);
/* SS line = ACTIVE = LOW */
SPIdrv->Control(ARM_SPI_CONTROL_SS, ARM_SPI_SS_ACTIVE);
/* Receive 8 bytes of reply */
SPIdrv->Receive(testdata_in, 8);
evt = osSignalWait(0x01, 100);
if (evt.status == osEventTimeout) {
__breakpoint(0); /* Timeout error: Call debugger */
}
/* SS line = INACTIVE = HIGH */
SPIdrv->Control(ARM_SPI_CONTROL_SS, ARM_SPI_SS_INACTIVE);
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/SPI_Demo.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 825 |
```c
#include "Driver_I2C.h"
#define EEPROM_I2C_ADDR 0x51 /* EEPROM I2C address */
/* I2C driver instance */
extern ARM_DRIVER_I2C Driver_I2C0;
static ARM_DRIVER_I2C *I2Cdrv = &Driver_I2C0;
static volatile uint32_t I2C_Event;
/* I2C Signal Event function callback */
void I2C_SignalEvent (uint32_t event) {
/* Save received events */
I2C_Event |= event;
/* Optionally, user can define specific actions for an event */
if (event & ARM_I2C_EVENT_TRANSFER_INCOMPLETE) {
/* Less data was transferred than requested */
}
if (event & ARM_I2C_EVENT_TRANSFER_DONE) {
/* Transfer or receive is finished */
}
if (event & ARM_I2C_EVENT_ADDRESS_NACK) {
/* Slave address was not acknowledged */
}
if (event & ARM_I2C_EVENT_ARBITRATION_LOST) {
/* Master lost bus arbitration */
}
if (event & ARM_I2C_EVENT_BUS_ERROR) {
/* Invalid start/stop position detected */
}
if (event & ARM_I2C_EVENT_BUS_CLEAR) {
/* Bus clear operation completed */
}
if (event & ARM_I2C_EVENT_GENERAL_CALL) {
/* Slave was addressed with a general call address */
}
if (event & ARM_I2C_EVENT_SLAVE_RECEIVE) {
/* Slave addressed as receiver but SlaveReceive operation is not started */
}
if (event & ARM_I2C_EVENT_SLAVE_TRANSMIT) {
/* Slave addressed as transmitter but SlaveTransmit operation is not started */
}
}
/* Read I2C connected EEPROM (event driven example) */
int32_t EEPROM_Read_Event (uint16_t addr, uint8_t *buf, uint32_t len) {
uint8_t a[2];
a[0] = (uint8_t)(addr >> 8);
a[1] = (uint8_t)(addr & 0xFF);
/* Clear event flags before new transfer */
I2C_Event = 0U;
I2Cdrv->MasterTransmit (EEPROM_I2C_ADDR, a, 2, true);
/* Wait until transfer completed */
while ((I2C_Event & ARM_I2C_EVENT_TRANSFER_DONE) == 0U);
/* Check if all data transferred */
if ((I2C_Event & ARM_I2C_EVENT_TRANSFER_INCOMPLETE) != 0U) return -1;
/* Clear event flags before new transfer */
I2C_Event = 0U;
I2Cdrv->MasterReceive (EEPROM_I2C_ADDR, buf, len, false);
/* Wait until transfer completed */
while ((I2C_Event & ARM_I2C_EVENT_TRANSFER_DONE) == 0U);
/* Check if all data transferred */
if ((I2C_Event & ARM_I2C_EVENT_TRANSFER_INCOMPLETE) != 0U) return -1;
return 0;
}
/* Read I2C connected EEPROM (pooling example) */
int32_t EEPROM_Read_Pool (uint16_t addr, uint8_t *buf, uint32_t len) {
uint8_t a[2];
a[0] = (uint8_t)(addr >> 8);
a[1] = (uint8_t)(addr & 0xFF);
I2Cdrv->MasterTransmit (EEPROM_I2C_ADDR, a, 2, true);
/* Wait until transfer completed */
while (I2Cdrv->GetStatus().busy);
/* Check if all data transferred */
if (I2Cdrv->GetDataCount () != len) return -1;
I2Cdrv->MasterReceive (EEPROM_I2C_ADDR, buf, len, false);
/* Wait until transfer completed */
while (I2Cdrv->GetStatus().busy);
/* Check if all data transferred */
if (I2Cdrv->GetDataCount () != len) return -1;
return 0;
}
/* Initialize I2C connected EEPROM */
int32_t EEPROM_Initialize (bool pooling) {
int32_t status;
uint8_t val;
if (pooling == true) {
I2Cdrv->Initialize (NULL);
} else {
I2Cdrv->Initialize (I2C_SignalEvent);
}
I2Cdrv->PowerControl (ARM_POWER_FULL);
I2Cdrv->Control (ARM_I2C_BUS_SPEED, ARM_I2C_BUS_SPEED_FAST);
I2Cdrv->Control (ARM_I2C_BUS_CLEAR, 0);
/* Check if EEPROM can be accessed */
if (pooling == true) {
status = EEPROM_Read_Pool (0x00, &val, 1);
} else {
status = EEPROM_Read_Event (0x00, &val, 1);
}
return (status);
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/I2C_Demo.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,107 |
```c
/**
\defgroup usbh_interface_gr USB Host Interface
\ingroup usb_interface_gr
\brief Driver API for USB Host Peripheral (%Driver_USBH.h)
*/
/**
\defgroup usbh_host_gr USB Host
\ingroup usbh_interface_gr
\brief Driver API for USB Host
@{
*/
/**
\struct ARM_DRIVER_USBH
\details
The functions of the USB Host driver are accessed by function pointers. Refer to \ref DriverFunctions for
overview information.
Each instance of an USBH provides such an access struct. The instance is indicated by
a postfix in the symbol name of the access struct, for example:
- \b Driver_USBH0 is the name of the access struct of the first instance (no. 0).
- \b Driver_USBH1 is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_USBH<i>n</i></b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
\note The struct must remain unchanged.
*****************************************************************************************************************/
/**
\struct ARM_USBH_CAPABILITIES
\details
A USB Host driver can be implemented with different capabilities.
The data fields of this structure encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_USBH_GetCapabilities
\note The struct must remain unchanged.
*****************************************************************************************************************/
/**
\struct ARM_USBH_PORT_STATE
\details
This structure stores information about the state of the USB Host Port. The data fields encode whether a device
is connected to the port, if port overcurrent is detected, and the port speed.
<b>Returned by:</b>
- \ref ARM_USBH_PortGetState
*****************************************************************************************************************/
/**
\typedef uint32_t ARM_USBH_PIPE_HANDLE
\details
Each pipe is identified through a unique number, which is created by the function \ref ARM_USBH_PipeCreate.
<b>Parameter for:</b>
- \ref ARM_USBH_PipeModify,
\ref ARM_USBH_PipeDelete,
\ref ARM_USBH_PipeReset,
\ref ARM_USBH_PipeTransfer,
\ref ARM_USBH_PipeTransferGetResult,
\ref ARM_USBH_PipeTransferAbort,
\ref ARM_USBH_SignalPipeEvent
<b>Retruned by:</b>
- \ref ARM_USBH_PipeCreate
*****************************************************************************************************************/
/**
\typedef ARM_USBH_SignalPortEvent_t
\details
Provides the typedef for the callback function \ref ARM_USBH_SignalPortEvent.
<b>Parameter for:</b>
- \ref ARM_USBH_Initialize
*******************************************************************************************************************/
/**
\typedef ARM_USBH_SignalPipeEvent_t
\details
Provides the typedef for the callback function \ref ARM_USBH_SignalPipeEvent.
<b>Parameter for:</b>
- \ref ARM_USBH_Initialize
*******************************************************************************************************************/
/**
\defgroup USBH_port_events USBH Port Events
\ingroup usbh_host_gr
\brief The USB Host driver generates Port call back events that are notified via the function \ref ARM_USBH_SignalPortEvent.
\details
This section provides the event values for the \ref ARM_USBH_SignalPortEvent callback function.
The following call back notification events are generated:
@{
\def ARM_USBH_EVENT_CONNECT
\def ARM_USBH_EVENT_DISCONNECT
\def ARM_USBH_EVENT_OVERCURRENT
\def ARM_USBH_EVENT_RESET
\def ARM_USBH_EVENT_SUSPEND
\def ARM_USBH_EVENT_RESUME
\def ARM_USBH_EVENT_REMOTE_WAKEUP
@}
*/
/**
\defgroup USBH_pipe_events USBH Pipe Events
\ingroup usbh_host_gr
\brief The USB Host driver generates Pipe call back events that are notified via the function \ref ARM_USBH_SignalPipeEvent.
\details
This section provides the event values for the \ref ARM_USBH_SignalPipeEvent callback function.
The following call back notification events are generated:
@{
\def ARM_USBH_EVENT_TRANSFER_COMPLETE
\def ARM_USBH_EVENT_HANDSHAKE_NAK
\def ARM_USBH_EVENT_HANDSHAKE_NYET
\def ARM_USBH_EVENT_HANDSHAKE_MDATA
\def ARM_USBH_EVENT_HANDSHAKE_STALL
\def ARM_USBH_EVENT_HANDSHAKE_ERR
\def ARM_USBH_EVENT_BUS_ERROR
@}
*/
/**
\defgroup USBH_packets USBH Packet Information
\ingroup usbh_host_gr
\brief Specify USB packet information used by the function \ref ARM_USBH_PipeTransfer
\details
This section provides the packet information values (parameter \em packet) for the \ref ARM_USBH_PipeTransfer function.
The following values are defined:
@{
\def ARM_USBH_PACKET_SETUP
Generate SETUP transaction.
\def ARM_USBH_PACKET_OUT
Generate OUT transaction.
\def ARM_USBH_PACKET_IN
Generate IN transaction.
\def ARM_USBH_PACKET_PING
Generate PING transaction (no data packet).
\def ARM_USBH_PACKET_DATA0
Force DATA0 PID (Packet Identifier) for the initial data packet. When not specified than the driver provides the initial value according to the current state.
\def ARM_USBH_PACKET_DATA1
Force DATA1 PID (Packet Identifier) for the initial data packet. When not specified than the driver provides the initial value according to the current state.
\def ARM_USBH_PACKET_SSPLIT
Used when driver does not support automatic handling of SPLIT packets and indicates Start-Split packet.
For isochronous OUT it indicates that the High-speed data is in the middle of the Full-speed data payload.
\def ARM_USBH_PACKET_SSPLIT_S
Used when driver does not support automatic handling of SPLIT packets and indicates Start-Split packet.
Valid only for isochronous OUT and indicates that the High-speed data is the start of the Full-speed data payload.
\def ARM_USBH_PACKET_SSPLIT_E
Used when driver does not support automatic handling of SPLIT packets and indicates Start-Split packet.
Valid only for isochronous OUT and indicates that the High-speed data is the end of the Full-speed data payload.
\def ARM_USBH_PACKET_SSPLIT_S_E
Used when driver does not support automatic handling of SPLIT packets and indicates Start-Split packet.
Valid only for isochronous OUT and indicates that the High-speed data is all of the Full-speed data payload.
\def ARM_USBH_PACKET_CSPLIT
Used when driver does not support automatic handling of SPLIT packets and indicates Complete-Split packet.
\def ARM_USBH_PACKET_PRE
Generate PRE (Preamble) for low-speed devices within a full/low-speed signaling environment.
@}
*/
//
// Functions
//
ARM_DRIVER_VERSION ARM_USBH_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_USBH_GetVersion (void)
\details
The function \b ARM_USBH_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_USBH Driver_USBH0;
ARM_DRIVER_USBH *drv_info;
void setup_usbh (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_USBH0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*****************************************************************************************************************/
ARM_USBH_CAPABILITIES ARM_USBH_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_USBH_CAPABILITIES ARM_USBH_GetCapabilities (void)
\details
The function \b ARM_USBH_GetCapabilities returns information about capabilities in this driver implementation.
The data fields of the structure \ref ARM_USBH_CAPABILITIES encode various capabilities, for example
available HUB ports or if the hardware can generate signal events using the \ref ARM_USBH_SignalPortEvent
callback function.
Example:
\code
extern ARM_DRIVER_USBH Driver_USBH0;
ARM_DRIVER_USBH *drv_info;
void read_capabilities (void) {
ARM_USBH_CAPABILITIES drv_capabilities;
drv_info = &Driver_USBH0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*****************************************************************************************************************/
int32_t ARM_USBH_Initialize (ARM_USBH_SignalPortEvent_t cb_port_event,
ARM_USBH_SignalPipeEvent_t cb_pipe_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_Initialize (ARM_USBH_SignalPortEvent_t cb_port_event, ARM_USBH_SignalPipeEvent_t cb_pipe_event)
\details
The function \b ARM_USBH_Initialize initializes the USB Host interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes the resources needed for the USBH interface.
- Registers the \ref ARM_USBH_SignalPortEvent callback function.
- Registers the \ref ARM_USBH_SignalPipeEvent callback function.
The parameter \em cb_port_event is a pointer to the \ref ARM_USBH_SignalPortEvent callback function; use a NULL pointer
when no port callback signals are required.
The parameter \em cb_pipe_event is a pointer to the \ref ARM_USBH_SignalPipeEvent callback function.
\b Example:
- see \ref usbh_interface_gr - Driver Functions
*****************************************************************************************************************/
int32_t ARM_USBH_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_Uninitialize (void)
\details
The function \b ARM_USBH_Uninitialize de-initializes the resources of USB Host interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*****************************************************************************************************************/
int32_t ARM_USBH_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_USBH_PowerControl operates the power modes of the USB Host interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*****************************************************************************************************************/
int32_t ARM_USBH_PortVbusOnOff (uint8_t port, bool vbus) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PortVbusOnOff (uint8_t port, bool vbus)
\details
The function \b ARM_USBH_PortVbusOnOff controls the VBUS signal of the specified port.
*****************************************************************************************************************/
int32_t ARM_USBH_PortReset (uint8_t port) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PortReset (uint8_t port)
\details
Executes reset signalling on the specified port.
*****************************************************************************************************************/
int32_t ARM_USBH_PortSuspend (uint8_t port) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PortSuspend (uint8_t port)
\details
The function \b ARM_USBH_PortSuspend auspends USB signaling on the specified port.
*****************************************************************************************************************/
int32_t ARM_USBH_PortResume (uint8_t port) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PortResume (uint8_t port)
\details
The function \b ARM_USBH_PortResume resumes USB signaling on the specified port.
*****************************************************************************************************************/
ARM_USBH_PORT_STATE ARM_USBH_PortGetState (uint8_t port) {
return 0;
}
/**
\fn ARM_USBH_PORT_STATE ARM_USBH_PortGetState (uint8_t port)
\details
The function \b ARM_USBH_PortGetState returns the current state of the specified port.
*****************************************************************************************************************/
ARM_USBH_PIPE_HANDLE ARM_USBH_PipeCreate (uint8_t dev_addr,
uint8_t dev_speed,
uint8_t hub_addr,
uint8_t hub_port,
uint8_t ep_addr,
uint8_t ep_type,
uint16_t ep_max_packet_size,
uint8_t ep_interval) {
return 0;
}
/**
\fn ARM_USBH_PIPE_HANDLE ARM_USBH_PipeCreate (uint8_t dev_addr, uint8_t dev_speed, uint8_t hub_addr, uint8_t hub_port, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_max_packet_size, uint8_t ep_interval)
\details
The function \b ARM_USBH_PipeCreate creates a pipe for transfers (allocates required resources and configures the pipe).
The parameters specify pipe information (connection between host and device endpoint):
- device: address and speed
- hub (optional): hub address and number of the hub port to which the device is connected
- endpoint: address, type, maximum packet size and polling interval
The function returns an pipe handle that is used for all subsequent operations on that pipe.
In case of errors an invalid handle (\em NULL) is returned.
*****************************************************************************************************************/
int32_t ARM_USBH_PipeModify (ARM_USBH_PIPE_HANDLE pipe_hndl,
uint8_t dev_addr,
uint8_t dev_speed,
uint8_t hub_addr,
uint8_t hub_port,
uint16_t ep_max_packet_size) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PipeModify (ARM_USBH_PIPE_HANDLE pipe_hndl, uint8_t dev_addr, uint8_t dev_speed, uint8_t hub_addr, uint8_t hub_port, uint16_t ep_max_packet_size)
\details
The function \b ARM_USBH_PipeModify modifies a pipe configuration that was created with \ref ARM_USBH_PipeCreate.
*****************************************************************************************************************/
int32_t ARM_USBH_PipeDelete (ARM_USBH_PIPE_HANDLE pipe_hndl) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PipeDelete (ARM_USBH_PIPE_HANDLE pipe_hndl)
\details
The function \b ARM_USBH_PipeDelete deletes a pipe that was created with \ref ARM_USBH_PipeCreate (deactivates the pipe and releases used resources).
*****************************************************************************************************************/
int32_t ARM_USBH_PipeReset (ARM_USBH_PIPE_HANDLE pipe_hndl) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PipeReset (ARM_USBH_PIPE_HANDLE pipe_hndl)
\details
The function \b ARM_USBH_PipeReset clears Halt condition and resets data toggle on the specified pipe.
*****************************************************************************************************************/
int32_t ARM_USBH_PipeTransfer (ARM_USBH_PIPE_HANDLE pipe_hndl,
uint32_t packet,
uint8_t *data,
uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PipeTransfer (ARM_USBH_PIPE_HANDLE pipe_hndl, uint32_t packet, uint8_t *data, uint32_t num)
\details
The function \b ARM_USBH_PipeTransfer generates packets for sending or receiving data from an USB Endpoint.
The function specifies the buffer with data to send or for data to receive and the number of bytes to transfer (must be multiple of device endpoint maximum packet size for receive).
It also specifies \ref USBH_packets with parameter \em packet.
The function is non-blocking and returns as soon as the driver starts the operation on the specified pipe. During the operation it is not allowed to call this function again on the same pipe. Also the data buffer must stay allocated and the contents of data must not be modified.
Operation is completed when the the requested number of data bytes have been transferred and is indicated with \ref ARM_USBH_EVENT_TRANSFER_COMPLETE event.
It can also finish earlier on reception of different handshake tokens which are also indicated through \ref USBH_pipe_events.
Transfer operation can be aborted by calling \ref ARM_USBH_PipeTransferAbort.
*****************************************************************************************************************/
uint32_t ARM_USBH_PipeTransferGetResult (ARM_USBH_PIPE_HANDLE pipe_hndl) {
return 0;
}
/**
\fn uint32_t ARM_USBH_PipeTransferGetResult (ARM_USBH_PIPE_HANDLE pipe_hndl)
\details
The function \b ARM_USBH_PipeTransferGetResult returns the number of successfully transferred data bytes started by \ref ARM_USBH_PipeTransfer operation.
*****************************************************************************************************************/
int32_t ARM_USBH_PipeTransferAbort (ARM_USBH_PIPE_HANDLE pipe_hndl) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_PipeTransferAbort (ARM_USBH_PIPE_HANDLE pipe_hndl)
\details
The function \b ARM_USBH_PipeTransferAbort aborts an active pipe transfer started by \ref ARM_USBH_PipeTransfer.
*****************************************************************************************************************/
uint16_t ARM_USBH_GetFrameNumber (void) {
return 0;
}
/**
\fn uint16_t ARM_USBH_GetFrameNumber (void)
\details
The function \b ARM_USBH_GetFrameNumber returns the sequential 11-bit frame number of the last Start of Frame (SOF) packet.
*****************************************************************************************************************/
void ARM_USBH_SignalPortEvent (uint8_t port, uint32_t event) {
// function body
}
/**
\fn void ARM_USBH_SignalPortEvent (uint8_t port, uint32_t event)
\details
The function \b ARM_USBH_SignalPortEvent is a callback function registered by the function \ref ARM_USBH_Initialize.
The parameter \em port specifies the root hub port number. \n
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_USBH_CAPABILITIES, which can be retrieved with the function \ref ARM_USBH_GetCapabilities.
The following events can be generated:
Parameter \em event | Bit | Description | supported when ARM_USBH_CAPABILITIES
:---------------------------------|:---:|:your_sha256_hash-----------|---------------------------------------
\ref ARM_USBH_EVENT_CONNECT | 0 | Occurs when USB Device connects to the Host. | data field \em event_connect=\token{1}
\ref ARM_USBH_EVENT_DISCONNECT | 1 | Occurs when USB Device disconnects from the Host. | data field \em event_disconnect=\token{1}
\ref ARM_USBH_EVENT_OVERCURRENT | 2 | Occurs when USB Overcurrent it detected. | data field \em event_overcurrent=\token{1}
\ref ARM_USBH_EVENT_RESET | 3 | Occurs when USB Reset is completed after calling \ref ARM_USBH_PortReset. | <i>always supported</i>
\ref ARM_USBH_EVENT_SUSPEND | 4 | Occurs when USB Suspend is detected. | <i>always supported</i>
\ref ARM_USBH_EVENT_RESUME | 5 | Occurs when USB Resume is detected. | <i>always supported</i>
\ref ARM_USBH_EVENT_REMOTE_WAKEUP | 6 | Occurs when USB Remote wakeup is detected. | <i>always supported</i>
*****************************************************************************************************************/
void ARM_USBH_SignalPipeEvent (ARM_USBH_PIPE_HANDLE pipe_hndl, uint32_t event) {
// function body
}
/**
\fn void ARM_USBH_SignalPipeEvent (ARM_USBH_PIPE_HANDLE pipe_hndl, uint32_t event)
\details
The function \b ARM_USBH_SignalPipeEvent is a callback function registered by the function \ref ARM_USBH_Initialize.
The parameter \em pipe_hndl specifies the pipe handle. \n
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
The following events can be generated:
Parameter \em event | Bit| Description
:-----------------------------------------|---:|:-----------
\ref ARM_USBH_EVENT_TRANSFER_COMPLETE | 0 | Occurs after all the data has been transferred without errors.
\ref ARM_USBH_EVENT_HANDSHAKE_NAK | 1 | Occurs when NAK Handshake is received before all the data is transferred.
\ref ARM_USBH_EVENT_HANDSHAKE_NYET | 2 | Occurs when NYET Handshake is received before all the data is transferred.
\ref ARM_USBH_EVENT_HANDSHAKE_MDATA | 3 | Occurs when MDATA Handshake is received before all the data is transferred.
\ref ARM_USBH_EVENT_HANDSHAKE_STALL | 4 | Occurs when STALL Handshake is received before all the data is transferred.
\ref ARM_USBH_EVENT_HANDSHAKE_ERR | 5 | Occurs when ERR Handshake is received before all the data is transferred.
\ref ARM_USBH_EVENT_BUS_ERROR | 6 | Occurs when bus error is detected before all the data is transferred.
<b>See also:</b>
- ARM_USBH_PipeCreate
*****************************************************************************************************************/
/**
@}
*/
/**
\defgroup usbh_hci_gr USB OHCI/EHCI
\ingroup usbh_interface_gr
\brief Driver API for USB OHCI/EHCI
\details
OHCI and EHCI compliant interfaces have memory mapped registers that are used to control the USB host.
Only certain functionalities (interrupts, VBUS control, power control) require device specific interface which is provided through functions
of the struct \ref ARM_DRIVER_USBH_HCI (functionality accessed with the struct \ref ARM_DRIVER_USBH is not needed).
@{
*/
/**
\struct ARM_DRIVER_USBH_HCI
\details
The functions of the USB Host HCI (OHCI/EHCI) driver are accessed by function pointers. Refer to \ref DriverFunctions for
overview information.
Each instance of an USBH provides such an access struct. The instance is indicated by
a postfix in the symbol name of the access struct, for example:
- \b Driver_USBH0_HCI is the name of the access struct of the first instance (no. 0).
- \b Driver_USBH1_HCI is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_USBH<i>n</i>_HCI</b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
\note The struct must remain unchanged.
*/
/**
\struct ARM_USBH_HCI_CAPABILITIES
\details
A USB Host HCI (OHCI/EHCI) driver can be implemented with different capabilities.
The data fields of this structure encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_USBH_HCI_GetCapabilities
\note The struct must remain unchanged.
*****************************************************************************************************************/
/**
\typedef ARM_USBH_HCI_Interrupt_t
\details
Provides the typedef for the interrupt handler \ref ARM_USBH_HCI_Interrupt.
<b>Parameter for:</b>
- \ref ARM_USBH_HCI_Initialize
*******************************************************************************************************************/
//
// Functions
//
ARM_DRIVER_VERSION ARM_USBH_HCI_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_USBH_HCI_GetVersion (void)
\details
The function \b ARM_USBH_HCI_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_USBH Driver_USBH0_HCI;
ARM_DRIVER_USBH *drv_info;
void setup_usbh (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_USBH0_HCI;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*****************************************************************************************************************/
ARM_USBH_HCI_CAPABILITIES ARM_USBH_HCI_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_USBH_HCI_CAPABILITIES ARM_USBH_HCI_GetCapabilities (void)
\details
The function \b ARM_USBH_HCI_GetCapabilities returns information about capabilities in this driver implementation.
The data fields of the structure \ref ARM_USBH_HCI_CAPABILITIES encode various capabilities, for example
available HUB ports.
Example:
\code
extern ARM_DRIVER_USBH_HCI Driver_USBH0_HCI;
ARM_DRIVER_USBH_HCI *drv_info;
void read_capabilities (void) {
ARM_USBH_HCI_CAPABILITIES drv_capabilities;
drv_info = &Driver_USBH0_HCI;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*****************************************************************************************************************/
int32_t ARM_USBH_HCI_Initialize (ARM_USBH_HCI_Interrupt_t *cb_interrupt) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_HCI_Initialize (ARM_USBH_HCI_Interrupt_t *cb_interrupt)
\details
The function \b ARM_USBH_HCI_Initialize initializes the USB Host HCI (OHCI/EHCI) interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes the resources needed for the USBH interface.
- Registers the \ref ARM_USBH_HCI_Interrupt interrupt handler.
The parameter \em cb_interrupt is a pointer to the interrupt routine of the OHCI/EHCI peripheral
that needs to be registered. This function is called as ECHI Interrupt Service Handler.
\b Example:
- see \ref usbh_interface_gr - Driver Functions
*****************************************************************************************************************/
int32_t ARM_USBH_HCI_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_HCI_Uninitialize (void)
\details
The function \ref ARM_USBH_HCI_Uninitialize de-initializes the resources of USB Host HCI (OHCI/EHCI) interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*****************************************************************************************************************/
int32_t ARM_USBH_HCI_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_HCI_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_USBH_HCI_PowerControl operates the power modes of the USB Host HCI (OHCI/EHCI) interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*****************************************************************************************************************/
int32_t ARM_USBH_HCI_PortVbusOnOff (uint8_t port, bool vbus) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USBH_HCI_PortVbusOnOff (uint8_t port, bool vbus)
\details
The function \b ARM_USBH_HCI_PortVbusOnOff controls the VBUS signal of the specified port.
Most HCI complained USB Host controllers do not require this optional function.
It is only required when a external VBUS interface (for example via I/O pin) is required.
*****************************************************************************************************************/
void ARM_USBH_HCI_Interrupt (void) {
// function body
}
/**
\fn void ARM_USBH_HCI_Interrupt (void)
\details
The function \b ARM_USBH_HCI_Interrupt is called from the USBH HCI Interrupt Handler.
*****************************************************************************************************************/
/**
@}
*/
// End USBH Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_USBH.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 6,225 |
```c
/**
\defgroup nand_interface_gr NAND Interface
\brief Driver API for NAND Flash Device Interface (%Driver_NAND.h).
\details
<b>NAND</b> devices are a type of non-volatile storage and do not require power to hold data.
Wikipedia offers more information about
the <a href="path_to_url#ARM_NAND_memories" target="_blank"><b>Flash Memories</b></a>, including NAND.
<b>Block Diagram</b>
<p> </p>
\image html NAND_Schematics.png "Simplified NAND Flash Schematic"
<p> </p>
<b>NAND API</b>
The following header files define the Application Programming Interface (API) for the NAND interface:
- \b %Driver_NAND.h : Driver API for NAND Flash Device Interface
The driver implementation is a typical part of the Device Family Pack (DFP) that supports the
peripherals of the microcontroller family.
NAND Flash is organized in pages, grouped into blocks as the smallest erasable unit. The addressing
of data is achieved by `byte_address = block * block_size + page_in_block * page_size + offset_in_page`.
In terms of this NAND API blocks and pages are referred to as `row` and the byte offset within the page as `col`.
Thus one can calculate the `byte_address = row * page_size + col`. The parameters `page_size` and `block_size`
are device specific and must be handled by the driver user appropriately.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_NAND : access struct for NAND driver functions
@{
\anchor example <b>Example Code:</b>
\include NAND_Demo.c
*/
/*******************************************************************************************************************/
/**
\defgroup nand_execution_status Status Error Codes
\ingroup common_drv_gr
\brief Negative values indicate errors (NAND has specific codes in addition to common \ref execution_status).
\details
The NAND driver has additional status error codes that are listed below.
Note that the NAND driver also returns the common \ref execution_status.
@{
\def ARM_NAND_ERROR_ECC
ECC generation or correction failed during \ref ARM_NAND_ReadData, \ref ARM_NAND_WriteData or \ref ARM_NAND_ExecuteSequence.
@}
*/
/**
\defgroup NAND_events NAND Events
\ingroup nand_interface_gr
\brief The NAND driver generates call back events that are notified via the function \ref ARM_NAND_SignalEvent.
\details
This section provides the event values for the \ref ARM_NAND_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_NAND_EVENT_DEVICE_READY
\def ARM_NAND_EVENT_DRIVER_READY
\def ARM_NAND_EVENT_DRIVER_DONE
\def ARM_NAND_EVENT_ECC_ERROR
@}
*/
/**
\defgroup nand_driver_flag_codes NAND Flags
\ingroup nand_interface_gr
\brief Specify Flag codes.
\details
The defines can be used in the function \ref ARM_NAND_ReadData and \ref ARM_NAND_WriteData for the parameter \em mode
and in the function \ref ARM_NAND_ExecuteSequence for the parameter \em code.
@{
\def ARM_NAND_DRIVER_DONE_EVENT
@}
*/
/**
\defgroup nand_control_gr NAND Control Codes
\ingroup nand_interface_gr
\brief Many parameters of the NAND driver are configured using the \ref ARM_NAND_Control function.
@{
\details
Refer to the function \ref ARM_NAND_Control for further details.
*/
/**
\defgroup nand_control_codes NAND Mode Controls
\ingroup nand_control_gr
\brief Specify operation modes of the NAND interface.
\details
These controls can be used in the function \ref ARM_NAND_Control for the parameter \em control.
@{
\def ARM_NAND_BUS_MODE
\def ARM_NAND_BUS_DATA_WIDTH
\def ARM_NAND_DRIVER_STRENGTH
\def ARM_NAND_DEVICE_READY_EVENT
\def ARM_NAND_DRIVER_READY_EVENT
@}
*/
/**
\defgroup nand_bus_mode_codes NAND Bus Modes
\ingroup nand_control_gr
\brief Specify bus mode of the NAND interface.
\details
The defines can be used in the function \ref ARM_NAND_Control for the parameter \em arg and with the \ref ARM_NAND_BUS_MODE as the \em control code.
@{
\def ARM_NAND_BUS_SDR
\def ARM_NAND_BUS_DDR
\def ARM_NAND_BUS_DDR2
\def ARM_NAND_BUS_TIMING_MODE_0
\def ARM_NAND_BUS_TIMING_MODE_1
\def ARM_NAND_BUS_TIMING_MODE_2
\def ARM_NAND_BUS_TIMING_MODE_3
\def ARM_NAND_BUS_TIMING_MODE_4
\def ARM_NAND_BUS_TIMING_MODE_5
\def ARM_NAND_BUS_TIMING_MODE_6
\def ARM_NAND_BUS_TIMING_MODE_7
\def ARM_NAND_BUS_DDR2_DO_WCYC_0
\def ARM_NAND_BUS_DDR2_DO_WCYC_1
\def ARM_NAND_BUS_DDR2_DO_WCYC_2
\def ARM_NAND_BUS_DDR2_DO_WCYC_4
\def ARM_NAND_BUS_DDR2_DI_WCYC_0
\def ARM_NAND_BUS_DDR2_DI_WCYC_1
\def ARM_NAND_BUS_DDR2_DI_WCYC_2
\def ARM_NAND_BUS_DDR2_DI_WCYC_4
\def ARM_NAND_BUS_DDR2_VEN
\def ARM_NAND_BUS_DDR2_CMPD
\def ARM_NAND_BUS_DDR2_CMPR
@}
*/
/**
\defgroup nand_data_bus_width_codes NAND Data Bus Width
\ingroup nand_control_gr
\brief Specify data bus width of the NAND interface.
\details
The defines can be used in the function \ref ARM_NAND_Control for the parameter \em arg and with the \ref ARM_NAND_BUS_DATA_WIDTH as the \em control code.
@{
\def ARM_NAND_BUS_DATA_WIDTH_8
\def ARM_NAND_BUS_DATA_WIDTH_16
@}
*/
/**
\defgroup nand_driver_strength_codes NAND Driver Strength
\ingroup nand_control_gr
\brief Specify driver strength of the NAND interface.
\details
The defines can be used in the function \ref ARM_NAND_Control for the parameter \em arg and with the \ref ARM_NAND_DRIVER_STRENGTH as the \em control code.
@{
\def ARM_NAND_DRIVER_STRENGTH_18
\def ARM_NAND_DRIVER_STRENGTH_25
\def ARM_NAND_DRIVER_STRENGTH_35
\def ARM_NAND_DRIVER_STRENGTH_50
@}
*/
/**
@}
*/
/**
\defgroup nand_driver_ecc_codes NAND ECC Codes
\ingroup nand_interface_gr
\brief Specify ECC codes.
\details
The defines can be used in the function \ref ARM_NAND_ReadData and \ref ARM_NAND_WriteData for the parameter \em mode
and in the function \ref ARM_NAND_ExecuteSequence for the parameter \em code.
@{
\def ARM_NAND_ECC(n)
\def ARM_NAND_ECC0
\def ARM_NAND_ECC1
@}
*/
/**
\defgroup nand_driver_seq_exec_codes NAND Sequence Execution Codes
\ingroup nand_interface_gr
\brief Specify execution codes
\details
The defines can be used in the function \ref ARM_NAND_ExecuteSequence for the parameter \em code.
@{
\def ARM_NAND_CODE_SEND_CMD1
\def ARM_NAND_CODE_SEND_ADDR_COL1
\def ARM_NAND_CODE_SEND_ADDR_COL2
\def ARM_NAND_CODE_SEND_ADDR_ROW1
\def ARM_NAND_CODE_SEND_ADDR_ROW2
\def ARM_NAND_CODE_SEND_ADDR_ROW3
\def ARM_NAND_CODE_INC_ADDR_ROW
\def ARM_NAND_CODE_WRITE_DATA
\def ARM_NAND_CODE_SEND_CMD2
\def ARM_NAND_CODE_WAIT_BUSY
\def ARM_NAND_CODE_READ_DATA
\def ARM_NAND_CODE_SEND_CMD3
\def ARM_NAND_CODE_READ_STATUS
@}
*/
/*------------ Structures your_sha256_hash----------------------*/
/**
\struct ARM_NAND_STATUS
\details
Structure with information about the status of a NAND. The data fields encode flags for the driver.
<b>Returned by:</b>
- \ref ARM_NAND_GetStatus
*****************************************************************************************************************/
/**
\struct ARM_DRIVER_NAND
\details
The functions of the NAND driver are accessed by function pointers exposed by this structure. Refer to \ref DriverFunctions for overview information.
Each instance of a NAND interface provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_NAND0 is the name of the access struct of the first instance (no. 0).
- \b Driver_NAND1 is the name of the access struct of the second instance (no. 1).
A middleware configuration setting allows connecting the middleware to a specific driver instance <b>Driver_NAND<i>n</i></b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*******************************************************************************************************************/
/**
\struct ARM_NAND_CAPABILITIES
\details
A NAND driver can be implemented with different capabilities. The data fields of this struct encode
the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_NAND_GetCapabilities
*******************************************************************************************************************/
/**
\typedef ARM_NAND_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_NAND_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_NAND_Initialize
*******************************************************************************************************************/
/**
\struct ARM_NAND_ECC_INFO
\details
Stores the characteristics of a ECC (Error Correction Code) algorithm and provides the information about necessary
application data handling in order to protect stored data from NAND bit errors.
ECC algorithms applied on NAND memory typically operate on NAND device page level which is virtually divided to multiple
main and spare areas. Data from main and spare area is taken into account when generating ECC data which is also stored
into spare area. ECC codeword defines how much data will be protected and how much ECC data will be generated.
To describe how application data must be organized, ECC information structure specifies protection \em type which
defines the protected part of data. As main and spare are of different size, two different algorithms could be
provided, we can describe them as ECC0 and ECC1. Type can then have the following values:
Type| Description
:---|:-----------
0 | ECC algorithm not used
1 | ECC0 algorithm protects main data
2 | ECC0 algorithm protects main and spare data
3 | ECC0 algorithm protects main and ECC1 algorithm protects spare data
Virtual page division is described with page layout (\em page_layout), number of pages (\em page_count) and
virtual page size (\em page_size or \em virtual_page_size). Virtual page size used by ECC algorithm can be defined
by either \em page_size or \em virtual_page_size, depending on the \em page_size values:
Value| Main + Spare size
:----|:-----------
0 | 512 + 16
1 | 1024 + 32
2 | 2048 + 64
3 | 4096 + 128
4 | 8192 + 256
8 | 512 + 28
9 | 1024 + 56
10 | 2048 + 112
11 | 4096 + 224
12 | 8192 + 448
15 | Not used, use virtual_page_size
Structure member \em virtual_page_size is an array of two 16-bit values. First field of array (i.e. \em virtual_page_size[0])
contains main area size while second (i.e. \em virtual_page_size[1]) contains spare area size. Number of virtual pages N
is defined with \em page_count and must be calculated as N = 2 ^ page_count.
Page layout defines main and spare ordering and two different page layouts are possible. First ordering assumes that
spare area follows after every main area, while in second case all main areas build one contiguous region followed by
contiguous region of spare areas. This is defined by member \em page_layout:
Layout| Description
:-----|:-----------
0 | Single spare follows after single main: Main0,Spare0 ... MainN-1,SpareN-1
1 | Contiguous spare follows after contiguous main: Main0 ... MainN-1,Spare0 ... SpareN-1
ECC codeword size defines the size of data that is protected by ECC algorithm and is different for main and spare
area. All structure members that define the codeword are therefore arrays of two 16-bit values. Codeword offset defines
where ECC protected data starts in main (\em codeword_offset[0]) or spare (\em codeword_offset[1]) area, codeword
size (\em codeword_size) defines the number of data that is protected i.e. data over which ECC is calculated and
codeword gap (\em codeword_gap) defines the space between two consecutive codeword regions.
Generated ECC data is stored into spare area and is described similar as codeword, with offset from start of spare area
(\em ecc_offset), size of generated data (\em ecc_size) and gap (\em ecc_gap) between two consecutive ECC data regions.
Number of bits that ECC algorithm can correct per codeword is defined with \em correctable_bits.
<b>Parameter for:</b>
- \ref ARM_NAND_InquireECC
*****************************************************************************************************************/
//
// Functions
//
ARM_DRIVER_VERSION ARM_NAND_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_NAND_GetVersion (void)
\details
The function \b ARM_NAND_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_NAND Driver_NAND0;
ARM_DRIVER_NAND *drv_info;
void setup_nand (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_NAND0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*******************************************************************************************************************/
ARM_NAND_CAPABILITIES ARM_NAND_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_NAND_CAPABILITIES ARM_NAND_GetCapabilities (void)
\details
The function \b ARM_NAND_GetCapabilities retrieves information about capabilities in this driver implementation.
The data fields of the structure \ref ARM_NAND_CAPABILITIES encode various capabilities, for example
if a hardware is able to create signal events using the \ref ARM_NAND_SignalEvent
callback function.
Example:
\code
extern ARM_DRIVER_NAND Driver_NAND0;
ARM_DRIVER_NAND *drv_info;
void read_capabilities (void) {
ARM_NAND_CAPABILITIES drv_capabilities;
drv_info = &Driver_NAND0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*******************************************************************************************************************/
int32_t ARM_NAND_Initialize (ARM_NAND_SignalEvent_t cb_event) {
return 0;
}
/**
\fn int32_t ARM_NAND_Initialize (ARM_NAND_SignalEvent_t cb_event)
\details
The function \b ARM_NAND_Initialize initializes the NAND interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes the resources needed for the NAND interface.
- Registers the \ref ARM_NAND_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_NAND_SignalEvent callback function; use a NULL pointer
when no callback signals are required.
\b Example:
- see \ref nand_interface_gr - Driver Functions
*******************************************************************************************************************/
int32_t ARM_NAND_Uninitialize (void) {
return 0;
}
/**
\fn int32_t ARM_NAND_Uninitialize (void)
\details
The function \b ARM_NAND_Uninitialize de-initializes the resources of NAND interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*******************************************************************************************************************/
int32_t ARM_NAND_PowerControl (ARM_POWER_STATE state) {
return 0;
}
/**
\fn int32_t ARM_NAND_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_NAND_PowerControl controls the power modes of the NAND interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*******************************************************************************************************************/
int32_t ARM_NAND_DevicePower (uint32_t voltage) {
return 0;
}
/**
\fn int32_t ARM_NAND_DevicePower (uint32_t voltage)
\details
The function \b ARM_NAND_DevicePower controls the power supply of the NAND device.
The parameter \em voltage sets the device supply voltage as defined in the table.
\b AMR_NAND_POWER_xxx_xxx specifies power settings.
Device Power Bits | Description
:--------------------------------|:--------------------------------------------
\ref ARM_NAND_POWER_VCC_OFF | Set VCC Power off
\ref ARM_NAND_POWER_VCC_3V3 | Set VCC = 3.3V
\ref ARM_NAND_POWER_VCC_1V8 | Set VCC = 1.8V
\ref ARM_NAND_POWER_VCCQ_OFF | Set VCCQ I/O Power off
\ref ARM_NAND_POWER_VCCQ_3V3 | Set VCCQ = 3.3V
\ref ARM_NAND_POWER_VCCQ_1V8 | Set VCCQ = 1.8V
\ref ARM_NAND_POWER_VPP_OFF | Set VPP off
\ref ARM_NAND_POWER_VPP_ON | Set VPP on
*******************************************************************************************************************/
int32_t ARM_NAND_WriteProtect (uint32_t dev_num, bool enable) {
return 0;
}
/**
\fn int32_t ARM_NAND_WriteProtect (uint32_t dev_num, bool enable)
\details
The function \b ARM_NAND_WriteProtect controls the Write Protect (WPn) pin of a NAND device.
The parameter \em dev_num is the device number. \n
The parameter \em enable specifies whether to enable or disable write protection.
*******************************************************************************************************************/
int32_t ARM_NAND_ChipEnable (uint32_t dev_num, bool enable) {
return 0;
}
/**
\fn int32_t ARM_NAND_ChipEnable (uint32_t dev_num, bool enable)
\details
The function \b ARM_NAND_ChipEnable control the Chip Enable (CEn) pin of a NAND device.
The parameter \em dev_num is the device number. \n
The parameter \em enable specifies whether to enable or disable the device.
This function is optional and supported only when the data field \em ce_manual = \token{1} in the structure \ref ARM_NAND_CAPABILITIES.
Otherwise, the Chip Enable (CEn) signal is controlled automatically by SendCommand/Address, Read/WriteData and ExecuteSequence
(for example when the NAND device is connected to a memory bus).
*******************************************************************************************************************/
int32_t ARM_NAND_GetDeviceBusy (uint32_t dev_num) {
return 0;
}
/**
\fn int32_t ARM_NAND_GetDeviceBusy (uint32_t dev_num)
\details
The function \b ARM_NAND_GetDeviceBusy returns the status of the Device Busy pin: [\token{1=busy; 0=not busy or error}].
The parameter \em dev_num is the device number.
*******************************************************************************************************************/
int32_t ARM_NAND_SendCommand (uint32_t dev_num, uint8_t cmd) {
return 0;
}
/**
\fn int32_t ARM_NAND_SendCommand (uint32_t dev_num, uint8_t cmd)
\details
The function \b ARM_NAND_SendCommand sends a command to the NAND device.
The parameter \em dev_num is the device number. \n
The parameter \em cmd is the command sent to the NAND device.
*******************************************************************************************************************/
int32_t ARM_NAND_SendAddress (uint32_t dev_num, uint8_t addr) {
return 0;
}
/**
\fn int32_t ARM_NAND_SendAddress (uint32_t dev_num, uint8_t addr)
\details
Send an address to the NAND device.
The parameter \em dev_num is the device number.
The parameter \em addr is the address.
*******************************************************************************************************************/
int32_t ARM_NAND_ReadData (uint32_t dev_num, void *data, uint32_t cnt, uint32_t mode) {
return 0;
}
/**
\fn int32_t ARM_NAND_ReadData (uint32_t dev_num, void *data, uint32_t cnt, uint32_t mode)
\details
The function \b ARM_NAND_ReadData reads data from a NAND device.
The parameter \em dev_num is the device number. \n
The parameter \em data is a pointer to the buffer that stores the data read from a NAND device. \n
The parameter \em cnt is the number of data items to read. \n
The parameter \em mode defines the operation mode as listed in the table below.
Read Data Mode | Description
:----------------------------------|:--------------------------------------------
\ref ARM_NAND_ECC(n) | Select ECC
\ref ARM_NAND_ECC0 | Use ECC0 of selected ECC
\ref ARM_NAND_ECC1 | Use ECC1 of selected ECC
\ref ARM_NAND_DRIVER_DONE_EVENT | Generate \ref ARM_NAND_EVENT_DRIVER_DONE
The data item size is defined by the data type, which depends on the configured data bus width.
Data type is:
- \em uint8_t for 8-bit data bus
- \em uint16_t for 16-bit data bus
The function executes in the following ways:
- When the operation is blocking (typical for devices connected to memory bus when not using DMA),
then the function returns after all data is read and returns the number of data items read.
- When the operation is non-blocking (typical for NAND controllers), then the function only starts the operation and returns with zero number of data items read.
After the operation is completed, the \ref ARM_NAND_EVENT_DRIVER_DONE event is generated (if enabled by \b ARM_NAND_DRIVER_DONE_EVENT).
Progress of the operation can also be monitored by calling the \ref ARM_NAND_GetStatus function and checking the \em busy data field.
Operation is automatically aborted if ECC is used and ECC correction fails, which generates the \ref ARM_NAND_EVENT_ECC_ERROR event
(together with \ref ARM_NAND_DRIVER_DONE_EVENT if enabled).
*******************************************************************************************************************/
int32_t ARM_NAND_WriteData (uint32_t dev_num, const void *data, uint32_t cnt, uint32_t mode) {
return 0;
}
/**
\fn int32_t ARM_NAND_WriteData (uint32_t dev_num, const void *data, uint32_t cnt, uint32_t mode)
\details
The function \b ARM_NAND_WriteData writes data to a NAND device.
The parameter \em dev_num is the device number. \n
The parameter \em data is a pointer to the buffer with data to write. \n
The parameter \em cnt is the number of data items to write. \n
The parameter \em mode defines the operation mode as listed in the table below.
Write Data Mode | Description
:----------------------------------|:--------------------------------------------
\ref ARM_NAND_ECC(n) | Select ECC
\ref ARM_NAND_ECC0 | Use ECC0 of selected ECC
\ref ARM_NAND_ECC1 | Use ECC1 of selected ECC
\ref ARM_NAND_DRIVER_DONE_EVENT | Generate \ref ARM_NAND_EVENT_DRIVER_DONE
The data item size is defined by the data type, which depends on the configured data bus width.
Data type is:
- \em uint8_t for 8-bit data bus
- \em uint16_t for 16-bit data bus
The function executes in the following ways:
- When the operation is blocking (typical for devices connected to memory bus when not using DMA),
then the function returns after all data is written and returns the number of data items written.
- When the operation is non-blocking (typical for NAND controllers), then the function only starts the operation
and returns with zero number of data items written. After the operation is completed,
the \ref ARM_NAND_EVENT_DRIVER_DONE event is generated (if enabled by \b ARM_NAND_DRIVER_DONE_EVENT).
Progress of the operation can also be monitored by calling the \ref ARM_NAND_GetStatus function and checking the \em busy data field.
Operation is automatically aborted if ECC is used and ECC generation fails,
which generates the \ref ARM_NAND_EVENT_ECC_ERROR event (together with \ref ARM_NAND_DRIVER_DONE_EVENT if enabled).
*******************************************************************************************************************/
int32_t ARM_NAND_ExecuteSequence (uint32_t dev_num, uint32_t code, uint32_t cmd,
uint32_t addr_col, uint32_t addr_row,
void *data, uint32_t data_cnt,
uint8_t *status, uint32_t *count) {
return 0;
}
/**
\fn int32_t ARM_NAND_ExecuteSequence (uint32_t dev_num, uint32_t code, uint32_t cmd, uint32_t addr_col, uint32_t addr_row, void *data, uint32_t data_cnt, uint8_t *status, uint32_t *count)
\details
The function \b ARM_NAND_ExecuteSequence executes a sequence of operations for a NAND device.
The parameter \em dev_num is the device number. \n
The parameter \em code is the sequence encoding as defined in the table <b>Sequence execution Code</b>. \n
The parameter \em cmd is the command or a series of commands. \n
The parameter \em addr_col is the column address. \n
The parameter \em addr_row is the row address. \n
The parameter \em data is a pointer to the buffer that stores the data to or loads the data from. \n
The parameter \em data_cnt is the number of data items to read or write in one iteration. \n
The parameter \em status is a pointer to the buffer that stores the status read. \n
The parameter \em count is a pointer to the number of iterations. \n
\b ARM_NAND_CODE_xxx specifies sequence execution codes.
Sequence Execution Code | Description
:----------------------------------|:--------------------------------------------
\ref ARM_NAND_CODE_SEND_CMD1 | Send Command 1 (cmd[7..0])
\ref ARM_NAND_CODE_SEND_ADDR_COL1 | Send Column Address 1 (addr_col[7..0])
\ref ARM_NAND_CODE_SEND_ADDR_COL2 | Send Column Address 2 (addr_col[15..8])
\ref ARM_NAND_CODE_SEND_ADDR_ROW1 | Send Row Address 1 (addr_row[7..0])
\ref ARM_NAND_CODE_SEND_ADDR_ROW2 | Send Row Address 2 (addr_row[15..8])
\ref ARM_NAND_CODE_SEND_ADDR_ROW3 | Send Row Address 3 (addr_row[23..16])
\ref ARM_NAND_CODE_INC_ADDR_ROW | Auto-increment Row Address
\ref ARM_NAND_CODE_WRITE_DATA | Write Data
\ref ARM_NAND_CODE_SEND_CMD2 | Send Command 2 (cmd[15..8])
\ref ARM_NAND_CODE_WAIT_BUSY | Wait while R/Bn busy
\ref ARM_NAND_CODE_READ_DATA | Read Data
\ref ARM_NAND_CODE_SEND_CMD3 | Send Command 3 (cmd[23..16])
\ref ARM_NAND_CODE_READ_STATUS | Read Status byte and check FAIL bit (bit 0)
\ref ARM_NAND_ECC(n) | Select ECC
\ref ARM_NAND_ECC0 | Use ECC0 of selected ECC
\ref ARM_NAND_ECC1 | Use ECC1 of selected ECC
\ref ARM_NAND_DRIVER_DONE_EVENT | Generate \ref ARM_NAND_EVENT_DRIVER_DONE
The data item size is defined by the data type, which depends on the configured data bus width.
Data type is:
- \em uint8_t for 8-bit data bus
- \em uint16_t for 16-bit data bus
The function is non-blocking and returns as soon as the driver has started executing the specified sequence.
When the operation is completed, the \ref ARM_NAND_EVENT_DRIVER_DONE event is generated (if enabled by \b ARM_NAND_DRIVER_DONE_EVENT).
Progress of the operation can also be monitored by calling the \ref ARM_NAND_GetStatus function and checking the \em busy data field.
Driver executes the number of specified iterations where in each iteration
items specified by \b ARM_NAND_CODE_xxx are executed in the order as listed in the table <b>Sequence execution Code</b>.
The parameter \em count is holding the current number of iterations left.
Execution is automatically aborted and \ref ARM_NAND_EVENT_DRIVER_DONE event is generated (if enabled by \b ARM_NAND_DRIVER_DONE_EVENT):
- if Read Status is enabled and the FAIL bit (bit 0) is set
- if ECC is used and ECC fails (also sets \ref ARM_NAND_EVENT_ECC_ERROR event)
\note
\ref ARM_NAND_CODE_WAIT_BUSY can only be specified if the Device Ready event can be generated (reported by \em event_device_ready in \ref ARM_NAND_CAPABILITIES).
The event \ref ARM_NAND_EVENT_DEVICE_READY is not generated during sequence execution but rather used internally by the driver.
*******************************************************************************************************************/
int32_t ARM_NAND_AbortSequence (uint32_t dev_num) {
return 0;
}
/**
\fn int32_t ARM_NAND_AbortSequence (uint32_t dev_num)
\details
The function \b ARM_NAND_AbortSequence aborts execution of the current sequence for a NAND device.
The parameter \em dev_num is the device number.
*******************************************************************************************************************/
int32_t ARM_NAND_Control (uint32_t dev_num, uint32_t control, uint32_t arg) {
return 0;
}
/**
\fn int32_t ARM_NAND_Control (uint32_t dev_num, uint32_t control, uint32_t arg)
\details
The function \b ARM_NAND_Control controls the NAND interface and executes operations.
The parameter \em dev_num is the device number. \n
The parameter \em control specifies the operation. \n
The parameter \em arg provides (depending on the \em control) additional information or sets values.
The table lists the operations for the parameter \em control.
Parameter \em control | Operation
:--------------------------------|:--------------------------------------------
\ref ARM_NAND_BUS_MODE | Set the bus mode. The parameter \em arg sets the \ref bus_mode_tab "\b Bus Mode".
\ref ARM_NAND_BUS_DATA_WIDTH | Set the data bus width. The parameter \em arg sets the \ref bus_data_width_tab "\b Bus Data Width".
\ref ARM_NAND_DRIVER_STRENGTH | Set the driver strength. The parameter \em arg sets the \ref driver_strength_tab "\b Driver Strength".
\ref ARM_NAND_DRIVER_READY_EVENT | Control generation of callback event \ref ARM_NAND_EVENT_DRIVER_READY. Enable: \em arg = \token{1}. Disable: \em arg = \token{0}.
\ref ARM_NAND_DEVICE_READY_EVENT | Control generation of callback event \ref ARM_NAND_EVENT_DEVICE_READY; Enable: \em arg = \token{1}. Disable: \em arg = \token{0}.
<b>See Also</b>
- \ref ARM_NAND_GetCapabilities returns information about supported operations, which are stored in the structure \ref ARM_NAND_CAPABILITIES.
- \ref ARM_NAND_SignalEvent provides information about the callback events \ref ARM_NAND_EVENT_DRIVER_READY and \ref ARM_NAND_EVENT_DEVICE_READY
The table lists values for the parameter \em arg used with the \em control operation \ref ARM_NAND_BUS_MODE, \ref ARM_NAND_BUS_DATA_WIDTH, and
\ref ARM_NAND_DRIVER_STRENGTH. Values from different categories can be ORed.
\anchor bus_mode_tab
<table class="cmtable" summary="">
<tr><th> Parameter \em arg <br> for <i>control</i> = \ref ARM_NAND_BUS_MODE </th>
<th> Bit </th>
<th> Category </th>
<th> Description </th>
<th width="30%"> Supported when \ref ARM_NAND_CAPABILITIES </th></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_0 (default) </td>
<td rowspan="8" style="text-align:right"> 0..3 </td>
<td rowspan="8"> \anchor bus_timing_tab Bus Timing Mode </td>
<td> \token{0} </td>
<td rowspan="8"> The maximum timing mode that can be applied to a specific \ref bus_data_interface_tab "\b Bus Data Interface"
is stored in the data fields: <br><br>
<i>sdr_timing_mode</i> - for SDR <br>
<i>ddr_timing_mode</i> - for NV-DDR <br>
<i>ddr2_timing_mode</i> - for NV_DDR2 </td></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_1 </td><td> \token{1} </td></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_2 </td><td> \token{2} </td></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_3 </td><td> \token{3} </td></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_4 </td><td> \token{4} (SDR EDO capable) </td></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_5 </td><td> \token{5} (SDR EDO capable) </td></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_6 </td><td> \token{6} (NV-DDR2 only) </td></tr>
<tr><td> \ref ARM_NAND_BUS_TIMING_MODE_7 </td><td> \token{7} (NV-DDR2 only) </td></tr>
<tr><td> \ref ARM_NAND_BUS_SDR (default) \anchor bus_data_interface_tab </td>
<td rowspan="3" style="text-align:right"> 4..7 </td>
<td rowspan="3"> Bus Data Interface </td>
<td> SDR (Single Data Rate) - Traditional interface </td>
<td> <i>always supported</i> </td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR </td><td> NV-DDR (Double Data Rate) </td><td> data field <i>ddr</i> = \token{1} </td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2 </td><td> NV-DDR2 (Double Data Rate) </td><td> data field <i>ddr2</i> = \token{1} </td></tr>
<tr><td style="white-space: nowrap"> \ref ARM_NAND_BUS_DDR2_DO_WCYC_0 (default) </td>
<td rowspan="4" style="text-align:right"> 8..11 </td>
<td rowspan="4" style="white-space: nowrap"> Data Output Warm-up \anchor bus_output_tab </td>
<td> Set the DDR2 Data Output Warm-up to \token{0} cycles </td>
<td rowspan="4"> <b>Data Output Warm-up</b> cycles are dummy cycles for interface calibration with no incremental data transfer
and apply to NV-DDR2 of the \ref bus_data_interface_tab "\b Bus Data Interface".
</td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_DO_WCYC_1 </td><td> Set the DDR2 Data Output Warm-up to \token{1} cycles </td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_DO_WCYC_2 </td><td> Set the DDR2 Data Output Warm-up to \token{2} cycles </td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_DO_WCYC_4 </td><td> Set the DDR2 Data Output Warm-up to \token{4} cycles </td></tr>
<tr><td style="white-space: nowrap"> \ref ARM_NAND_BUS_DDR2_DI_WCYC_0 (default) \anchor bus_input_tab</td>
<td rowspan="4" style="text-align:right"> 12..15 </td>
<td rowspan="4" style="white-space: nowrap"> Data Input Warm-up </td>
<td> Set the DDR2 Data Input Warm-up to \token{0} cycles </td>
<td rowspan="4"> <b>Data Input Warm-up</b> cycles are dummy cycles for interface calibration with no incremental data transfer
and apply to NV-DDR2 of the \ref bus_data_interface_tab "\b Bus Data Interface".
</td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_DI_WCYC_1 </td><td> Set the DDR2 Data Input Warm-up to \token{1} cycles </td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_DI_WCYC_2 </td><td> Set the DDR2 Data Input Warm-up to \token{2} cycles </td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_DI_WCYC_4 </td><td> Set the DDR2 Data Input Warm-up to \token{4} cycles </td></tr>
<tr><td style="white-space: nowrap"> \ref ARM_NAND_BUS_DDR2_VEN \anchor bus_misc_tab </td>
<td style="text-align:right"> 16 </td>
<td rowspan="3" style="white-space: nowrap"> Miscellaneous </td>
<td> Set the DDR2 Enable external VREFQ as reference </td>
<td rowspan="3">
</td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_CMPD </td><td style="text-align:right"> 17 </td><td> Set the DDR2 Enable complementary DQS (DQS_c) signal </td></tr>
<tr><td> \ref ARM_NAND_BUS_DDR2_CMPR </td><td style="text-align:right"> 18 </td><td> Set the DDR2 Enable complementary RE_n (RE_c) signal </td></tr>
<tr><th> Parameter \em arg <br> for <i>control</i> = \ref ARM_NAND_BUS_DATA_WIDTH </th>
<th> Bit </th>
<th> Category \anchor bus_data_width_tab </th>
<th> Description </th>
<th width="30%"> Supported when \ref ARM_NAND_CAPABILITIES </th></tr>
<tr><td style="white-space: nowrap"> \ref ARM_NAND_BUS_DATA_WIDTH_8 (default) </td>
<td rowspan="2" style="text-align:right"> 0..1 </td>
<td rowspan="2" style="white-space: nowrap"> Bus Data Width </td>
<td> Set to \token{8 bit} </td>
<td> <i>always supported</i>
</td></tr>
<tr><td> \ref ARM_NAND_BUS_DATA_WIDTH_16 </td><td> Set to \token{16 bit} </td><td> data field <i>data_width_16</i> = \token{1} </td></tr>
<tr><th style="white-space: nowrap"> Parameter \em arg <br> for <i>control</i> = \ref ARM_NAND_DRIVER_STRENGTH </th>
<th> Bit </th>
<th> Category \anchor driver_strength_tab </th>
<th> Description </th>
<th width="30%"> Supported when \ref ARM_NAND_CAPABILITIES </th></tr>
<tr><td style="white-space: nowrap"> \ref ARM_NAND_DRIVER_STRENGTH_18 </td>
<td rowspan="4" style="text-align:right"> 0..3 </td>
<td rowspan="4" style="white-space: nowrap"> Driver Strength </td>
<td> Set the Driver Strength 2.0x = 18 Ohms </td>
<td> data field <i>driver_strength_18</i> = \token{1}
</td></tr>
<tr><td> \ref ARM_NAND_DRIVER_STRENGTH_25 </td><td> Set the Driver Strength 1.4x = 25 Ohms </td><td> data field <i>driver_strength_25</i> = \token{1} </td></tr>
<tr><td> \ref ARM_NAND_DRIVER_STRENGTH_35 (default) </td><td> Set the Driver Strength 1.0x = 35 Ohms </td><td> <i>always supported</i> </td></tr>
<tr><td> \ref ARM_NAND_DRIVER_STRENGTH_50 </td><td> Set the Driver Strength 0.7x = 50 Ohms </td><td> data field <i>driver_strength_50</i> = \token{1} </td></tr>
</table>
<b>Example</b>
\code
extern ARM_DRIVER_NAND Driver_NAND0;
status = Driver_NAND0.Control (0, ARM_NAND_BUS_MODE, ARM_NAND_BUS_TIMING_MODE_5 |
ARM_NAND_BUS_DDR2 |
ARM_NAND_BUS_DDR2_VEN);
status = Driver_NAND0.Control (0, ARM_NAND_BUS_DATA_WIDTH, ARM_NAND_BUS_DATA_WIDTH_16);
status = Driver_NAND0.Control (0, ARM_NAND_DRIVER_STRENGTH, ARM_NAND_DRIVER_STRENGTH_50);
\endcode
*******************************************************************************************************************/
ARM_NAND_STATUS ARM_NAND_GetStatus (uint32_t dev_num) {
return 0;
}
/**
\fn ARM_NAND_STATUS ARM_NAND_GetStatus (uint32_t dev_num)
\details
The function \b ARM_NAND_GetStatus returns the current NAND device status.
The parameter \em dev_num is the device number.
*******************************************************************************************************************/
int32_t ARM_NAND_InquireECC (int32_t index, ARM_NAND_ECC_INFO *info) {
return 0;
}
/**
\fn int32_t ARM_NAND_InquireECC (int32_t index, ARM_NAND_ECC_INFO *info)
\details
The function \b ARM_NAND_InquireECC reads error correction code information.
The parameter \em index is the ECC index and is used to retrieve different ECC configurations. \n
The parameter \em info is a pointer of type \ref ARM_NAND_ECC_INFO. The data fields store the information.
When multiple different ECC configurations exist, ARM_NAND_ECC_INFO structure exists for each configuration. Parameter
\em index denotes which configuration will be retrieved. Value of index should start with zero to retrieve first ECC
configuration and should be incremented in order to retrieve next ECC configuration. When index is out of range function
ARM_NAND_InquireECC returns with error.
Parameter \em index is used by \ref ARM_NAND_ECC(n) in \ref ARM_NAND_ReadData, \ref ARM_NAND_WriteData and
\ref ARM_NAND_ExecuteSequence to select suitable ECC configuration.
<b>Example</b>
\code
extern ARM_DRIVER_NAND Driver_NAND0;
ARM_NAND_ECC_INFO ecc;
int32_t idx;
idx = 0;
while (Driver_NAND0.InquireECC (idx, &ecc) == ARM_DRIVER_OK) {
// Examine retrieved ECC configuration
if (ecc.type == 2) {
// Algorithm ECC0 protects Main+Spare
}
// ..
idx++;
}
\endcode
*******************************************************************************************************************/
void ARM_NAND_SignalEvent (uint32_t dev_num, uint32_t event) {
return 0;
}
/**
\fn void ARM_NAND_SignalEvent (uint32_t dev_num, uint32_t event)
\details
The function \b ARM_NAND_SignalEvent is a callback function registered by the function \ref ARM_NAND_Initialize.
The parameter \em dev_num is the device number. \n
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_NAND_CAPABILITIES, which can be retrieved with the function \ref ARM_NAND_GetCapabilities.
The following events can be generated:
Parameter \em event | Bit | Description
:---------------------------------|-----|:---------------------------
\ref ARM_NAND_EVENT_DEVICE_READY | 0 | Occurs when rising edge is detected on R/Bn (Ready/Busy) pin indicating that the device is ready.
\ref ARM_NAND_EVENT_DRIVER_READY | 1 | Occurs to indicate that commands can be executed (after previously being busy and not able to start the requested operation).
\ref ARM_NAND_EVENT_DRIVER_DONE | 2 | Occurs after an operation completes. An operation was successfully started before with \ref ARM_NAND_ReadData, \ref ARM_NAND_WriteData, \ref ARM_NAND_ExecuteSequence.
\ref ARM_NAND_EVENT_ECC_ERROR | 3 | Occurs when ECC generation failed or ECC correction failed. An operation was successfully started before with \ref ARM_NAND_ReadData, \ref ARM_NAND_WriteData, \ref ARM_NAND_ExecuteSequence.
The event \ref ARM_NAND_EVENT_DEVICE_READY occurs after complete execution of commands
(initiated with the functions \ref ARM_NAND_SendCommand, \ref ARM_NAND_SendAddress, \ref ARM_NAND_ReadData, \ref ARM_NAND_WriteData, \ref ARM_NAND_ExecuteSequence).
It is useful to indicate completion of complex operations (such as erase).
The event is only generated when \ref ARM_NAND_GetCapabilities returns data field \em event_device_ready = \token{1}
and was enabled by calling \ref ARM_NAND_Control (\ref ARM_NAND_DEVICE_READY_EVENT, 1).
If the event is not available, poll the \em busy data field using the function \ref ARM_NAND_GetStatus.
The event \ref ARM_NAND_EVENT_DRIVER_READY occurs when previously a function
(\ref ARM_NAND_SendCommand, \ref ARM_NAND_SendAddress, \ref ARM_NAND_ReadData, \ref ARM_NAND_WriteData, \ref ARM_NAND_ExecuteSequence)
returned with \ref ARM_DRIVER_ERROR_BUSY. It is useful when functions are called simultaneously from independent threads
(for example to control multiple devices) and the threads have no knowledge about each other (driver rejects reentrant calls with return of \ref ARM_DRIVER_ERROR_BUSY).
\em dev_num indicates the device that returned previously busy.
*******************************************************************************************************************/
/**
@}
*/
// End NAND Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_NAND.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 10,523 |
```c
/**
\defgroup storage_interface_gr Storage Interface
\brief Driver API for Storage Device Interface (%Driver_Storage.h)
\details
This is an abstraction for a storage controller. It offers an interface to
access an address space of storage locations, comprising APIs for
initialization, erase, access, program, and status-fetch operations. It also
offers APIs to iterate over the available Storage Blocks (\ref
ARM_STORAGE_BLOCK), allowing the discovery of block attributes such as
write/erase granularities. Using the Storage abstraction, it becomes possible to
write generic algorithms, such as block copy, to operate on any conforming
storage device.
\note The storage abstraction layer is not responsible for storage management.
Algorithms such as block-allocation, wear-leveling, erase-before-write and other
storage-management policies are the responsibility of modules external to the
storage abstraction layer. In essence, the storage interface is the lowest
abstraction upon which block management policies can be implemented.
Here's a picture to help locate the storage abstraction in the software stack.
The part below the box labeled 'Storage abstraction layer' is implemented by a
storage driver.
\image html storage_sw_stack.png
<b>Storage API</b>
The following header files define the Application Programming Interface (API) for the Flash interface:
- \b %Driver_Storage.h : Driver API for Storage Device Interface
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref StorageDriverFunctions
- \ref ARM_DRIVER_STORAGE : access struct for Storage driver functions
A sample use for the driver can be found at: \ref SampleUseOfStorageDriver
*******************************************************************************************************************/
/**
\addtogroup storage_interface_gr
@{
*******************************************************************************************************************/
/**
\struct ARM_STORAGE_BLOCK_ATTRIBUTES
<b>Contained in:</b>
- \ref ARM_STORAGE_BLOCK
*******************************************************************************************************************/
/**
\struct ARM_STORAGE_BLOCK
\details Storage blocks combine to make up the address map of a storage controller.
*******************************************************************************************************************/
/**
\struct ARM_STORAGE_INFO
\details
It describes the characteristics of a Storage device. This includes total
storage, programming size, a default value for erased memory etc. This
information can be obtained from the Storage device datasheet and is used by the
middleware in order to properly interact with the Storage device.
Total available storage (in bytes) is contained in \em total_storage. Minimum
programming size (in bytes) is described by \em program_unit (applicable only if
the \em programmable attribute is set for a block). It defines the granularity
for programming data. The offset of the start of a program-range and the size
should also be aligned with \em program_unit.
\note: setting \em program_unit to 0 has the effect of disabling the size and
alignment restrictions (setting it to 1 also has the same effect).
Optimal programming page-size (in bytes) is specified by \em
optimal_program_unit. Some storage controllers have internal buffers into which
to receive data. Writing in chunks of \em optimal_program_unit would achieve
maximum programming speed. Like with \em program_unit, this is applicable only
if the \em programmable attribute is set for the underlying storage block(s).
\em program_cycles is a measure of endurance for reprogramming.
A value of \em ARM_STORAGE_PROGRAM_CYCLES_INFINITE may be used to signify
infinite or unknown endurance.
Contents of erased memory is specified by the \em erased_value. It is usually
\token{1} to indicate erased bytes with state 0xFF.
\em memory_mapped can be set to \token{1} to indicate that the storage device
has a mapping onto the processor's memory address space.
\note: For a memory-mapped block which isn't erasable but is programmable,
writes should be possible directly to the memory-mapped storage without going
through the \ref ARM_Storage_ProgramData operation.
The field \em programmability holds a value to indicate storage programmability.
Similarly, \em retention_level holds a for encoding data-retention levels for
all storage blocks.
\note
These fields serve a different purpose than the ones contained in
\ref ARM_STORAGE_CAPABILITIES, which is another structure containing device-level
metadata. ARM_STORAGE_CAPABILITIES describes the API capabilities, whereas
ARM_STORAGE_INFO describes the device. Furthermore ARM_STORAGE_CAPABILITIES fits
within a single word, and is designed to be passed around by value;
ARM_STORAGE_INFO, on the other hand, contains metadata which doesn't fit into a
single word and requires the use of pointers to be moved around.
<b>Returned by:</b>
- \ref ARM_Storage_GetInfo
*******************************************************************************************************************/
/**
\struct ARM_DRIVER_STORAGE
\details
This is the set of operations constituting the Storage driver. Their
implementation is platform-specific, and needs to be supplied by the porting
effort. The functions of the Storage driver are accessed by function pointers
exposed by this structure. Refer to \ref StorageDriverFunctions for overview
information.
Each instance of a Storage interface provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_Storage0 is the name of the access struct of the first instance (no. 0).
- \b Driver_Storage1 is the name of the access struct of the second instance (no. 1).
A middleware configuration setting allows connecting the middleware to a specific driver instance \b %Driver_Flash<i>n</i>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*******************************************************************************************************************/
/**
\defgroup StorageDriverFunctions Use of Storage APIs
Function pointers within \ref ARM_DRIVER_STORAGE form the set of operations
constituting the Storage driver. Their implementation is platform-specific, and
needs to be supplied by the porting effort.
Some of these APIs will always operate synchronously:
- \ref ARM_Storage_GetVersion
- \ref ARM_Storage_GetCapabilities
- \ref ARM_Storage_GetStatus
- \ref ARM_Storage_GetInfo
- \ref ARM_Storage_ResolveAddress
- \ref ARM_Storage_GetNextBlock and
- \ref ARM_Storage_GetBlock.
This means that control returns to the caller with a relevant status code only after the completion of the operation (or
the discovery of a failure condition).
The remainder of the APIs:
- \ref ARM_Storage_Initialize
- \ref ARM_Storage_Uninitialize
- \ref ARM_Storage_PowerControl
- \ref ARM_Storage_ReadData
- \ref ARM_Storage_ProgramData
- \ref ARM_Storage_Erase and
- \ref ARM_Storage_EraseAll
can function asynchronously if the underlying controller supports it; that is if ARM_STORAGE_CAPABILITIES::asynchronous_ops
is set. In the case of asynchronous operation, the invocation returns early (with ARM_DRIVER_OK) and results in a completion
callback later. If ARM_STORAGE_CAPABILITIES::asynchronous_ops is not set, then all such APIs execute synchronously, and
control returns to the caller with a status code only after the completion of the operation (or the discovery of a failure
condition).
If ARM_STORAGE_CAPABILITIES::asynchronous_ops is set, a storage driver may
still choose to execute asynchronous operations in a synchronous manner. If
so, the driver returns a positive value to indicate successful synchronous
completion (or an error code in case of failure) and no further invocation of
completion callback should be expected. The expected return value for
synchronous completion of such asynchronous operations varies depending on
the operation. For operations involving data access, it often equals the
amount of data transferred or affected. For non data-transfer operations,
such as EraseAll or Initialize, it is usually 1.
Here's a code snippet to suggest how asynchronous APIs might be used by
callers to handle both synchronous and asynchronous execution by the
underlying storage driver:
\code
ASSERT(ARM_DRIVER_OK == 0); // this is a precondition; it doesn't need to be put in code
int32_t returnValue = drv->asynchronousAPI(...);
if (returnValue < ARM_DRIVER_OK) {
// handle error.
} else if (returnValue == ARM_DRIVER_OK) {
ASSERT(drv->GetCapabilities().asynchronous_ops == 1);
// handle early return from asynchronous execution; remainder of the work is done in the callback handler.
} else {
ASSERT(returnValue == EXPECTED_RETURN_VALUE_FOR_SYNCHRONOUS_COMPLETION);
// handle synchronous completion.
}
\endcode
THis example is mixing synchronous and asynchronous APIs: \ref SampleUseOfStorageDriver
*******************************************************************************************************************/
/**
\struct ARM_STORAGE_CAPABILITIES
\details
A Storage driver can be implemented with different capabilities. The data fields
of this struct encode the API capabilities implemented by this driver.
The element \em asynchronous_ops indicates if APIs like initialize, read, erase,
program, etc. can operate in asynchronous mode. Having this bit set to 1 means
that the driver is capable of launching asynchronous operations; command
completion for asynchronous operations is signaled by the invocation of a
completion callback. If set to 1, drivers may still complete asynchronous
operations synchronously as necessary--in which case they return a positive
error code to indicate synchronous completion. If \em asynchronous_ops is not
set, then all such APIs execute synchronously, and control returns to the caller
with a status code only after the completion of the operation (or the discovery
of a failure condition).
The element \em erase_all specifies that the \ref ARM_Storage_EraseAll function
is supported. Typically full chip erase is much faster than erasing the whole
device using \em ARM_Storage_Erase.
<b>Returned by:</b>
- \ref ARM_Storage_GetCapabilities
\note
This data structure is designed to fit within a single word so that it can be
fetched cheaply using a call to driver->GetCapabilities().
*******************************************************************************************************************/
/**
\struct ARM_STORAGE_STATUS
\details
Structure with information about the status of the Storage device.
The flag \em busy indicates that the driver is busy executing read/program/erase operation.
The flag \em error flag is cleared on start of read/program/erase operation and is set at the end of the current operation in case of error.
<b>Returned by:</b>
- \ref ARM_Storage_GetStatus
*****************************************************************************************************************/
/**
\enum ARM_STORAGE_OPERATION
\details
Command opcodes for the Storage interface. Completion callbacks use these codes
to refer to completing commands. Refer to \ref ARM_Storage_Callback_t.
*****************************************************************************************************************/
/**
\typedef ARM_Storage_Callback_t
\details
Provides the typedef for the callback function \ref ARM_Storage_Callback_t.
\param [in] status
A code to indicate the status of the completed operation. For data
transfer operations, the status field is overloaded in case of
success to return the count of bytes successfully transferred; this
can be done safely because error codes are negative values.
\param [in] operation
The command op-code. This value isn't essential, but it is expected that
this information could be a quick and useful filter for the handler.
<b>Parameter for:</b>
- \ref ARM_Storage_Initialize
*******************************************************************************************************************/
//
// Functions
//
ARM_DRIVER_VERSION ARM_Storage_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_Storage_GetVersion (void)
\details
The function \b ARM_Storage_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION.
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_STORAGE *drv_info;
void read_version (void) {
ARM_DRIVER_VERSION version;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
\note This API returns synchronously--it does not result in an invocation
of a completion callback.
\note The function GetVersion() can be called any time to obtain the
required information from the driver (even before initialization). It
always returns the same information.
*******************************************************************************************************************/
ARM_STOR_CAPABILITIES ARM_Storage_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_STORAGE_CAPABILITIES ARM_Storage_GetCapabilities (void)
\details
The function \b ARM_Storage_GetCapabilities returns information about
capabilities in this driver implementation. The data fields of the struct
ARM_STORAGE_CAPABILITIES encode various capabilities, for example if the device
is able to execute operations asynchronously.
Example:
\code
extern ARM_DRIVER_STORAGE *drv_info;
void read_capabilities (void) {
ARM_STORAGE_CAPABILITIES drv_capabilities;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
\note This API returns synchronously--it does not result in an invocation
of a completion callback.
\note The function GetCapabilities() can be called any time to obtain the
required information from the driver (even before initialization). It
always returns the same information.
*******************************************************************************************************************/
int32_t ARM_Storage_Initialize (ARM_Storage_Callback_t callback) {
return 0;
}
/**
\fn int32_t ARM_Storage_Initialize (ARM_Storage_Callback_t callback)
\details
The function \b ARM_Storage_Initialize is called when the middleware component starts
operation. In addition to bringing the controller to a ready state,
Initialize() receives a callback handler to be invoked upon completion of
asynchronous operations.
ARM_Storage_Initialize() needs to be called explicitly before
powering the peripheral using ARM_Storage_PowerControl(), and before initiating other
accesses to the storage controller.
The function performs the following operations:
- Initializes the resources needed for the Storage interface.
- Registers the \ref ARM_Storage_Callback_t callback function.
To start working with a peripheral the functions ARM_Storage_Initialize and ARM_Storage_PowerControl() need to be called in this order:
\code
drv->Initialize (...); // Allocate I/O pins
drv->PowerControl (ARM_POWER_FULL); // Power up peripheral, setup IRQ/DMA
\endcode
- ARM_Storage_Initialize() typically allocates the I/O resources (pins) for the
peripheral. The function can be called multiple times; if the I/O resources
are already initialized it performs no operation and just returns with
ARM_DRIVER_OK.
- ARM_Storage_PowerControl (ARM_POWER_FULL) sets the peripheral registers including
interrupt (NVIC) and optionally DMA. The function can be called multiple
times; if the registers are already set it performs no operation and just
returns with ARM_DRIVER_OK.
To stop working with a peripheral the functions ARM_Storage_PowerControl() and ARM_Storage_Uninitialize() need to be called in this order:
\code
drv->PowerControl (ARM_POWER_OFF); // Terminate any pending transfers, reset IRQ/DMA, power off peripheral
drv->Uninitialize (...); // Release I/O pins
\endcode
The functions ARM_Storage_PowerControl() and ARM_Storage_Uninitialize() always execute and can be used
to put the peripheral into a Safe State, for example after any data
transmission errors. To restart the peripheral in an error condition,
you should first execute the Stop Sequence and then the Start Sequence.
\note This API may execute asynchronously if
ARM_STORAGE_CAPABILITIES::asynchronous_ops is set. Asynchronous
execution is optional even if 'asynchronous_ops' is set.
*******************************************************************************************************************/
int32_t ARM_Storage_Uninitialize (void) {
return 0;
}
/**
\fn int32_t ARM_Storage_Uninitialize (void)
\details
It is called when the middleware component stops operation, and wishes to
release the software resources used by the interface.
\note This API may execute asynchronously if
ARM_STORAGE_CAPABILITIES::asynchronous_ops is set. Asynchronous
execution is optional even if 'asynchronous_ops' is set.
*******************************************************************************************************************/
int32_t ARM_Storage_PowerControl (ARM_POWER_STATE state) {
return 0;
}
/**
\fn int32_t ARM_Storage_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_Storage_PowerControl operates the power modes of the Storage interface.
To start working with a peripheral the functions Initialize and PowerControl need to be called in this order:
\code
drv->Initialize (...); // Allocate I/O pins
drv->PowerControl (ARM_POWER_FULL); // Power up peripheral, setup IRQ/DMA
\endcode
- ARM_Storage_Initialize() typically allocates the I/O resources (pins) for the
peripheral. The function can be called multiple times; if the I/O resources
are already initialized it performs no operation and just returns with
ARM_DRIVER_OK.
- PowerControl (ARM_POWER_FULL) sets the peripheral registers including
interrupt (NVIC) and optionally DMA. The function can be called multiple
times; if the registers are already set it performs no operation and just
returns with ARM_DRIVER_OK.
To stop working with a peripheral the functions PowerControl and Uninitialize need to be called in this order:
\code
drv->PowerControl (ARM_POWER_OFF); // Terminate any pending transfers, reset IRQ/DMA, power off peripheral
drv->Uninitialize (...); // Release I/O pins
\endcode
The functions ARM_Storage_PowerControl and ARM_Storage_Uninitialize always execute and can be used
to put the peripheral into a Safe State, for example after any data
transmission errors. To restart the peripheral in an error condition,
you should first execute the Stop Sequence and then the Start Sequence.
The parameter \em state can have the following values:
- \ref ARM_POWER_FULL : set-up the Storage device for data transfers, enable interrupts (NVIC) and optionally DMA. Can be called multiple times.
If the device is already in this mode, then the function performs no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
\note This API may execute asynchronously if
ARM_STORAGE_CAPABILITIES::asynchronous_ops is set. Asynchronous
execution is optional even if 'asynchronous_ops' is set.
*******************************************************************************************************************/
int32_t ARM_Storage_ReadData (uint64_t addr, void *data, uint32_t size) {
return 0;
}
/**
\fn int32_t ARM_Storage_ReadData (uint64_t addr, void *data, uint32_t size)
\details
Read the contents of a range of storage memory into a buffer
supplied by the caller. The buffer is owned by the caller and should
remain accessible for the lifetime of this command.
\note This API may execute asynchronously if
ARM_STORAGE_CAPABILITIES::asynchronous_ops is set. Asynchronous
execution is optional even if 'asynchronous_ops' is set.
*******************************************************************************************************************/
int32_t ARM_Storage_ProgramData (uint64_t addr, const void *data, uint32_t size) {
return 0;
}
/**
\fn int32_t ARM_Storage_ProgramData (uint64_t addr, const void *data, uint32_t size)
\details
Write the contents of a given memory buffer into a range of
storage memory. In the case of flash memory, the destination range in
storage memory typically has its contents in an erased state from a
preceding erase operation. The source memory buffer is owned by the
caller and should remain accessible for the lifetime of this command.
\note It is best for the middleware to write in units of
'optimal_program_unit' (\ref ARM_STORAGE_INFO) of the device.
\note This API may execute asynchronously if
ARM_STORAGE_CAPABILITIES::asynchronous_ops is set. Asynchronous
execution is optional even if 'asynchronous_ops' is set.
*******************************************************************************************************************/
int32_t ARM_Storage_Erase (uint64_t addr, uint32_t size) {
return 0;
}
/**
\fn int32_t ARM_Storage_Erase (uint64_t addr, uint32_t size)
\details
This function erases a range of storage specified by [addr, addr +
size). Both 'addr' and 'addr + size' should align with the
'erase_unit'(s) of the respective owning storage block(s) (see \ref
ARM_STORAGE_BLOCK and \ref ARM_STORAGE_BLOCK_ATTRIBUTES). The range to
be erased will have its contents returned to the un-programmed state--
i.e. to \ref ARM_STORAGE_INFO::erased_value, which
is usually 1 to indicate the pattern of all ones: 0xFF.
\note This API may execute asynchronously if
ARM_STORAGE_CAPABILITIES::asynchronous_ops is set. Asynchronous
execution is optional even if 'asynchronous_ops' is set.
\note Erase() may return a smaller (positive) value than the size of the
requested range. The returned value indicates the actual number of bytes
erased. It is the caller's responsibility to follow up with an appropriate
request to complete the operation.
\note in the case of a failed erase (except when
ARM_DRIVER_ERROR_PARAMETER, ARM_STORAGE_ERROR_PROTECTED, or
ARM_STORAGE_ERROR_NOT_ERASABLE is returned synchronously), the
requested range should be assumed to be in an unknown state. The
previous contents may not be retained.
*******************************************************************************************************************/
int32_t ARM_Storage_EraseAll (void) {
return 0;
}
/**
\fn int32_t ARM_Storage_EraseAll (void)
\details
This optional function erases the complete device. If the device does not
support global erase then the function returns the error value \ref
ARM_DRIVER_ERROR_UNSUPPORTED. The data field \em 'erase_all' =
\token{1} of the structure \ref ARM_STORAGE_CAPABILITIES encodes that
\ref ARM_Storage_EraseAll is supported.
\note This API may execute asynchronously if
ARM_STORAGE_CAPABILITIES::asynchronous_ops is set. Asynchronous
execution is optional even if 'asynchronous_ops' is set.
*******************************************************************************************************************/
ARM_Storage_STATUS ARM_Storage_GetStatus (void) {
return 0;
}
/**
\fn ARM_STORAGE_STATUS ARM_Storage_GetStatus (void)
\details
Get the status of the current (or previous) command executed by the
storage controller; stored in the structure \ref ARM_STORAGE_STATUS.
\note This API returns synchronously--it does not result in an invocation
of a completion callback.
*******************************************************************************************************************/
int32_t ARM_Storage_GetInfo (ARM_STORAGE_INFO *info) {
return 0;
}
/**
\fn int32_t ARM_Storage_GetInfo (ARM_STORAGE_INFO *info)
\details
Get information about the Storage device; stored in the structure \ref ARM_STORAGE_INFO.
\note It is the caller's responsibility to ensure that the buffer passed in
is able to be initialized with a \ref ARM_STORAGE_INFO.
\note This API returns synchronously--it does not result in an invocation
of a completion callback.
*******************************************************************************************************************/
uint32_t ARM_Storage_ResolveAddress(uint64_t addr) {
return 0;
}
/**
\fn uint32_t ARM_Storage_ResolveAddress(uint64_t addr)
\details
Only applicable to devices with memory-mapped storage.
\note This API returns synchronously. The invocation should return quickly,
and result in a resolved address.
*******************************************************************************************************************/
int32_t ARM_Storage_GetNextBlock(const ARM_STORAGE_BLOCK* prev_block, ARM_STORAGE_BLOCK *next_block) {
return 0;
}
/**
\fn int32_t ARM_Storage_GetNextBlock(const ARM_STORAGE_BLOCK* prev_block, ARM_STORAGE_BLOCK *next_block);
\details
This helper function fetches (an iterator to) the next block (or
the first block if 'prev_block' is passed in as NULL). In the failure
case, a terminating, invalid block iterator is filled into the out
parameter: 'next_block'. In combination with \ref
ARM_STORAGE_VALID_BLOCK, it can be used to iterate over the sequence
of blocks within the storage map:
\code
ARM_STORAGE_BLOCK block;
for (drv->GetNextBlock(NULL, &block); ARM_STORAGE_VALID_BLOCK(&block); drv->GetNextBlock(&block, &block)) {
// make use of block
}
\endcode
\note This API returns synchronously--it does not result in an invocation
of a completion callback.
*******************************************************************************************************************/
int32_t ARM_Storage_GetBlock(uint64_t addr, ARM_STORAGE_BLOCK *block) {
return 0;
}
/**
\fn int32_t ARM_Storage_GetBlock(uint64_t addr, ARM_STORAGE_BLOCK *block);
\note This API returns synchronously--it does not result in an invocation
of a completion callback.
*******************************************************************************************************************/
/**
@}
*/
/**
\defgroup SampleUseOfStorageDriver Sample Use of Storage Driver
\ingroup storage_interface_gr
@{
<b>Example Code:</b>
The following is a generic algorithm to erase
and program one \ref ARM_STORAGE_BLOCK_ATTRIBUTES::erase_unit worth of storage
and then read it back to be verified. It handles both synchronous and
asynchronous driver implementations.
\code
//
//
// http:// www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#include "Driver_Storage.h"
#include <stdio.h>
#include <string.h>
#define TEST_ASSERT(Expr) if (!(Expr)) { printf("%s:%u: assertion failure\n", __FUNCTION__, __LINE__); while (1) ;}
#define TEST_ASSERT_EQUAL(expected, actual) if ((expected) != (actual)) {printf("%s:%u: assertion failure\n", __FUNCTION__, __LINE__); while (1) ;}
#define TEST_ASSERT_NOT_EQUAL(expected, actual) if ((expected) == (actual)) {printf("%s:%u: assertion failure\n", __FUNCTION__, __LINE__); while (1) ;}
// forward declarations
void callbackHandler(int32_t status, ARM_STORAGE_OPERATION operation);
void progressStateMachine(void);
static enum {
NEEDS_INITIALIZATION,
NEEDS_ERASE,
NEEDS_PROGRAMMING,
NEEDS_READ,
NEEDS_VERIFICATION_FOLLOWING_READ,
FINISHED
} state;
extern ARM_DRIVER_STORAGE ARM_Driver_Storage_(0);
ARM_DRIVER_STORAGE *drv = &ARM_Driver_Storage_(0);
static const unsigned BUFFER_SIZE = 16384;
static uint8_t buffer[BUFFER_SIZE];
void main(int argc __unused, char** argv __unused)
{
state = NEEDS_INITIALIZATION;
progressStateMachine();
while (true) {
// WFE(); // optional low-power sleep
}
}
void progressStateMachine(void)
{
int32_t rc;
static ARM_STORAGE_BLOCK firstBlock;
if (!ARM_STORAGE_VALID_BLOCK(&firstBlock)) {
// Get the first block. This block is entered only once.
rc = drv->GetNextBlock(NULL, &firstBlock); // get first block
TEST_ASSERT_EQUAL(ARM_DRIVER_OK, rc);
}
TEST_ASSERT(ARM_STORAGE_VALID_BLOCK(&firstBlock));
TEST_ASSERT(firstBlock.size > 0);
switch (state) {
case NEEDS_INITIALIZATION:
rc = drv->Initialize(callbackHandler);
TEST_ASSERT(rc >= ARM_DRIVER_OK);
if (rc == ARM_DRIVER_OK) {
TEST_ASSERT_EQUAL(1, drv->GetCapabilities().asynchronous_ops);
state = NEEDS_ERASE;
return; // there is pending asynchronous activity which will lead to a completion callback later.
}
TEST_ASSERT_EQUAL(1, rc); // synchronous completion
// intentional fall-through
case NEEDS_ERASE:
TEST_ASSERT(firstBlock.attributes.erase_unit > 0);
rc = drv->Erase(firstBlock.addr, firstBlock.attributes.erase_unit);
TEST_ASSERT(rc >= ARM_DRIVER_OK);
if (rc == ARM_DRIVER_OK) {
TEST_ASSERT_EQUAL(1, drv->GetCapabilities().asynchronous_ops);
state = NEEDS_PROGRAMMING;
return; // there is pending asynchronous activity which will lead to a completion callback later.
}
TEST_ASSERT_EQUAL(firstBlock.attributes.erase_unit, (uint32_t)rc); // synchronous completion
// intentional fall-through
case NEEDS_PROGRAMMING:
TEST_ASSERT(BUFFER_SIZE >= firstBlock.attributes.erase_unit);
#define PATTERN 0xAA
memset(buffer, PATTERN, firstBlock.attributes.erase_unit);
rc = drv->ProgramData(firstBlock.addr, buffer, firstBlock.attributes.erase_unit);
TEST_ASSERT(rc >= ARM_DRIVER_OK);
if (rc == ARM_DRIVER_OK) {
TEST_ASSERT_EQUAL(1, drv->GetCapabilities().asynchronous_ops);
state = NEEDS_READ;
return; // there is pending asynchronous activity which will lead to a completion callback later.
}
TEST_ASSERT_EQUAL(firstBlock.attributes.erase_unit, (uint32_t)rc); // synchronous completion
// intentional fall-through
case NEEDS_READ:
rc = drv->ReadData(firstBlock.addr, buffer, firstBlock.attributes.erase_unit);
TEST_ASSERT(rc >= ARM_DRIVER_OK);
if (rc == ARM_DRIVER_OK) {
TEST_ASSERT_EQUAL(1, drv->GetCapabilities().asynchronous_ops);
state = NEEDS_VERIFICATION_FOLLOWING_READ;
return; // there is pending asynchronous activity which will lead to a completion callback later.
}
TEST_ASSERT_EQUAL(firstBlock.attributes.erase_unit, (uint32_t)rc);
// intentional fall-through
case NEEDS_VERIFICATION_FOLLOWING_READ:
printf("verifying data\r\n");
for (unsigned i = 0; i < firstBlock.attributes.erase_unit; i++) {
TEST_ASSERT_EQUAL(PATTERN, buffer[i]);
}
state = FINISHED;
printf("done\r\n");
break;
case FINISHED:
break;
} // switch (state)
}
void callbackHandler(int32_t status, ARM_STORAGE_OPERATION operation)
{
(void)status;
(void)operation;
switch (operation) {
case ARM_STORAGE_OPERATION_INITIALIZE:
case ARM_STORAGE_OPERATION_READ_DATA:
case ARM_STORAGE_OPERATION_PROGRAM_DATA:
case ARM_STORAGE_OPERATION_ERASE:
progressStateMachine();
break;
default:
printf("callbackHandler: unexpected callback for opcode %u with status %ld\r\n", operation, status);
break;
}
}
\endcode
@}
*******************************************************************************************************************/
// End Storage Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_Storage.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 6,585 |
```c
#include "Driver_NAND.h"
/* ONFI commands */
#define ONFI_CMD_READ_1ST 0x00 ///< Read 1st Cycle
#define ONFI_CMD_PROGRAM_2ND 0x10 ///< Page Program 2nd Cycle
#define ONFI_CMD_READ_2ND 0x30 ///< Read 2nd Cycle
#define ONFI_CMD_PROGRAM_1ST 0x80 ///< Page Program 1st Cycle
#define ONFI_CMD_RESET 0xFF ///< Reset Command
/* NAND Signal Event callback function */
volatile uint32_t NAND_Events;
void NAND_SignalEventCallback (uint32_t dev_num, uint32_t event) {
if (dev_num == 0) {
NAND_Events |= event;
}
else {
// ..
}
}
/* NAND device Power ON */
void PowerOn (ARM_DRIVER_NAND *drv, uint32_t dev_num) {
ARM_NAND_CAPABILITIES capabilities;
// Query drivers capabilities
capabilities = drv->GetCapabilities();
// Initialize NAND device
drv->Initialize (NAND_SignalEventCallback);
// Power-on NAND driver
drv->PowerControl (ARM_POWER_FULL);
// Turn ON device power
uint32_t volt = 0U;
if (capabilities.vcc) { volt |= ARM_NAND_POWER_VCC_3V3; }
if (capabilities.vcc_1v8) { volt |= ARM_NAND_POWER_VCC_1V8; }
if (capabilities.vccq) { volt |= ARM_NAND_POWER_VCCQ_3V3; }
if (capabilities.vccq_1v8) { volt |= ARM_NAND_POWER_VCCQ_1V8; }
if (volt != 0U) {
drv->DevicePower (volt);
}
// Setting bus mode
drv->Control (0U, ARM_NAND_BUS_MODE, ARM_NAND_BUS_SDR);
// Setting bus data width
drv->Control (0U, ARM_NAND_BUS_DATA_WIDTH, ARM_NAND_BUS_DATA_WIDTH_8);
// Enable chip manually if needed
if (capabilities.ce_manual) {
drv->ChipEnable (dev_num, true);
}
// Send ONFI Reset command */
drv->SendCommand (dev_num, ONFI_CMD_RESET);
}
/* NAND device Power OFF */
void PowerOff (ARM_DRIVER_NAND *drv, uint32_t dev_num) {
ARM_NAND_CAPABILITIES capabilities;
// Query drivers capabilities
capabilities = drv->GetCapabilities();
// Disable chip manually if needed
if (capabilities.ce_manual) {
drv->ChipEnable (0U, false);
}
// Switch OFF gracefully
uint32_t volt = 0U;
if (capabilities.vcc) { volt |= ARM_NAND_POWER_VCC_OFF; }
if (capabilities.vccq) { volt |= ARM_NAND_POWER_VCCQ_OFF; }
if (volt) {
drv->DevicePower (volt);
}
drv->PowerControl (ARM_POWER_OFF);
drv->Uninitialize ();
}
/* Read NAND page. */
void ReadPage (ARM_DRIVER_NAND *drv, uint32_t row, uint8_t *data, uint32_t cnt) {
uint32_t dev_num = 0; // Device number
uint32_t mode;
// Send Read 1st command
drv->SendCommand (dev_num, ONFI_CMD_READ_1ST);
// Send address (column: 2 cycles, row: 3 cycles)
drv->SendAddress (dev_num, 0x00);
drv->SendAddress (dev_num, 0x00);
drv->SendAddress (dev_num, (uint8_t)(row));
drv->SendAddress (dev_num, (uint8_t)(row >> 8));
drv->SendAddress (dev_num, (uint8_t)(row >> 16));
// Send Read 2nd command
drv->SendCommand (dev_num, ONFI_CMD_READ_2ND);
// Wait until device ready
while (drv->GetDeviceBusy(dev_num) == 1) { ; }
// Use ECC algorithm number 2, ECC0 (ECC over main+spare)
mode = ARM_NAND_ECC(2) | ARM_NAND_ECC0;
// Transfer data from the NAND chip
if (drv->ReadData (dev_num, data, cnt, mode | ARM_NAND_DRIVER_DONE_EVENT) != cnt) {
// Wait until driver done event received
while ((NAND_Events & ARM_NAND_DRIVER_DONE_EVENT) == 0) { ; }
// Read page completed
if ((NAND_Events & ARM_NAND_EVENT_ECC_ERROR) != 0) {
// ECC correction failed
}
}
}
/* Write NAND page (ExecuteSequence interface). */
void WritePage_Seq (ARM_DRIVER_NAND *drv, uint32_t row, const uint8_t *data, uint32_t cnt) {
uint32_t dev_num = 0; // Device number
uint32_t cmd;
uint32_t code;
uint32_t seq;
// Prepare commands to send
cmd = ONFI_CMD_PROGRAM_1ST | (ONFI_CMD_PROGRAM_2ND << 8);
// Construct sequence code:
// - Send command 1
// - Send 2 cycles of column address and 3 cycles of row address
// - Write data from memory to device
// - Send command 2
code = ARM_NAND_CODE_SEND_CMD1 |
ARM_NAND_CODE_SEND_ADDR_COL1 |
ARM_NAND_CODE_SEND_ADDR_COL2 |
ARM_NAND_CODE_SEND_ADDR_ROW1 |
ARM_NAND_CODE_SEND_ADDR_ROW2 |
ARM_NAND_CODE_SEND_ADDR_ROW3 |
ARM_NAND_CODE_WRITE_DATA |
ARM_NAND_CODE_SEND_CMD2 ;
// - Use ECC algorithm number 2, ECC0 (ECC over main+spare)
code |= ARM_NAND_ECC(2) | ARM_NAND_ECC0;
// Number of iterations in a sequence
seq = 1;
drv->ExecuteSequence (dev_num, // Device number
code, // Sequence code
cmd, // Command(s)
0, // Column address
row, // Row address
(void *)data, // Data buffer
cnt, // Number of data items (per iteration)
NULL, // Device status will not be read
&seq); // Number of iterations
// Wait until done
while (drv->GetStatus(dev_num).busy != 0) { ; }
// Page write completed
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/NAND_Demo.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,499 |
```c
/**
\defgroup common_drv_gr Common Driver Definitions
\brief Definitions common in all driver interfaces (%Driver_Common.h)
\details
The following definitions are common in all CMSIS-Driver interfaces. Refer to \ref DriverFunctions
for a general overview.
@{
*/
/**
\enum ARM_POWER_STATE
\details
The access structure of each CMSIS-Driver provides the function \b PowerControl, which handles the power
profile for a peripheral using the parameter \ref ARM_POWER_STATE. Depending on this parameter,
the peripheral will operate at full speed, detect just events, or is completely un-powered.
Refer to \ref CallSequence for more information.
*/
/**
\struct ARM_DRIVER_VERSION
\details
The access structure of each CMSIS-Driver provides the function \b GetVersion, which returns in the struct ARM_DRIVER_VERSION:
- API version, which is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version, which is the source code version of the actual driver implementation.
The version is encoded as 16-bit unsigned value (uint16_t) with:
- high-byte: major version.
- low-byte: minor version.
For example, version 1.12 is encoded as 0x10C.
\defgroup execution_status Status Error Codes
\ingroup common_drv_gr
\brief Negative return values of functions indicate errors occurred during execution.
\details
Most functions return a status information using negative return values.
The following list provides the status error codes that are common in all drivers.
The drivers may return also status error codes that are specific to the peripheral.
\sa
\ref spi_execution_status for SPI driver;
\ref usart_execution_status for USART driver;
\ref nand_execution_status for NAND driver;
@{
\def ARM_DRIVER_OK
The value 0 or positive values indicate that the function execution is completed without any errors.
Note that positive values are used to provide for example the number of data items.
\def ARM_DRIVER_ERROR
The function did not execute correct and an unspecified error occurred during execution.
\def ARM_DRIVER_ERROR_BUSY
The function cannot be executed because the driver is busy with the execution of a conflicting operation.
\def ARM_DRIVER_ERROR_TIMEOUT
The function execution is terminated because a peripheral did not react within a specific timeout limit.
\def ARM_DRIVER_ERROR_UNSUPPORTED
The function requested an operation (for example by using an illegal control code) that is not supported.
\def ARM_DRIVER_ERROR_PARAMETER
A function parameter is incorrect.
\def ARM_DRIVER_ERROR_SPECIFIC
This value indicates the start of status error codes that are specific to the peripheral driver.
\sa
\ref spi_execution_status for SPI driver;
\ref usart_execution_status for USART driver;
@}
*/
/**
@}
*/
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_Common.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 563 |
```c
#include "Driver_I2C.h"
/* I2C driver instance */
extern ARM_DRIVER_I2C Driver_I2C0;
static ARM_DRIVER_I2C *I2Cdrv = &Driver_I2C0;
static volatile uint32_t I2C_Event;
/* I2C Signal Event function callback */
static void I2C_SignalEvent (uint32_t event) {
I2C_Event |= event;
}
int main (void) {
uint8_t cnt = 0;
/* Initialize I2C peripheral */
I2Cdrv->Initialize(I2C_SignalEvent);
/* Power-on I2C peripheral */
I2Cdrv->PowerControl(ARM_POWER_FULL);
/* Configure I2C bus */
I2Cdrv->Control(ARM_I2C_OWN_ADDRESS, 0x78);
I2C_Event = 0;
while (1) {
/* Receive chunk */
I2Cdrv->SlaveReceive(&cnt, 1);
while ((I2C_Event & ARM_I2C_EVENT_TRANSFER_DONE) == 0);
/* Clear transfer done flag */
I2C_Event &= ~ARM_I2C_EVENT_TRANSFER_DONE;
/* Transmit chunk back */
I2Cdrv->SlaveTransmit(&cnt, 1);
while ((I2C_Event & ARM_I2C_EVENT_TRANSFER_DONE) == 0);
/* Clear transfer done flag */
I2C_Event &= ~ARM_I2C_EVENT_TRANSFER_DONE;
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/I2C_SlaveDemo.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 331 |
```c
/**
\defgroup flash_interface_gr Flash Interface
\brief Driver API for Flash Device Interface (%Driver_Flash.h)
\details
<a href="path_to_url" target="_blank">Flash devices</a> based on NOR memory cells are the
preferred technology for embedded applications requiring a discrete non-volatile memory device. The low read latency
characteristic of these Flash devices allow a direct code execution
(<a href="path_to_url" target="_blank">XIP</a>) and data storage in a single memory
product.
<b>Flash API</b>
The Flash API provides a generic API suitable for Flashes with NOR memory cells independent from the actual interface
to the MCU (memory bus, SPI, ...). <a href="path_to_url#Serial_flash" target="_blank">SPI</a>
flashes are typically not named NOR flashes but have usually same flash cell properties.
The following header files define the Application Programming Interface (API) for the Flash interface:
- \b %Driver_Flash.h : Driver API for Flash Device Interface
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_FLASH : access struct for Flash driver functions
@{
A typical setup sequence for the driver is shown below:
<b>Example Code:</b>
\include Flash_Demo.c
*/
*******************************************************************************************************************/
/**
\defgroup Flash_events Flash Events
\ingroup flash_interface_gr
\brief The Flash driver generates call back events that are notified via the function \ref ARM_Flash_SignalEvent.
\details
This section provides the event values for the \ref ARM_Flash_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_FLASH_EVENT_READY
\def ARM_FLASH_EVENT_ERROR
@}
*/
/**
\struct ARM_FLASH_SECTOR
\details
Specifies sector start and end address.
<b>Element of</b>:
- \ref ARM_FLASH_INFO structure
*******************************************************************************************************************/
/**
\struct ARM_FLASH_INFO
\details
Stores the characteristics of a Flash device. This includes sector layout, programming size and a default value for erased memory.
This information can be obtained from the Flash device datasheet and is used by the middleware in order to properly interact with the Flash device.
Sector layout is described by specifying the \em sector_info which points to an array of sector information (start and end address) and by specifying the \em sector_count which defines the number of sectors.
The element \em sector_size is not used in this case and needs to be \em 0.
Flash sectors need not to be aligned continuously. Gaps are allowed in the device memory space in order to reserve sectors for other usage (for example application code).
When the device has uniform sector size than the sector layout can be described by specifying the \em sector_size which defines the size of a single sector and by specifying the \em sector_count which defines the number of sectors.
The element \em sector_info is not used in this case and needs to be \em NULL.
The smallest programmable unit within a sector is specified by the \em program_unit. It defines the granularity for programming data.
Optimal programming page size is specified by the \em page_size and defines the amount of data that should be programmed in one step to achieve maximum programming speed.
Contents of erased memory is specified by the \em erased_value and is typically \em 0xFF. This value can be used before erasing a sector to check if the sector is blank and erase can be skipped.
*******************************************************************************************************************/
/**
\struct ARM_DRIVER_FLASH
\details
The functions of the Flash driver are accessed by function pointers exposed by this structure. Refer to \ref DriverFunctions for overview information.
Each instance of a Flash interface provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_Flash0 is the name of the access struct of the first instance (no. 0).
- \b Driver_Flash1 is the name of the access struct of the second instance (no. 1).
A middleware configuration setting allows connecting the middleware to a specific driver instance \b %Driver_Flash<i>n</i>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*******************************************************************************************************************/
/**
\struct ARM_FLASH_CAPABILITIES
\details
A Flash driver can be implemented with different capabilities. The data fields of this struct encode
the capabilities implemented by this driver.
The element \em event_ready indicates that the driver is able to generate the \ref ARM_FLASH_EVENT_READY event. In case that this event is not available it is possible to poll the driver status by calling the \ref ARM_Flash_GetStatus and check the \em busy flag.
The element \em data_width specifies the data access size and also defines the data type (uint8_t, uint16_t or uint32_t) for the \em data parameter in \ref ARM_Flash_ReadData and \ref ARM_Flash_ProgramData functions.
The element \em erase_chip specifies that the \ref ARM_Flash_EraseChip function is supported. Typically full chip erase is much faster than erasing the whole device sector per sector.
<b>Returned by:</b>
- \ref ARM_Flash_GetCapabilities
*******************************************************************************************************************/
/**
\struct ARM_FLASH_STATUS
\details
Structure with information about the status of the Flash.
The flag \em busy indicates that the driver is busy executing read/program/erase operation.
The flag \em error flag is cleared on start of read/program/erase operation and is set at the end of the current operation in case of error.
<b>Returned by:</b>
- \ref ARM_Flash_GetStatus
*****************************************************************************************************************/
/**
\typedef ARM_Flash_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_Flash_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_Flash_Initialize
*******************************************************************************************************************/
//
// Functions
//
ARM_DRIVER_VERSION ARM_Flash_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_Flash_GetVersion (void)
\details
The function \b ARM_Flash_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_FLASH Driver_Flash0;
ARM_DRIVER_FLASH *drv_info;
void read_version (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_Flash0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*******************************************************************************************************************/
ARM_FLASH_CAPABILITIES ARM_Flash_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_FLASH_CAPABILITIES ARM_Flash_GetCapabilities (void)
\details
The function \b ARM_Flash_GetCapabilities returns information about capabilities in this driver implementation.
The data fields of the struct \ref ARM_FLASH_CAPABILITIES encode various capabilities, for example
if a hardware is able to create signal events using the \ref ARM_Flash_SignalEvent callback function.
Example:
\code
extern ARM_DRIVER_FLASH Driver_Flash0;
ARM_DRIVER_FLASH *drv_info;
void read_capabilities (void) {
ARM_FLASH_CAPABILITIES drv_capabilities;
drv_info = &Driver_Flash0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*******************************************************************************************************************/
int32_t ARM_Flash_Initialize (ARM_Flash_SignalEvent_t cb_event) {
return 0;
}
/**
\fn int32_t ARM_Flash_Initialize (ARM_Flash_SignalEvent_t cb_event)
\details
The function \b ARM_Flash_Initialize initializes the Flash interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes the resources needed for the Flash interface.
- Registers the \ref ARM_Flash_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_Flash_SignalEvent callback function; use a NULL pointer
when no callback signals are required.
\b Example:
- see \ref flash_interface_gr - Driver Functions
*******************************************************************************************************************/
int32_t ARM_Flash_Uninitialize (void) {
return 0;
}
/**
\fn int32_t ARM_Flash_Uninitialize (void)
\details
The function \b ARM_Flash_Uninitialize de-initializes the resources of Flash interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*******************************************************************************************************************/
int32_t ARM_Flash_PowerControl (ARM_POWER_STATE state) {
return 0;
}
/**
\fn int32_t ARM_Flash_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_Flash_PowerControl operates the power modes of the Flash interface.
The parameter \em state can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA. Can be called multiple times.
If the peripheral is already in this mode, then the function performs no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*******************************************************************************************************************/
int32_t ARM_Flash_ReadData (uint32_t addr, void *data, uint32_t cnt) {
return 0;
}
/**
\fn int32_t ARM_Flash_ReadData (uint32_t addr, void *data, uint32_t cnt)
\details
This function \b ARM_Flash_ReadData reads data from the Flash device.
The parameter \em addr specifies the address from where to read data (needs to be aligned to data type size). \n
The parameter \em data specifies the pointer to a buffer storing the data read.
The data type is \em uint8_t, \em uint16_t or \em uint32_t and is specified by the \em data_width in \ref ARM_FLASH_CAPABILITIES. \n
The parameter \em cnt specifies the number of data items to read.
The function executes in the following ways:
- When the operation is non-blocking (typical for SPI Flash) then the function only starts the operation and returns with zero number of data items read.
When the operation is completed the \ref ARM_FLASH_EVENT_READY event is generated (if supported and reported by \ref ARM_Flash_GetCapabilities).
In case of errors the \ref ARM_FLASH_EVENT_ERROR event is generated at the same time.
Progress of the operation can also be monitored by calling the \ref ARM_Flash_GetStatus function and checking the \em busy flag.
- When the operation is blocking (typical for memory mapped Flash) then the function returns after the data is read and returns the number of data items read.
*******************************************************************************************************************/
int32_t ARM_Flash_ProgramData (uint32_t addr, const void *data, uint32_t cnt) {
return 0;
}
/**
\fn int32_t ARM_Flash_ProgramData (uint32_t addr, const void *data, uint32_t cnt)
\details
This function \b ARM_Flash_ProgramData programs data to the Flash device.
The parameter \em addr specifies the address to where to program data (needs to be aligned to \em program_unit specified in \ref ARM_FLASH_INFO). \n
The parameter \em data specifies the pointer to a buffer containing data to be programmed.
The data type is \em uint8_t, \em uint16_t or \em uint32_t and is specified by the \em data_width in \ref ARM_FLASH_CAPABILITIES. \n
The parameter \em cnt specifies the number of data items to program (data size needs to be a multiple of \em program_unit).
The function executes in the following ways:
- When the operation is non-blocking (typically) then the function only starts the operation and returns with zero number of data items programmed.
When the operation is completed the \ref ARM_FLASH_EVENT_READY event is generated (if supported and reported by \ref ARM_Flash_GetCapabilities).
In case of errors the \ref ARM_FLASH_EVENT_ERROR event is generated at the same time.
Progress of the operation can also be monitored by calling the \ref ARM_Flash_GetStatus function and checking the \em busy flag.
- When the operation is blocking then the function returns after the data is programmed and returns the number of data items programmed.
*******************************************************************************************************************/
int32_t ARM_Flash_EraseSector (uint32_t addr) {
return 0;
}
/**
\fn int32_t ARM_Flash_EraseSector (uint32_t addr)
\details
This function \b ARM_Flash_EraseSector erases a flash sector specified by the parameter <i>adr</i> (points to start of the sector).
The function is non-blocking and returns as soon as the driver has started the operation.
When the operation is completed the \ref ARM_FLASH_EVENT_READY event is generated (if supported and reported by \ref ARM_Flash_GetCapabilities).
In case of errors the \ref ARM_FLASH_EVENT_ERROR event is generated at the same time.
Progress of the operation can also be monitored by calling the \ref ARM_Flash_GetStatus function and checking the \em busy flag.
*******************************************************************************************************************/
int32_t ARM_Flash_EraseChip (void) {
return 0;
}
/**
\fn int32_t ARM_Flash_EraseChip (void)
\details
The optional function \b ARM_Flash_EraseChip erases the complete device.
If the device does not support global erase or only a portion of the Flash memory space is used for storing files,
then the functions returns the error value \ref ARM_DRIVER_ERROR_UNSUPPORTED.
The data field \em eras_chip = \token{1} of the structure \ref ARM_FLASH_CAPABILITIES encodes that \b ARM_Flash_EraseChip is supported.
The field can be verified with the function \ref ARM_Flash_GetCapabilities.
The function is non-blocking and returns as soon as the driver has started the operation.
When the operation is completed, the \ref ARM_FLASH_EVENT_READY event is generated (if supported and reported by \ref ARM_Flash_GetCapabilities).
In case of errors, the \ref ARM_FLASH_EVENT_ERROR event is generated at the same time.
Progress of the operation can also be monitored by calling the \ref ARM_Flash_GetStatus function and checking the \em busy flag.
<b>See also:</b>
- ARM_Flash_SignalEvent
*******************************************************************************************************************/
ARM_FLASH_STATUS ARM_Flash_GetStatus (void) {
return 0;
}
/**
\fn ARM_FLASH_STATUS ARM_Flash_GetStatus (void)
\details
The function \b ARM_Flash_GetStatus returns the current Flash interface status stored in the structure \ref ARM_FLASH_STATUS.
*******************************************************************************************************************/
ARM_FLASH_INFO * ARM_Flash_GetInfo (void) {
return NULL;
}
/**
\fn ARM_FLASH_INFO * ARM_Flash_GetInfo (void)
\details
The function \b ARM_Flash_GetInfo returns information about the Flash device.
*******************************************************************************************************************/
void ARM_Flash_SignalEvent (uint32_t event) {
return 0;
}
/**
\fn void ARM_Flash_SignalEvent (uint32_t event)
\details
The function \b ARM_Flash_SignalEvent is a callback function registered by the function \ref ARM_Flash_Initialize.
The function is called automatically after read/program/erase operation completes.
The parameter \em event indicates one or more events that occurred during driver operation. Each event is coded in a separate bit and
therefore it is possible to signal multiple events in the event call back function.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_FLASH_CAPABILITIES, which can be retrieved with the function \ref ARM_Flash_GetCapabilities.
The following events can be generated:
Parameter \em event | Bit | Description
:-----------------------------------|:---:|:-----------
\ref ARM_FLASH_EVENT_READY | 0 | Occurs after read/program/erase operation completes.
\ref ARM_FLASH_EVENT_ERROR | 1 | Occurs together with \ref ARM_FLASH_EVENT_READY when operation completes with errors.
<b>See also:</b>
- \ref ARM_Flash_EraseChip
*******************************************************************************************************************/
/**
@}
*/
// End Flash Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_Flash.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 3,564 |
```c
/**
\defgroup eth_interface_gr Ethernet Interface
\brief Ethernet common definitions (%Driver_ETH.h)
\details
<b>Ethernet</b> is a networking technology for exchanging data packages between computer systems. Several microcontrollers integrate
an Ethernet MAC (Media Access Control) data-link layer that interfaces to an Ethernet PHY (Physical Interface Transceiver).
Wikipedia offers more information about
the <a href="path_to_url" target="_blank"><b>Ethernet</b></a>.
<b>Block Diagram</b>
The Ethernet PHY connects typically to the Ethernet MAC using an MII (Media Independent Interface) or RMII (Reduced Media Independent Interface).
\n
\image html EthernetSchematic.png "Block Diagram of a typical Ethernet Interface"
<b>Ethernet API</b>
The following header files define the Application Programming Interface (API) for the <b>Ethernet</b> interface:
- \b %Driver_ETH.h : Common definitions of the Ethernet PHY and MAC part
- \b %Driver_ETH_MAC.h : API for the Ethernet MAC
- \b %Driver_ETH_PHY.h : API for the Ethernet PHY
The driver implementation of the Ethernet MAC is a typical part of a Device Family Pack (DFP) that supports the peripherals of the microcontroller family.
The driver implementation of the Ethernet PHY is a typical part of a \b Network Software Pack, since PHY is typically not integrated into the microcontroller.
\note
For parameters, the value marked with (default) is the setting after the driver initialization.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_ETH_MAC : access struct for <b>Ethernet MAC</b> driver functions.
- \ref ARM_DRIVER_ETH_PHY : access struct for <b>Ethernet PHY</b> driver functions.
Both drivers are used in combination and usually the Ethernet MAC provides a media interface to the Ethernet PHY.
A typical setup sequence for the drivers is shown below:
<b>Example Code</b>
The following example code shows the usage of the Ethernet interface.
\code
extern ARM_DRIVER_ETH_MAC Driver_ETH_MAC0;
extern ARM_DRIVER_ETH_PHY Driver_ETH_PHY0;
static ARM_DRIVER_ETH_MAC *mac;
static ARM_DRIVER_ETH_PHY *phy;
static ARM_ETH_MAC_ADDR own_mac_address;
static ARM_ETH_MAC_CAPABILITIES capabilities;
void ethernet_mac_notify (uint32_t event) {
switch (event) {
:
}
}
void initialize_ethernet_interface (void) {
mac = &Driver_ETH_MAC0;
phy = &Driver_ETH_PHY0;
// Initialize Media Access Controller
capabilities = mac->GetCapabilities ();
mac->Initialize (ethernet_mac_notify);
mac->PowerControl (ARM_POWER_FULL);
if (capabilities.mac_address == 0) {
// populate own_mac_address with the address to use
mac->SetMacAddress(&own_mac_address);
}
else {
mac->GetMacAddress(&own_mac_address);
}
// Initialize Physical Media Interface
if (phy->Initialize (mac->PHY_Read, mac->PHY_Write) == ARM_DRIVER_OK) {
phy->PowerControl (ARM_POWER_FULL);
phy->SetInterface (capabilities.media_interface);
phy->SetMode (ARM_ETH_PHY_AUTO_NEGOTIATE);
}
:
:
}
static ARM_ETH_LINK_STATE ethernet_link; // current link status
void ethernet_check_link_status (void) {
ARM_ETH_LINK_STATE link;
link = phy->GetLinkState ();
if (link == ethernet_link) {
return; // link state unchanged
}
// link state changed
ethernet_link = link;
if (link == ARM_ETH_LINK_UP) { // start transfer
ARM_ETH_LINK_INFO info = phy->GetLinkInfo ();
mac->Control(ARM_ETH_MAC_CONFIGURE,
info.speed << ARM_ETH_MAC_SPEED_Pos |
info.duplex << ARM_ETH_MAC_DUPLEX_Pos |
ARM_ETH_MAC_ADDRESS_BROADCAST);
mac->Control(ARM_ETH_MAC_CONTROL_TX, 1);
mac->Control(ARM_ETH_MAC_CONTROL_RX, 1);
}
else { // stop transfer
mac->Control(ARM_ETH_MAC_FLUSH, ARM_ETH_MAC_FLUSH_TX | ARM_ETH_MAC_FLUSH_RX);
mac->Control(ARM_ETH_MAC_CONTROL_TX, 0);
mac->Control(ARM_ETH_MAC_CONTROL_RX, 0);
}
}
\endcode
*/
/**
\defgroup eth_interface_gr Ethernet Interface
@{
*/
/**
\cond
*/
/**
\enum ARM_ETH_INTERFACE
\details
Encodes the supported media interface between Ethernet MAC and Ethernet PHY.
The function \ref ARM_ETH_MAC_GetCapabilities retrieves the media interface type encoded in the data field \b media_interface of the struct
\ref ARM_ETH_MAC_CAPABILITIES.
<b>Parameter for:</b>
- \ref ARM_ETH_PHY_SetInterface
*/
/**
\enum ARM_ETH_DUPLEX
\details
Lists the supported duplex operating types for MAC.
<b>Parameter for:</b>
- \ref ARM_ETH_MAC_SetMode
*/
/**
\typedef ARM_ETH_SPEED
\details
Lists the supported operating speeds for MAC.
<b>Parameter for:</b>
- \ref ARM_ETH_MAC_SetMode
*/
/**
\endcond
*/
/**
\typedef ARM_ETH_LINK_STATE
\details
The Ethernet Link status shows if the communication is currently established (up) or interrupted (down).
<b>Returned by:</b>
- \ref ARM_ETH_PHY_GetLinkState
*/
/**
\struct ARM_ETH_LINK_INFO
\details
The Ethernet Link information provides parameters about the current established communication.
<b>Returned by:</b>
- \ref ARM_ETH_PHY_GetLinkInfo
*/
/**
\struct ARM_ETH_MAC_ADDR
\details
Stores the MAC Address of the Ethernet interface as defined by IEEE 802. Wikipedia offers more information about
the <a href="path_to_url" target="_blank"><b>MAC Address</b></a>.
<b>Parameter for:</b>
- \ref ARM_ETH_MAC_GetMacAddress, \ref ARM_ETH_MAC_SetMacAddress, \ref ARM_ETH_MAC_SetAddressFilter
*/
/**
@}
*/
// End ETH Interface
/**
\defgroup eth_interface_types1 Media Interface Types
\ingroup eth_interface_gr
\brief Ethernet Media Interface type
\details
Encodes the supported media interface between Ethernet MAC and Ethernet PHY.
The function \ref ARM_ETH_MAC_GetCapabilities retrieves the media interface type encoded in the data field \b media_interface of the struct
\ref ARM_ETH_MAC_CAPABILITIES.
<b>Parameter for:</b>
- \ref ARM_ETH_PHY_SetInterface
@{
\def ARM_ETH_INTERFACE_MII
\sa ARM_ETH_PHY_SetInterface
\def ARM_ETH_INTERFACE_RMII
\sa ARM_ETH_PHY_SetInterface
\def ARM_ETH_INTERFACE_SMII
\sa ARM_ETH_PHY_SetInterface
@}
*/
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_ETH.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,470 |
```c
/**
\defgroup usart_interface_gr USART Interface
\brief Driver API for Universal Synchronous Asynchronous Receiver/Transmitter (%Driver_USART.h)
\details
The <b>Universal Synchronous Asynchronous Receiver/Transmitter</b> (USART) implements a synchronous and asynchronous serial bus for exchanging data.
When only asynchronous mode is supported it is called Universal Asynchronous Receiver/Transmitter (UART).
Almost all microcontrollers have a serial interface (UART/USART peripheral). A UART is a simple device to send data to a PC
via a terminal emulation program (Hyperterm, TeraTerm) or to another microcontroller.
A UART takes bytes of data and transmits the individual bits in a sequential mode. At the destination,
a second UART reassembles the bits into complete bytes. Each UART contains a shift register for converting between serial and parallel transmission forms.
Wikipedia offers more information about
the <a href="path_to_url" target="_blank"><b>Universal asynchronous receiver/transmitter</b></a>.
<b>USART API</b>
The following header files define the Application Programming Interface (API) for the USART interface:
- \b %Driver_USART.h : Driver API for Universal Synchronous Asynchronous Receiver/Transmitter
The driver implementation is a typical part of the Device Family Pack (DFP) that supports the
peripherals of the microcontroller family.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_USART : access struct for USART driver functions
<b>Example Code</b>
The following example code shows the usage of the USART interface for asynchronous communication.
\include USART_Demo.c
@{
*/
/**
\struct ARM_DRIVER_USART
\details
The functions of the USART driver are accessed by function pointers exposed by this structure.
Refer to \ref DriverFunctions for overview information.
Each instance of an USART interface provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_USART0 is the name of the access struct of the first instance (no. 0).
- \b Driver_USART1 is the name of the access struct of the second instance (no. 1).
A middleware configuration setting allows connecting the middleware to a specific driver instance \b %Driver_USART<i>n</i>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*****************************************************************************************************************/
/**
\struct ARM_USART_CAPABILITIES
\details
An USART driver can be implemented with different capabilities.
The data fields of this structure encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_USART_GetCapabilities
*****************************************************************************************************************/
/**
\struct ARM_USART_STATUS
\details
Structure with information about the status of the USART. The data fields encode busy flags and error flags.
<b>Returned by:</b>
- \ref ARM_USART_GetStatus
*****************************************************************************************************************/
/**
\enum ARM_USART_MODEM_CONTROL
\details
Specifies values for controlling the modem control lines.
<b>Parameter for:</b>
- \ref ARM_USART_SetModemControl
*****************************************************************************************************************/
/**
\struct ARM_USART_MODEM_STATUS
\details
Structure with information about the status of modem lines. The data fields encode states of modem status lines.
<b>Returned by:</b>
- \ref ARM_USART_GetModemStatus
*****************************************************************************************************************/
/**
\typedef ARM_USART_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_USART_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_USART_Initialize
*******************************************************************************************************************/
/**
\defgroup usart_execution_status Status Error Codes
\ingroup common_drv_gr
\brief Negative values indicate errors (USART has specific codes in addition to common \ref execution_status).
\details
The USART driver has additional status error codes that are listed below.
Note that the USART driver also returns the common \ref execution_status.
@{
\def ARM_USART_ERROR_MODE
The \b mode requested with the function \ref ARM_USART_Control is not supported by this driver.
\def ARM_USART_ERROR_BAUDRATE
The <b>baud rate</b> requested with the function \ref ARM_USART_Control is not supported by this driver.
\def ARM_USART_ERROR_DATA_BITS
The number of <b>data bits</b> requested with the function \ref ARM_USART_Control is not supported by this driver.
\def ARM_USART_ERROR_PARITY
The <b>parity bit</b> requested with the function \ref ARM_USART_Control is not supported by this driver.
\def ARM_USART_ERROR_STOP_BITS
The <b>stop bit</b> requested with the function \ref ARM_USART_Control is not supported by this driver.
\def ARM_USART_ERROR_FLOW_CONTROL
The <b>flow control</b> requested with the function \ref ARM_USART_Control is not supported by this driver.
\def ARM_USART_ERROR_CPOL
The <b>clock polarity</b> requested with the function \ref ARM_USART_Control is not supported by this driver.
\def ARM_USART_ERROR_CPHA
The <b>clock phase</b> requested with the function \ref ARM_USART_Control is not supported by this driver.
@}
*/
/**
\defgroup USART_events USART Events
\ingroup usart_interface_gr
\brief The USART driver generates call back events that are notified via the function \ref ARM_USART_SignalEvent.
\details
This section provides the event values for the \ref ARM_USART_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_USART_EVENT_SEND_COMPLETE
\def ARM_USART_EVENT_RECEIVE_COMPLETE
\def ARM_USART_EVENT_TRANSFER_COMPLETE
\def ARM_USART_EVENT_TX_COMPLETE
\def ARM_USART_EVENT_TX_UNDERFLOW
\def ARM_USART_EVENT_RX_OVERFLOW
\def ARM_USART_EVENT_RX_TIMEOUT
\def ARM_USART_EVENT_RX_BREAK
\def ARM_USART_EVENT_RX_FRAMING_ERROR
\def ARM_USART_EVENT_RX_PARITY_ERROR
\def ARM_USART_EVENT_CTS
\def ARM_USART_EVENT_DSR
\def ARM_USART_EVENT_DCD
\def ARM_USART_EVENT_RI
@}
*/
/**
\defgroup USART_control USART Control Codes
\ingroup usart_interface_gr
\brief Many parameters of the USART driver are configured using the \ref ARM_USART_Control function.
\details
@{
The various USART control codes define:
- \ref usart_mode_control specifies USART mode
- \ref usart_data_bits defines the number of data bits
- \ref usart_parity_bit defines the parity bit
- \ref usart_stop_bits defines the number of stop bits
- \ref usart_flow_control specifies RTS/CTS flow control
- \ref usart_clock_polarity defines the clock polarity for the synchronous mode
- \ref usart_clock_phase defines the clock phase for the synchronous mode
- \ref usart_misc_control specifies additional miscellaneous controls
Refer to the \ref ARM_USART_Control function for further details.
*/
/**
\defgroup usart_mode_control USART Mode Control
\ingroup USART_control
\brief Specify USART mode.
\details
@{
\def ARM_USART_MODE_ASYNCHRONOUS
\sa ARM_USART_Control
\def ARM_USART_MODE_SYNCHRONOUS_MASTER
\sa ARM_USART_Control
\def ARM_USART_MODE_SYNCHRONOUS_SLAVE
\sa ARM_USART_Control
\def ARM_USART_MODE_SINGLE_WIRE
\sa ARM_USART_Control
\def ARM_USART_MODE_IRDA
\sa ARM_USART_Control
\def ARM_USART_MODE_SMART_CARD
\sa ARM_USART_Control
@}
*/
/**
\defgroup usart_misc_control USART Miscellaneous Control
\ingroup USART_control
\brief Specifies additional miscellaneous controls.
\details
@{
\def ARM_USART_SET_DEFAULT_TX_VALUE
\sa ARM_USART_Control; ARM_USART_Receive;
\def ARM_USART_SET_IRDA_PULSE
\sa ARM_USART_Control
\def ARM_USART_SET_SMART_CARD_GUARD_TIME
\sa ARM_USART_Control
\def ARM_USART_SET_SMART_CARD_CLOCK
\sa ARM_USART_Control
\def ARM_USART_CONTROL_SMART_CARD_NACK
\sa ARM_USART_Control
\def ARM_USART_CONTROL_TX
\sa ARM_USART_Control; ARM_USART_Send; ARM_USART_Transfer
\def ARM_USART_CONTROL_RX
\sa ARM_USART_Control; ARM_USART_Receive; ARM_USART_Transfer;
\def ARM_USART_CONTROL_BREAK
\sa ARM_USART_Control
\def ARM_USART_ABORT_SEND
\sa ARM_USART_Control;
\def ARM_USART_ABORT_RECEIVE
\sa ARM_USART_Control;
\def ARM_USART_ABORT_TRANSFER
\sa ARM_USART_Control;
@}
*/
/**
\defgroup usart_data_bits USART Data Bits
\ingroup USART_control
\brief Defines the number of data bits.
\details
@{
\def ARM_USART_DATA_BITS_5
\sa ARM_USART_Control
\def ARM_USART_DATA_BITS_6
\sa ARM_USART_Control
\def ARM_USART_DATA_BITS_7
\sa ARM_USART_Control
\def ARM_USART_DATA_BITS_8
\sa ARM_USART_Control
\def ARM_USART_DATA_BITS_9
\sa ARM_USART_Control
@}
*/
/**
\defgroup usart_parity_bit USART Parity Bit
\ingroup USART_control
\brief Defines the parity bit.
\details
@{
\def ARM_USART_PARITY_NONE
\sa ARM_USART_Control
\def ARM_USART_PARITY_EVEN
\sa ARM_USART_Control
\def ARM_USART_PARITY_ODD
\sa ARM_USART_Control
@}
*/
/**
\defgroup usart_stop_bits USART Stop Bits
\ingroup USART_control
\brief Defines the number of stop bits.
\details
@{
\sa ARM_USART_Control
\def ARM_USART_STOP_BITS_1
\sa ARM_USART_Control
\def ARM_USART_STOP_BITS_2
\sa ARM_USART_Control
\def ARM_USART_STOP_BITS_1_5
\sa ARM_USART_Control
\def ARM_USART_STOP_BITS_0_5
\sa ARM_USART_Control
@}
*/
/**
\defgroup usart_flow_control USART Flow Control
\ingroup USART_control
\brief Specifies RTS/CTS flow control.
\details
@{
\def ARM_USART_FLOW_CONTROL_NONE
\sa ARM_USART_Control
\def ARM_USART_FLOW_CONTROL_RTS
\sa ARM_USART_Control
\def ARM_USART_FLOW_CONTROL_CTS
\sa ARM_USART_Control
\def ARM_USART_FLOW_CONTROL_RTS_CTS
\sa ARM_USART_Control
@}
*/
/**
\defgroup usart_clock_polarity USART Clock Polarity
\ingroup USART_control
\brief Defines the clock polarity for the synchronous mode.
\details
@{
\def ARM_USART_CPOL0
\sa ARM_USART_Control; ARM_USART_Receive; ARM_USART_Send; ARM_USART_Transfer
\def ARM_USART_CPOL1
\sa ARM_USART_Control; ARM_USART_Receive; ARM_USART_Send; ARM_USART_Transfer
@}
*/
/**
\defgroup usart_clock_phase USART Clock Phase
\ingroup USART_control
\brief Defines the clock phase for the synchronous mode.
\details
@{
\def ARM_USART_CPHA0
\sa ARM_USART_Control; ARM_USART_Receive; ARM_USART_Send; ARM_USART_Transfer
\def ARM_USART_CPHA1
\sa ARM_USART_Control; ARM_USART_Receive; ARM_USART_Send; ARM_USART_Transfer
@}
*/
/**
@}
*/
// end group USART_control
//
// Functions
//
ARM_DRIVER_VERSION ARM_USART_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_USART_GetVersion (void)
\details
The function \b ARM_USART_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_USART Driver_USART0;
ARM_DRIVER_USART *drv_info;
void setup_usart (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_USART0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*****************************************************************************************************************/
ARM_USART_CAPABILITIES ARM_USART_GetCapabilities (void) {
return { 0 } ;
}
/**
\fn ARM_USART_CAPABILITIES ARM_USART_GetCapabilities (void)
\details
The function \b ARM_USART_GetCapabilities returns information about capabilities in this driver implementation.
The data fields of the structure \ref ARM_USART_CAPABILITIES encode various capabilities, for example:
supported modes, if hardware and driver are capable of signaling events using the \ref ARM_USART_SignalEvent
callback function ...
Example:
\code
extern ARM_DRIVER_USART Driver_USART0;
ARM_DRIVER_USART *drv_info;
void read_capabilities (void) {
ARM_USART_CAPABILITIES drv_capabilities;
drv_info = &Driver_USART0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*****************************************************************************************************************/
int32_t ARM_USART_Initialize (ARM_USART_SignalEvent_t cb_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_Initialize (ARM_USART_SignalEvent_t cb_event)
\details
The function \b ARM_USART_Initialize initializes the USART interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes the resources needed for the USART interface.
- Registers the \ref ARM_USART_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_USART_SignalEvent callback function; use a NULL pointer
when no callback signals are required.
\b Example:
- see \ref usart_interface_gr - Driver Functions
*****************************************************************************************************************/
int32_t ARM_USART_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_Uninitialize (void)
\details
The function \b ARM_USART_Uninitialize de-initializes the resources of USART interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*****************************************************************************************************************/
int32_t ARM_USART_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_USART_PowerControl operates the power modes of the USART interface.
The parameter \em state sets the operation and can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA.
Can be called multiple times. If the peripheral is already in this mode the function performs
no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*****************************************************************************************************************/
int32_t ARM_USART_Send (const void *data, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_Send (const void *data, uint32_t num)
\details
This functions \b ARM_USART_Send is used in asynchronous mode to send data to the USART transmitter.
It can also be used in synchronous mode when sending data only (received data is ignored).
Transmitter needs to be enabled by calling \ref ARM_USART_Control with \ref ARM_USART_CONTROL_TX as the control parameter and \token{1} as argument.
The function parameters specify the buffer with data and the number of items to send.
The item size is defined by the data type which depends on the configured number of data bits.
Data type is:
- \em uint8_t when configured for 5..8 data bits
- \em uint16_t when configured for 9 data bits
Calling the function <b>ARM_USART_Send</b> only starts the send operation.
The function is non-blocking and returns as soon as the driver has started the operation (driver typically configures DMA or the interrupt system for continuous transfer).
When in synchronous slave mode the operation is only registered and started when the master starts the transfer.
During the operation it is not allowed to call this function again or any other data transfer function when in synchronous mode. Also the data buffer must stay allocated and the contents of unsent data must not be modified.
When send operation is completed (requested number of items sent) the \ref ARM_USART_EVENT_SEND_COMPLETE event is generated.
Progress of send operation can also be monitored by reading the number of items already sent by calling \ref ARM_USART_GetTxCount.
After send operation has completed there might still be some data left in the driver's hardware buffer which is still being transmitted.
When all data has been physically transmitted the \ref ARM_USART_EVENT_TX_COMPLETE event is generated (if supported and reported by \em event_tx_complete in \ref ARM_USART_CAPABILITIES).
At that point also the \em tx_busy data field in \ref ARM_USART_STATUS is cleared.
Status of the transmitter can be monitored by calling the \ref ARM_USART_GetStatus and checking the \em tx_busy flag
which indicates if transmission is still in progress.
When in synchronous slave mode and transmitter is enabled but send/receive/transfer operation is not started and data is requested by the master then the \ref ARM_USART_EVENT_TX_UNDERFLOW event is generated.
Send operation can be aborted by calling \ref ARM_USART_Control with \ref ARM_USART_ABORT_SEND as the control parameter.
*****************************************************************************************************************/
int32_t ARM_USART_Receive (void *data, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_Receive (void *data, uint32_t num)
\details
This functions \b ARM_USART_Receive is used in asynchronous mode to receive data from the USART receiver.
It can also be used in synchronous mode when receiving data only (transmits the default value as specified by \ref ARM_USART_Control with \ref ARM_USART_SET_DEFAULT_TX_VALUE as control parameter).
Receiver needs to be enabled by calling \ref ARM_USART_Control with \ref ARM_USART_CONTROL_RX as the control parameter and \token{1} as argument.
The function parameters specify the buffer for data and the number of items to receive.
The item size is defined by the data type which depends on the configured number of data bits.
Data type is:
- \em uint8_t when configured for 5..8 data bits
- \em uint16_t when configured for 9 data bits
Calling the function <b>ARM_USART_Receive</b> only starts the receive operation.
The function is non-blocking and returns as soon as the driver has started the operation (driver typically configures DMA or the interrupt system for continuous transfer).
When in synchronous slave mode the operation is only registered and started when the master starts the transfer.
During the operation it is not allowed to call this function again or any other data transfer function when in synchronous mode. Also the data buffer must stay allocated.
When receive operation is completed (requested number of items received) the \ref ARM_USART_EVENT_RECEIVE_COMPLETE event is generated.
Progress of receive operation can also be monitored by reading the number of items already received by calling \ref ARM_USART_GetRxCount.
Status of the receiver can be monitored by calling the \ref ARM_USART_GetStatus and checking the \em rx_busy flag
which indicates if reception is still in progress.
During reception the following events can be generated (in asynchronous mode):
- \ref ARM_USART_EVENT_RX_TIMEOUT : Receive timeout between consecutive characters detected (optional)
- \ref ARM_USART_EVENT_RX_BREAK : Break detected (Framing error is not generated for Break condition)
- \ref ARM_USART_EVENT_RX_FRAMING_ERROR : Framing error detected
- \ref ARM_USART_EVENT_RX_PARITY_ERROR : Parity error detected
- \ref ARM_USART_EVENT_RX_OVERFLOW : Data overflow detected (also in synchronous slave mode)
\ref ARM_USART_EVENT_RX_OVERFLOW event is also generated when receiver is enabled but data is lost because
receive operation in asynchronous mode or receive/send/transfer operation in synchronous slave mode has not been started.
Receive operation can be aborted by calling \ref ARM_USART_Control with \ref ARM_USART_ABORT_RECEIVE as the control parameter.
*****************************************************************************************************************/
int32_t ARM_USART_Transfer (const void *data_out, void *data_in, uint32_t num) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_Transfer (const void *data_out, void *data_in, uint32_t num)
\details
This functions \b ARM_USART_Transfer is used in synchronous mode to transfer data via USART. It synchronously sends data to the USART transmitter and receives data from the USART receiver.
Transmitter needs to be enabled by calling \ref ARM_USART_Control with \ref ARM_USART_CONTROL_TX as the control parameter and \token{1} as argument.
Receiver needs to be enabled by calling \ref ARM_USART_Control with \ref ARM_USART_CONTROL_RX as the control parameter and \token{1} as argument.
The function parameters specify the buffer with data to send, the buffer for data to receive and the number of items to transfer.
The item size is defined by the data type which depends on the configured number of data bits.
Data type is:
- \em uint8_t when configured for 5..8 data bits
- \em uint16_t when configured for 9 data bits
Calling the function <b>ARM_USART_Transfer</b> only starts the transfer operation.
The function is non-blocking and returns as soon as the driver has started the operation (driver typically configures DMA or the interrupt system for continuous transfer).
When in synchronous slave mode the operation is only registered and started when the master starts the transfer.
During the operation it is not allowed to call this function or any other data transfer function again. Also the data buffers must stay allocated and the contents of unsent data must not be modified.
When transfer operation is completed (requested number of items transferred) the \ref ARM_USART_EVENT_TRANSFER_COMPLETE event is generated.
Progress of transfer operation can also be monitored by reading the number of items already transferred by calling \ref ARM_USART_GetTxCount or \ref ARM_USART_GetRxCount.
Status of the transmitter or receiver can be monitored by calling the \ref ARM_USART_GetStatus and checking the \em tx_busy or \em rx_busy flag.
When in synchronous slave mode also the following events can be generated:
- \ref ARM_USART_EVENT_TX_UNDERFLOW : transmitter is enabled but transfer operation is not started and data is requested by the master
- \ref ARM_USART_EVENT_RX_OVERFLOW : data lost during transfer or because receiver is enabled but transfer operation has not been started
Transfer operation can also be aborted by calling \ref ARM_USART_Control with \ref ARM_USART_ABORT_TRANSFER as the control parameter.
*****************************************************************************************************************/
uint32_t ARM_USART_GetTxCount (void) {
return 0;
}
/**
\fn uint32_t ARM_USART_GetTxCount (void)
\details
The function \b ARM_USART_GetTxCount returns the number of the currently transmitted data items during \ref ARM_USART_Send and \ref ARM_USART_Transfer operation.
*****************************************************************************************************************/
uint32_t ARM_USART_GetRxCount (void) {
return 0;
}
/**
\fn uint32_t ARM_USART_GetRxCount (void)
\details
The function \b ARM_USART_GetRxCount returns the number of the currently received data items during \ref ARM_USART_Receive and \ref ARM_USART_Transfer operation.
*****************************************************************************************************************/
int32_t ARM_USART_Control (uint32_t control, uint32_t arg) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_Control (uint32_t control, uint32_t arg)
\details
The function \b ARM_USART_Control control the USART interface settings and execute various operations.
The parameter \em control sets the operation and is explained in the table below.
Values from different categories can be ORed with the exception of \ref usart_misc_tab "Miscellaneous Operations".
The parameter \em arg provides, depending on the operation, additional information, for example the baudrate.
The table lists the available \em control operations.
<TABLE class="cmtable" summary="">
<TR><TH>Parameter \em control </TH> <TH style="text-align:right"> Bit </TH> <TH> Category </TH> <TH>Description </TH></TR>
<TR><TD>\ref ARM_USART_MODE_ASYNCHRONOUS</TD> <td rowspan="6" style="text-align:right"> 0..7 </td> <td rowspan="6"> Operation Mode </td><TD>Set to asynchronous UART mode. \em arg specifies baudrate.</TD></TR>
<TR><TD>\ref ARM_USART_MODE_SYNCHRONOUS_MASTER</TD> <TD>Set to synchronous master mode with clock signal generation. \em arg specifies baudrate.</TD></TR>
<TR><TD>\ref ARM_USART_MODE_SYNCHRONOUS_SLAVE</TD> <TD>Set to synchronous slave mode with external clock signal.</TD></TR>
<TR><TD>\ref ARM_USART_MODE_SINGLE_WIRE</TD> <TD>Set to single-wire (half-duplex) mode. \em arg specifies baudrate.</TD></TR>
<TR><TD>\ref ARM_USART_MODE_IRDA</TD> <TD>Set to Infra-red data mode. \em arg specifies baudrate.</TD></TR>
<TR><TD>\ref ARM_USART_MODE_SMART_CARD</TD> <TD>Set to Smart Card mode. \em arg specifies baudrate.</TD></TR>
<TR><TD>\ref ARM_USART_DATA_BITS_5</TD> <td rowspan="5" style="text-align:right"> 8..11 </td> <td rowspan="5"> Data Bits </td><TD>Set to \token{5} data bits</TD></TR>
<TR><TD>\ref ARM_USART_DATA_BITS_6</TD> <TD>Set to \token{6} data bits</TD></TR>
<TR><TD>\ref ARM_USART_DATA_BITS_7</TD> <TD>Set to \token{7} data bits</TD></TR>
<TR><TD>\ref ARM_USART_DATA_BITS_8</TD> <TD>Set to \token{8} data bits (default)</TD></TR>
<TR><TD>\ref ARM_USART_DATA_BITS_9</TD> <TD>Set to \token{9} data bits</TD></TR>
<TR><TD>\ref ARM_USART_PARITY_EVEN</TD> <td rowspan="3" style="text-align:right"> 12..13 </td> <td rowspan="3"> Parity Bit </td><TD>Set to Even Parity</TD></TR>
<TR><TD>\ref ARM_USART_PARITY_NONE</TD> <TD>Set to No Parity (default)</TD></TR>
<TR><TD>\ref ARM_USART_PARITY_ODD</TD> <TD>Set to Odd Parity</TD></TR>
<TR><TD>\ref ARM_USART_STOP_BITS_1</TD> <td rowspan="4" style="text-align:right"> 14..15 </td> <td rowspan="4"> Stop Bit </td><TD>Set to \token{1} Stop bit (default)</TD></TR>
<TR><TD>\ref ARM_USART_STOP_BITS_2</TD> <TD>Set to \token{2} Stop bits</TD></TR>
<TR><TD>\ref ARM_USART_STOP_BITS_1_5</TD> <TD>Set to \token{1.5} Stop bits</TD></TR>
<TR><TD>\ref ARM_USART_STOP_BITS_0_5</TD> <TD>Set to \token{0.5} Stop bits</TD></TR>
<TR><TD>\ref ARM_USART_FLOW_CONTROL_NONE</TD> <td rowspan="4" style="text-align:right"> 16..17 </td> <td rowspan="4"> Flow Control </td><TD>No flow control signal (default)</TD></TR>
<TR><TD>\ref ARM_USART_FLOW_CONTROL_CTS</TD> <TD>Set to use the CTS flow control signal</TD></TR>
<TR><TD>\ref ARM_USART_FLOW_CONTROL_RTS</TD> <TD>Set to use the RTS flow control signal</TD></TR>
<TR><TD>\ref ARM_USART_FLOW_CONTROL_RTS_CTS</TD> <TD>Set to use the RTS and CTS flow control signal</TD></TR>
<TR><TD>\ref ARM_USART_CPOL0</TD> <td rowspan="2" style="text-align:right"> 18 </td> <td rowspan="2"> Clock Polarity </td><TD>CPOL=\token{0} (default) : data are captured on rising edge (low->high transition)</TD></TR>
<TR><TD>\ref ARM_USART_CPOL1</TD> <TD>CPOL=\token{1} : data are captured on falling edge (high->low transition)</TD></TR>
<TR><TD>\ref ARM_USART_CPHA0</TD> <td rowspan="2" style="text-align:right"> 19 </td> <td rowspan="2"> Clock Phase </td><TD>CPHA=\token{0} (default) : sample on first (leading) edge</TD></TR>
<TR><TD>\ref ARM_USART_CPHA1</TD> <TD>CPHA=\token{1} : sample on second (trailing) edge</TD></TR>
<TR><TD>\ref ARM_USART_ABORT_RECEIVE</TD> <td rowspan="11" style="text-align:right"> 0..19 </td> <td rowspan="11"> \anchor usart_misc_tab Miscellaneous Operations <br>(cannot be ORed) </td><TD>Abort receive operation (see also: \ref ARM_USART_Receive)</TD></TR>
<TR> <TD>\ref ARM_USART_ABORT_SEND</TD> <TD>Abort send operation (see also: \ref ARM_USART_Send)</TD></TR>
<TR> <TD>\ref ARM_USART_ABORT_TRANSFER</TD> <TD>Abort transfer operation (see also: \ref ARM_USART_Transfer)</TD></TR>
<TR> <TD>\ref ARM_USART_CONTROL_BREAK</TD> <TD>Enable or disable continuous Break transmission; \em arg : \token{0=disabled; 1=enabled}</TD></TR>
<TR> <TD>\ref ARM_USART_CONTROL_RX</TD> <TD>Enable or disable receiver; \em arg : \token{0=disabled; 1=enabled} (see also: \ref ARM_USART_Receive; \ref ARM_USART_Transfer)</TD></TR>
<TR> <TD>\ref ARM_USART_CONTROL_SMART_CARD_NACK</TD> <TD>Enable or disable Smart Card NACK generation; \em arg : \token{0=disabled; 1=enabled}</TD></TR>
<TR> <TD>\ref ARM_USART_CONTROL_TX</TD> <TD>Enable or disable transmitter; \em arg : \token{0=disabled; 1=enabled} (see also: \ref ARM_USART_Send; \ref ARM_USART_Transfer)</TD></TR>
<TR> <TD>\ref ARM_USART_SET_DEFAULT_TX_VALUE</TD> <TD>Set the default transmit value (synchronous receive only); \em arg specifies the value. (see also: \ref ARM_USART_Receive)</TD></TR>
<TR> <TD>\ref ARM_USART_SET_IRDA_PULSE</TD> <TD>Set the IrDA pulse value in \token{ns}; \em arg : \token{0=3/16 of bit period}</TD></TR>
<TR> <TD>\ref ARM_USART_SET_SMART_CARD_CLOCK</TD> <TD>Set the Smart Card Clock in \token{Hz}; \em arg : \token{0=Clock not set}</TD></TR>
<TR> <TD>\ref ARM_USART_SET_SMART_CARD_GUARD_TIME</TD> <TD>Set the Smart Card guard time; \em arg = number of bit periods</TD></TR>
</TABLE>
\b Example
\code
extern ARM_DRIVER_USART Driver_USART0;
// configure to UART mode: 8 bits, no parity, 1 stop bit, no flow control, 9600 bps
status = Driver_USART0.Control(ARM_USART_MODE_ASYNCHRONOUS |
ARM_USART_DATA_BITS_8 |
ARM_USART_PARITY_NONE |
ARM_USART_STOP_BITS_1 |
ARM_USART_FLOW_CONTROL_NONE, 9600);
// identical with above settings (default settings removed)
// configure to UART mode: 8 bits, no parity, 1 stop bit, flow control, 9600 bps
status = Driver_USART0.Control(ARM_USART_MODE_ASYNCHRONOUS, 9600);
// enable TX output
status = Driver_USART0.Control(ARM_USART_CONTROL_TX, 1);
// disable RX output
status = Driver_USART0.Control(ARM_USART_CONTROL_RX, 0);
\endcode
*****************************************************************************************************************/
ARM_USART_STATUS ARM_USART_GetStatus (void) {
return { 0 };
}
/**
\fn ARM_USART_STATUS ARM_USART_GetStatus (void)
\details
The function \b ARM_USART_GetStatus retrieves the current USART interface status.
*****************************************************************************************************************/
int32_t ARM_USART_SetModemControl (ARM_USART_MODEM_CONTROL control) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_USART_SetModemControl (ARM_USART_MODEM_CONTROL control)
\details
The function \b ARM_USART_SetModemControl activates or deactivates the selected USART modem control line.
The function \ref ARM_USART_GetModemStatus returns information about status of the modem lines.
*****************************************************************************************************************/
ARM_USART_MODEM_STATUS ARM_USART_GetModemStatus (void) {
return { 0 };
}
/**
\fn ARM_USART_MODEM_STATUS ARM_USART_GetModemStatus (void)
\details
The function \b ARM_USART_GetModemStatus returns the current USART Modem Status lines state.
The function \ref ARM_USART_SetModemControl sets the modem control lines of the USART.
*****************************************************************************************************************/
void ARM_USART_SignalEvent (uint32_t event) {
// function body
}
/**
\fn void ARM_USART_SignalEvent (uint32_t event)
\details
The function \b ARM_USART_SignalEvent is a callback function registered by the function \ref ARM_USART_Initialize.
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_USART_CAPABILITIES, which can be retrieved with the function \ref ARM_USART_GetCapabilities.
The following events can be generated:
<table class="cmtable" summary="">
<tr>
<th> Parameter \em event </th><th> Bit </th><th> Description </th>
<th> supported when ARM_USART_CAPABILITIES </th>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_SEND_COMPLETE </td><td> 0 </td><td> Occurs after call to \ref ARM_USART_Send to indicate that all the data to be sent
was processed by the driver. All the data might have been already transmitted
or parts of it are still queued in transmit buffers. The driver is ready for the next
call to \ref ARM_USART_Send; however USART may still transmit data. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_RECEIVE_COMPLETE </td><td> 1 </td><td> Occurs after call to \ref ARM_USART_Receive to indicate that all the data has been
received. The driver is ready for the next call to \ref ARM_USART_Receive. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_TRANSFER_COMPLETE </td><td> 2 </td><td> Occurs after call to \ref ARM_USART_Transfer to indicate that all the data has been
transferred. The driver is ready for the next call to \ref ARM_USART_Transfer. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_TX_COMPLETE </td><td> 3 </td><td> Occurs after call to \ref ARM_USART_Send to indicate that all the data has been
physically transmitted on the wires. </td>
<td> data field \em event_tx_complete = \token{1} </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_TX_UNDERFLOW </td><td> 4 </td><td> Occurs in synchronous slave mode when data is requested by the master but
send/receive/transfer operation has not been started.
Data field \em rx_underflow = \token{1} of \ref ARM_USART_STATUS. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_RX_OVERFLOW </td><td> 5 </td><td> Occurs when data is lost during receive/transfer operation or when data is lost
because receive operation in asynchronous mode or receive/send/transfer operation in
synchronous slave mode has not been started.
Data field \em rx_overflow = \token{1} of \ref ARM_USART_STATUS. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> ARM_USART_EVENT_RX_TIMEOUT </td><td> 6 </td><td> Occurs during receive when idle time is detected between consecutive characters
(idle time is hardware dependent).</td>
<td> data field \em event_rx_timeout = \token{1} </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_RX_BREAK </td><td> 7 </td><td> Occurs when break is detected during receive.
Data field \em rx_break = \token{1} of \ref ARM_USART_STATUS. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_RX_FRAMING_ERROR </td><td> 8 </td><td> Occurs when framing error is detected during receive.
Data field \em rx_framing_error = \token{1} of \ref ARM_USART_STATUS. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> \ref ARM_USART_EVENT_RX_PARITY_ERROR </td><td> 9 </td><td> Occurs when parity error is detected during receive.
Data field \em rx_parity_error = \token{1} of \ref ARM_USART_STATUS. </td>
<td> <i>always supported</i> </td>
</tr>
<tr>
<td> ARM_USART_EVENT_CTS </td><td> 10 </td><td> Indicates that CTS modem line state has changed.
Data field \em cts of \ref ARM_USART_MODEM_STATUS has changed. </td>
<td> data field \em event_cts = \token{1} and <br>
data field \em cts = \token{1} </td>
</tr>
<tr>
<td> ARM_USART_EVENT_DSR </td><td> 11 </td><td> Indicates that DSR modem line state has changed.
Data field \em dsr of \ref ARM_USART_MODEM_STATUS has changed. </td>
<td> data field \em event_dsr = \token{1} and <br>
data field \em dsr = \token{1} </td>
</tr>
<tr>
<td> ARM_USART_EVENT_DCD </td><td> 12 </td><td> Indicates that DCD modem line state has changed.
Data field \em dcd of \ref ARM_USART_MODEM_STATUS has changed. </td>
<td> data field \em event_dcd = \token{1} and <br>
data field \em dcd = \token{1} </td>
</tr>
<tr>
<td> ARM_USART_EVENT_RI </td><td> 13 </td><td> Indicates that RI modem line state has changed from active to inactive
(trailing edge on RI).
Data field \em ri of \ref ARM_USART_MODEM_STATUS has changed from \token{1} to \token{0}. </td>
<td> data field \em event_ri = \token{1} and <br>
data field \em ri = \token{1} </td>
</tr>
</table>
*****************************************************************************************************************/
/**
@}
*/
// End USART Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_USART.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 8,926 |
```c
#include "Driver_Flash.h"
#include "cmsis_os2.h" // ARM::CMSIS:RTOS2:Keil RTX5
/* Flash driver instance */
extern ARM_DRIVER_FLASH Driver_Flash0;
static ARM_DRIVER_FLASH * flashDev = &Driver_Flash0;
/* CMSIS-RTOS2 Thread Id */
osThreadId_t Flash_Thread_Id;
/* Flash signal event */
void Flash_Callback(uint32_t event)
{
if (event & ARM_FLASH_EVENT_READY) {
/* The read/program/erase operation is completed */
osThreadFlagsSet(Flash_Thread_Id, 1U);
}
if (event & ARM_FLASH_EVENT_ERROR) {
/* The read/program/erase operation is completed with errors */
/* Call debugger or replace with custom error handling */
__breakpoint(0);
}
}
/* CMSIS-RTOS2 Thread */
void Flash_Thread (void *argument)
{
/* Query drivers capabilities */
const ARM_FLASH_CAPABILITIES capabilities = flashDev->GetCapabilities();
/* Initialize Flash device */
if (capabilities.event_ready) {
flashDev->Initialize (&Flash_Callback);
} else {
flashDev->Initialize (NULL);
}
/* Power-on Flash device */
flashDev->PowerControl (ARM_POWER_FULL);
/* Read data taking data_width into account */
uint8_t buf[256U];
flashDev->ReadData (0x1000U, buf, sizeof(buf)>>capabilities.data_width);
/* Wait operation to be completed */
if (capabilities.event_ready) {
osThreadFlagsWait (1U, osFlagsWaitAny, 100U);
} else {
osDelay(100U);
}
/* Switch off gracefully */
flashDev->PowerControl (ARM_POWER_OFF);
flashDev->Uninitialize ();
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Flash_Demo.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 391 |
```c
/**
\defgroup usb_interface_gr USB Interface
\brief USB common definitions (%Driver_USB.h)
\details
The <b>Universal Serial Bus</b> (USB) implements a serial bus for data exchange. It is a host controlled, plug-and-play interface
between a USB host and USB devices using a tiered star topology.
In microcontroller (MCU) applications, the interface is often used to connect a device to a host for data exchange or control purposes.
- Wikipedia offers more information about the <a href="path_to_url" target="_blank"><b>Universal Serial Bus</b></a>.
- The USB Implementers Forum provides detailed documentation under <a href="path_to_url"><b>www.usb.org</b></a>.
<b>Block Diagram</b>
Typically only one USB Device is connected to a USB Host. If several USB devices must be connected to the same USB host, then
the connection must be done via a USB hub.
<p>
\image html USB_Schematics.png "Simplified USB Schema"
</p>
<b>USB API</b>
The following header files define the Application Programming Interface (API) for the USB interface:
- \b %Driver_USB.h : Common definitions of the USBD and USBH interface
- \b %Driver_USBD.h : Driver API for USB Device Peripheral
- \b %Driver_USBH.h : Driver API for USB Host Peripheral
The driver implementation is a typical part of the Device Family Pack (DFP) that supports the
peripherals of the microcontroller family.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_USBD : access struct for USBD driver functions
- \ref ARM_DRIVER_USBH : access struct for USBH driver functions
<hr>
*/
/**
\addtogroup usbd_interface_gr
\ingroup usb_interface_gr
\details
<b>USB Device API</b>
The header file \b Driver_USBD.h defines the API for the <b>USB Device Driver</b> interface used by middleware components.
The driver implementation itself is a typical part of the Device Family Pack, which provides entry points to the interface
as function pointers in the struct \ref ARM_DRIVER_USBD. This structure can be available several times in each interface to control multiple USBD interfaces.
Header file \b Driver_USBD.h also defines callback routines that can be categorized as
<b>device event callbacks</b> and <b>endpoint event callbacks</b>.
Callbacks are called by the driver, in interrupt context when an appropriate event occurs, to signal device related events (\ref USBD_dev_events)
and endpoint related events (\ref USBD_ep_events).
<b>USB Device Function Call Sequence</b>
To use the USBD driver invoke the API functions in the following order:
\msc
a [label="", textcolor="indigo", linecolor="indigo", arclinecolor="red"],
b [label="", textcolor="blue", linecolor="blue", arclinecolor="blue"];
a rbox a [label="Middleware", linecolor="indigo"],
b rbox b [label="USBD Driver", linecolor="blue"];
a=>b [label="ARM_USBD_Initialize", URL="\ref ARM_USBD_Initialize"];
a=>b [label="ARM_USBD_PowerControl (ARM_POWER_FULL)", URL="\ref ARM_USBD_Initialize"];
a=>b [label="ARM_USBD_DeviceConnect", URL="\ref ARM_USBD_DeviceConnect"];
a<=b [label="ARM_USBD_SignalDeviceEvent (ARM_USBD_EVENT_RESET)", URL="\ref ARM_USBD_SignalDeviceEvent", linecolor="orange"];
a=>b [label="ARM_USBD_DeviceGetState", URL="\ref ARM_USBD_DeviceGetState"];
a=>b [label="ARM_USBD_EndpointConfigure", URL="\ref ARM_USBD_EndpointConfigure", linecolor="green"];
--- [label="Repeat and use as needed"];
a=>b [label="ARM_USBD_EndpointTransfer", URL="\ref ARM_USBD_EndpointTransfer", linecolor="green"];
a<=b [label="ARM_USBD_SignalEndpointEvent", URL="\ref ARM_USBD_SignalEndpointEvent", linecolor="orange"];
a=>b [label="ARM_USBD_EndpointTransferGetResult", URL="\ref ARM_USBD_EndpointTransferGetResult", linecolor="green"];
--- [label="Repeat End"];
a=>b [label="ARM_USBD_DeviceDisconnect", URL="\ref ARM_USBD_DeviceDisconnect"];
a=>b [label="ARM_USBD_PowerControl (ARM_POWER_OFF)", URL="\ref ARM_USBD_Initialize"];
a=>b [label="ARM_USBD_Uninitialize", URL="\ref ARM_USBD_Uninitialize"];
\endmsc
*/
/**
\addtogroup usbh_interface_gr
\ingroup usb_interface_gr
\details
<b>USB Host API</b>
The header file \b Driver_USBH.h defines the API for the <b>USB Host Driver</b> interface used by middleware components.
The driver implementation itself is a typical part of the Device Family Pack, which provides entry points to the interface
as function pointers in the struct \ref ARM_DRIVER_USBH. This structure can be available several times in each interface to control multiple USBH interfaces.
\b Driver_USBH.h also defines callback routines, which are categorized in
<b>port event callbacks</b> and <b>pipe event callbacks</b>.
Callbacks are called by the driver, in interrupt context when an appropriate event occurs, to signal port related events (\ref ARM_USBH_SignalPortEvent)
and pipe related events (\ref ARM_USBH_SignalPipeEvent).
\cond
<b>USB Host Function Call Sequence</b>
To use the USBH driver invoke the API functions in the following order:
\msc
a [label="", textcolor="indigo", linecolor="indigo", arclinecolor="red"],
b [label="", textcolor="blue", linecolor="blue", arclinecolor="blue"];
a rbox a [label="Middleware", linecolor="indigo"],
b rbox b [label="USBH Driver", linecolor="blue"];
a=>b [label="ARM_USBH_Initialize", URL="\ref ARM_USBD_Initialize"];
--- [label="Repeat and use as needed"];
--- [label="Repeat End"];
a=>b [label="ARM_USBH_Uninitialize", URL="\ref ARM_USBH_Uninitialize"];
\endmsc
<hr>
\endcond
*/
/**
\defgroup USB_speed USB Speed
\ingroup usb_interface_gr
\brief USB Speed definitions
\details
The following USB speed values are defined:
@{
\def ARM_USB_SPEED_LOW
\def ARM_USB_SPEED_FULL
\def ARM_USB_SPEED_HIGH
@}
*/
/**
\defgroup USB_endpoint_type USB Endpoint Type
\ingroup usb_interface_gr
\brief USB Endpoint Type definitions
\details
The following USB Endpoint Type values are defined:
@{
\def ARM_USB_ENDPOINT_CONTROL
\def ARM_USB_ENDPOINT_ISOCHRONOUS
\def ARM_USB_ENDPOINT_BULK
\def ARM_USB_ENDPOINT_INTERRUPT
@}
*/
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_USB.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,504 |
```c
#include "Driver_MCI.h"
/* Usage example: ARM_MCI_Initialize ----------------------------------------*/
// ARM_MCI_SignalEvent callback function prototype
void MCI_SignalEvent_Callback (uint32_t event);
void init_driver (ARM_DRIVER_MCI *drv) {
int32_t status;
status = drv->Initialize (&MCI_SignalEvent_Callback);
if (status != ARM_DRIVER_OK) {
// Initialization and event callback registration failed
}
}
/* Usage example: ARM_MCI_Uninitialize --------------------------------------*/
void uninit_driver (ARM_DRIVER_MCI *drv) {
int32_t status;
status = drv->Uninitialize ();
if (status == ARM_DRIVER_OK) {
// Driver successfully uninitialized
}
}
/* Usage example: ARM_MCI_PowerControl --------------------------------------*/
void control_driver_power (ARM_DRIVER_MCI *drv, bool enable) {
int32_t status;
if (enable == true) {
status = drv->PowerControl (ARM_POWER_FULL);
}
else {
status = drv->PowerControl (ARM_POWER_OFF);
}
if (status == ARM_DRIVER_OK) {
// Driver power enabled/disabled
}
}
/* Usage example: ARM_MCI_CardPower -----------------------------------------*/
ARM_MCI_CAPABILITIES drv_capabilities;
void set_card_vdd_3v3 (ARM_DRIVER_MCI *drv) {
int32_t status;
if (drv_capabilities.vdd == 1U) {
// Power switching to 3.3V supported
status = drv->CardPower (ARM_MCI_POWER_VDD_3V3);
if (status == ARM_DRIVER_OK) {
// Card power set to 3.3V
}
}
}
/* Usage example: ARM_MCI_ReadCD --------------------------------------------*/
void read_card_detect_state (ARM_DRIVER_MCI *drv) {
int32_t status;
status = drv->ReadCD();
if (status == 1) {
// Memory card is detected
}
else {
if (status == 0) {
// Memory card is not detected
}
else {
// Error reading card detect pin state
}
}
}
/* Usage example: ARM_MCI_ReadWP --------------------------------------------*/
void read_write_protect_state (ARM_DRIVER_MCI *drv) {
int32_t status;
status = drv->ReadWP();
if (status == 1) {
// Memory card write protection is enabled
}
else {
if (status == 0) {
// Memory card write protection is disabled
}
else {
// Error reading write protect pin state
}
}
}
/* Usage example: ARM_MCI_SendCommand ---------------------------------------*/
volatile uint32_t MCI_Events;
void MCI_SignalEvent_Callback (uint32_t event) {
// Save current event
MCI_Events |= event;
}
void send_CMD0 (ARM_DRIVER_MCI *drv) {
int32_t status;
uint32_t cmd;
MCI_Events = 0U; //Clear MCI driver event flags
cmd = 0U; // Set GO_IDLE_STATE command code
status = drv->SendCommand (cmd, 0U, ARM_MCI_CARD_INITIALIZE | ARM_MCI_RESPONSE_NONE, NULL);
if (status == ARM_DRIVER_OK) {
/* Wait for event */
while ((MCI_Events & ARM_MCI_EVENT_COMMAND_COMPLETE) == 0U);
// Command was successfully sent to memory card
// ..
}
else {
// Error
}
}
/* Usage example: ARM_MCI_SetupTransfer -------------------------------------*/
volatile uint32_t MCI_Events;
void MCI_SignalEvent_Callback (uint32_t event) {
MCI_Events |= event; // Save current event
}
void read_sector (ARM_DRIVER_MCI *drv, uint8_t *buf, uint32_t sz) {
int32_t status;
uint32_t cmd, arg;
uint32_t resp;
if (sz < 512U) {
// Invalid buffer size, sector consists of 512 bytes
//...
}
status = drv->SetupTransfer (buf, 1U, 512U, ARM_MCI_TRANSFER_READ | ARM_MCI_TRANSFER_BLOCK);
if (status == ARM_DRIVER_OK) {
MCI_Events = 0U; //Clear MCI driver event flags
cmd = 17U; // Set READ_SINGLE_BLOCK command
arg = 0U; // Set sector number
status = drv->SendCommand (cmd, arg, ARM_MCI_RESPONSE_SHORT | ARM_MCI_RESPONSE_CRC | ARM_MCI_TRANSFER_DATA, &resp);
if (status == ARM_DRIVER_OK) {
/* Wait for event */
while ((MCI_Events & ARM_MCI_EVENT_COMMAND_COMPLETE) == 0U);
// Command was successfully sent to memory card
if ((resp & 0x03U) == 0U) {
// Sector number is valid, wait until data transfer completes
while ((MCI_Events & ARM_MCI_EVENT_TRANSFER_COMPLETE) == 0U);
// Data was successfully read from memory card
// ...
}
}
}
}
/* Usage example: ARM_MCI_AbortTransfer -------------------------------------*/
void abort_data_transfer (ARM_DRIVER_MCI *drv) {
ARM_MCI_STATUS drv_status;
drv_status = drv->GetStatus();
if (drv_status.transfer_active == 1U) {
// Data transfer is active, abort the transfer
if (drv->AbortTransfer() == ARM_DRIVER_OK) {
// Transfer aborted
// ...
}
}
}
/* Usage example: ARM_MCI_GetStatus -----------------------------------------*/
void check_transfer_status (ARM_DRIVER_MCI *drv) {
ARM_MCI_STATUS drv_status;
drv_status = drv->GetStatus();
if (drv_status.transfer_active == 1U) {
// Data transfer is active
}
if (drv_status.transfer_timeout == 1U) {
// Data not received, timeout expired
}
if (drv_status.transfer_error == 1U) {
// Data transfer ended with error
}
}
/* Usage example: ARM_MCI_SignalEvent ---------------------------------------*/
void MCI_SignalEvent_Callback (uint32_t event) {
if ((event & ARM_MCI_EVENT_CARD_INSERTED) != 0U) {
// Memory card was inserted into socket
}
if ((event & ARM_MCI_EVENT_CARD_REMOVED) != 0U) {
// Memory card was removed from socket
}
if ((event & ARM_MCI_EVENT_COMMAND_COMPLETE) != 0U) {
// Command was successfully sent to memory card
}
if ((event & ARM_MCI_EVENT_COMMAND_TIMEOUT) != 0U) {
// Command response was not received in time
}
if ((event & ARM_MCI_EVENT_COMMAND_ERROR) != 0U) {
// Command response was invalid
}
if ((event & ARM_MCI_EVENT_TRANSFER_COMPLETE) != 0U) {
// Data successfully transferred from/to memory card
}
if ((event & ARM_MCI_EVENT_TRANSFER_TIMEOUT) != 0U) {
// Data not transferred from/to memory card, timeout expired
}
if ((event & ARM_MCI_EVENT_TRANSFER_ERROR) != 0U) {
// Data transfer ended with errors
}
if ((event & ARM_MCI_EVENT_SDIO_INTERRUPT) != 0U) {
// SD I/O card sent interrupt request
}
if ((event & ARM_MCI_EVENT_CCS) != 0U) {
// CE-ATA command completion signal received
}
if ((event & ARM_MCI_EVENT_CCS_TIMEOUT) != 0U) {
// CE-ATA command completion signal wait timeout expired
}
}
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/MCI_Demo.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,709 |
```c
/**
\defgroup eth_mac_interface_gr Ethernet MAC Interface
\ingroup eth_interface_gr
\brief Driver API for Ethernet MAC Peripheral (%Driver_ETH_MAC.h)
\details
The following section describes the Ethernet MAC Interface as defined in the %Driver_ETH_MAC.h header file.
@{
*/
/**
\struct ARM_ETH_MAC_CAPABILITIES
\details
An Ethernet MAC driver can be implemented with different capabilities.
The data fields of this struct encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_ETH_MAC_GetCapabilities
*/
/**
\struct ARM_DRIVER_ETH_MAC
\details
The functions of the Ethernet MAC are accessed by function pointers. Refer to \ref DriverFunctions for
overview information.
Each instance of an Ethernet MAC provides such an access struct. The instance is indicated by
a postfix in the symbol name of the access struct, for example:
- \b Driver_ETH_MAC0 is the name of the access struct of the first instance (no. 0).
- \b Driver_ETH_MAC1 is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_ETH_MAC<i>n</i></b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*/
/**
\struct ARM_ETH_MAC_TIME
\details
The two members of this struct provide fields to encode time values in the order \token{Nano seconds} and \token{seconds}.
The member \em ns is also used as a correction factor for \ref ARM_ETH_MAC_TIMER_ADJUST_CLOCK.
<b>Used in:</b>
- \ref ARM_ETH_MAC_GetRxFrameTime
- \ref ARM_ETH_MAC_GetTxFrameTime
- \ref ARM_ETH_MAC_ControlTimer
*******************************************************************************************************************/
/**
\typedef ARM_ETH_MAC_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_ETH_MAC_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_ETH_MAC_Initialize
*******************************************************************************************************************/
/**
\defgroup ETH_MAC_events Ethernet MAC Events
\ingroup eth_mac_interface_gr
\brief The Ethernet MAC driver generates call back events that are notified via the function \ref ARM_ETH_MAC_SignalEvent.
\details
This section provides the event values for the \ref ARM_ETH_MAC_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_ETH_MAC_EVENT_RX_FRAME
\def ARM_ETH_MAC_EVENT_TX_FRAME
\def ARM_ETH_MAC_EVENT_WAKEUP
\def ARM_ETH_MAC_EVENT_TIMER_ALARM
@}
*/
//
// Function documentation
//
ARM_DRIVER_VERSION ARM_ETH_MAC_GetVersion (void) {
;
}
/**
\fn ARM_DRIVER_VERSION ARM_ETH_MAC_GetVersion (void);
\details
The function \b ARM_ETH_MAC_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_ETH_MAC Driver_ETH_MAC0;
ARM_DRIVER_ETH_MAC *mac;
void setup_ethernet (void) {
ARM_DRIVER_VERSION version;
mac = &Driver_ETH_MAC0;
version = mac->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*******************************************************************************************************************/
ARM_ETH_MAC_CAPABILITIES ARM_ETH_MAC_GetCapabilities (void) {
;
}
/**
\fn ARM_ETH_MAC_CAPABILITIES ARM_ETH_MAC_GetCapabilities (void)
\details
The function \b ARM_ETH_MAC_GetCapabilities retrieves information about capabilities in this driver implementation.
The data fields of the struct \ref ARM_ETH_MAC_CAPABILITIES encode various capabilities, for example
if a hardware is capable to create checksums in hardware or signal events using the \ref ARM_ETH_MAC_SignalEvent
callback function.
Example:
\code
extern ARM_DRIVER_ETH_MAC Driver_ETH_MAC0;
ARM_DRIVER_ETH_MAC *mac;
void read_capabilities (void) {
ARM_ETH_MAC_CAPABILITIES mac_capabilities;
mac = &Driver_ETH_MAC0;
mac_capabilities = mac->GetCapabilities ();
// interrogate capabilities
}
\endcode
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_Initialize (ARM_ETH_MAC_SignalEvent_t cb_event) {
}
/**
\fn int32_t ARM_ETH_MAC_Initialize (ARM_ETH_MAC_SignalEvent_t cb_event)
\details
The function \b ARM_ETH_MAC_Initialize initializes the Ethernet MAC interface.
It is called when the middleware component starts operation.
The \ref ARM_ETH_MAC_Initialize function performs the following operations:
- Initializes the resources needed for the Ethernet MAC peripheral.
- Registers the \ref ARM_ETH_MAC_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_ETH_MAC_SignalEvent callback function; use a NULL pointer
when no callback signals are required.
\b Example:
- see \ref eth_interface_gr - Driver Functions
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_Uninitialize (void) {
}
/**
\fn int32_t ARM_ETH_MAC_Uninitialize (void)
\details
The function \b ARM_ETH_MAC_Uninitialize de-initializes the resources of Ethernet MAC interface.
It is called when the middleware component stops operation and releases the software resources
used by the interface.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_PowerControl (ARM_POWER_STATE state) {
}
/**
\fn int32_t ARM_ETH_MAC_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_ETH_MAC_PowerControl allows you to configure the power modes of the Ethernet MAC interface.
The parameter \em state can be:
- ARM_POWER_OFF: Ethernet MAC peripheral is turned off.
- ARM_POWER_FULL: Ethernet MAC peripheral is turned on and fully operational.
If power \em state specifies an unsupported mode, the function returns \ref ARM_DRIVER_ERROR_UNSUPPORTED as status information
and the previous power state of the peripheral is unchanged. Multiple calls with the same \em state generate no
error.
\b Example:
- see \ref eth_interface_gr - Driver Functions
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_GetMacAddress (ARM_ETH_MAC_ADDR *ptr_addr) {
}
/**
\fn int32_t ARM_ETH_MAC_GetMacAddress (ARM_ETH_MAC_ADDR *ptr_addr)
\details
The function \b ARM_ETH_MAC_GetMacAddress retrieves the Ethernet MAC own address from the driver.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_SetMacAddress (const ARM_ETH_MAC_ADDR *ptr_addr) {
}
/**
\fn int32_t ARM_ETH_MAC_SetMacAddress (const ARM_ETH_MAC_ADDR *ptr_addr)
\details
The function \b ARM_ETH_MAC_SetMacAddress configures Ethernet MAC own address.
The Ethernet MAC accepts packets <a href="path_to_url" target="_blank"><b>Ethernet frames</b></a> which contains
a MAC destination address that matches the address specified with \em ptr_addr.
The Ethernet MAC receiver will accept also packets with addresses configured by \ref ARM_ETH_MAC_SetAddressFilter function.
MAC receiver can be configured to accept also packets with broadcast address, any multicast address or even all packets regardless of address (Promiscuity Mode).
This is configured by function \ref ARM_ETH_MAC_Control with \ref ARM_ETH_MAC_CONFIGURE as control parameter.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_SetAddressFilter (const ARM_ETH_MAC_ADDR *ptr_addr, uint32_t num_addr) {
}
/**
\fn int32_t ARM_ETH_MAC_SetAddressFilter (const ARM_ETH_MAC_ADDR *ptr_addr, uint32_t num_addr)
\details
The function \b ARM_ETH_MAC_SetAddressFilter configures Ethernet MAC receiver address filtering.
The Ethernet MAC accepts packets <a href="path_to_url" target="_blank"><b>Ethernet frames</b></a> which contains
a MAC destination address of the list supplied with \em ptr_addr. The parameter \em ptr_addr provides and array of Ethernet MAC addresses. The number of addresses
is supplied by \em num_addr. Specifying \em num_adr = 0 disables address filtering previously set with this function.
The Ethernet MAC receiver will accept packets addressed to its own address and packets with addresses configured by this function.
MAC receiver can be configured to accept also packets with broadcast address, any multicast address or even all packets regardless of address (Promiscuity Mode).
This is configured by function \ref ARM_ETH_MAC_Control with \ref ARM_ETH_MAC_CONFIGURE as control parameter.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_SendFrame (const uint8_t *frame, uint32_t len, uint32_t flags) {
}
/**
\fn int32_t ARM_ETH_MAC_SendFrame (const uint8_t *frame, uint32_t len, uint32_t flags)
\details
The function \b ARM_ETH_MAC_SendFrame writes an <a href="path_to_url" target="_blank"><b>Ethernet frame</b></a> to the Ethernet MAC transmit buffer.
The Ethernet MAC transmit engine must be enabled by using the function \ref ARM_ETH_MAC_Control (ARM_ETH_MAC_CONTROL_TX, 1) before a call to this function.
The frame data addressed by \em buf starts with MAC destination and ends with the last Payload data byte. The frame data is copied into
the transmit buffer of the Ethernet MAC interface. The function does not wait until the transmission over the Ethernet is complete,
however the memory addressed by \em buf is available for the next Ethernet frame after return.
The maximum value for \em len is implied by the size restrictions of the Ethernet frame but is not verified.
Using an invalid value for \em len may generate unpredicted results.
The parameter \em flags specifies additional attributes for the function as shown in the following table. Multiple flags can be combined, for example:
ARM_ETH_MAC_TX_FRAME_EVENT | ARM_ETH_MAC_TX_FRAME_TIMESTAMP.
Flag bit | Description
:--------------------------------------|:-----------------------------------------
\ref ARM_ETH_MAC_TX_FRAME_FRAGMENT | Indicates that it is a fragment of the frame. allows you to collect multiple fragments before the frame is sent.
\ref ARM_ETH_MAC_TX_FRAME_EVENT | \ref ARM_ETH_MAC_SignalEvent with \em event bit \ref ARM_ETH_MAC_EVENT_TX_FRAME set will be called when frame send is complete.
\ref ARM_ETH_MAC_TX_FRAME_TIMESTAMP | Capture the time stamp of the frame. The time stamp can be obtained using the function \ref ARM_ETH_MAC_GetTxFrameTime.
\b Example:
\code
status = mac->SendFrame (&frame->data[0], frame->length, 0);
if (status != ARM_DRIVER_OK) {
// error handling
}
\endcode
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_ReadFrame (uint8_t *frame, uint32_t len) {
}
/**
\fn int32_t ARM_ETH_MAC_ReadFrame (uint8_t *frame, uint32_t len)
\details
The function \b ARM_ETH_MAC_ReadFrame reads an <a href="path_to_url" target="_blank"><b>Ethernet frame</b></a> from the Ethernet MAC receive buffer.
The Ethernet MAC receive engine must be enabled using the function \ref ARM_ETH_MAC_Control (ARM_ETH_MAC_CONTROL_RX , 1) before a call to this function.
The \em len of the Ethernet frame can be checked using the function \ref ARM_ETH_MAC_GetRxFrameSize.
The frame data addressed by \em buf starts with MAC destination and ends with the last Payload data byte. The frame data is read from
the receive buffer of the Ethernet MAC interface and the number of bytes written into the memory addressed by \em buf is returned.
A negative return value indicates an error whereby the status code is defined with driver common return codes.
The function \ref ARM_ETH_MAC_ReadFrame may be called with \em buf = NULL and \em len = 0 to discard or release an frame. This is useful when an incorrect frame has been received or
no memory is available to hold the Ethernet frame.
\b Example:
\code
size = mac->GetRxFrameSize ();
if ((size < 14) || (size > 1514)) { // frame excludes CRC
mac->ReadFrame (NULL, 0); // Frame error, release it
}
len = mac->ReadFrame (&frame->data[0], size);
if (len < 0) {
// error handling
}
\endcode
*******************************************************************************************************************/
uint32_t ARM_ETH_MAC_GetRxFrameSize (void) {
}
/**
\fn uint32_t ARM_ETH_MAC_GetRxFrameSize (void)
\details
The function \b ARM_ETH_MAC_GetRxFrameSize returns the size of a received
<a href="path_to_url" target="_blank"><b>Ethernet frame</b></a>.
This function is called before \ref ARM_ETH_MAC_ReadFrame and supplies the value \em len.
The frame size includes MAC destination and ends with the last Payload data byte.
Value \em 0 indicates that no Ethernet frame is available in the receive buffer.
Values smaller than minimum size of Ethernet frame or larger than maximum size of Ethernet frame
indicate an invalid frame which needs to be discarded by calling \ref ARM_ETH_MAC_ReadFrame.
\b Example:
- see \ref ARM_ETH_MAC_ReadFrame
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_GetRxFrameTime (ARM_ETH_MAC_TIME *time) {
}
/**
\fn int32_t ARM_ETH_MAC_GetRxFrameTime (ARM_ETH_MAC_TIME *time)
\details
Retrieve time stamp of a received <a href="path_to_url" target="_blank"><b>Ethernet frame</b></a>.
This function must be called before the frame is read using \ref ARM_ETH_MAC_ReadFrame.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_GetTxFrameTime (ARM_ETH_MAC_TIME *time) {
}
/**
\fn int32_t ARM_ETH_MAC_GetTxFrameTime (ARM_ETH_MAC_TIME *time)
\details
The function \b returns the time stamp of a transmitted <a href="path_to_url" target="_blank"><b>Ethernet frame</b></a>.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_Control (uint32_t control, uint32_t arg) {
}
/**
\fn int32_t ARM_ETH_MAC_Control (uint32_t control, uint32_t arg)
\details
The function \b ARM_ETH_MAC_Control controls the Ethernet MAC interface and executes various operations.
After initialization, the Ethernet transceiver and receiver are disabled.
The parameter \em control specifies an operation as defined in the table <b>Parameter \em control</b>. \n
The parameter \em arg provides, depending on the operation, additional information or values.
The table lists values for the parameter \em control.
Parameter \em control | Operation
:----------------------------------------------------|:--------------------------------------------
\ref ARM_ETH_MAC_CONFIGURE | Configure the Ethernet MAC interface; For \em arg values, see table <b>Parameter \em arg for CONFIGURE</b>
\ref ARM_ETH_MAC_CONTROL_TX | Enable or disable the transmitter; \em arg : \token{0=disable; 1=enable}
\ref ARM_ETH_MAC_CONTROL_RX | Enable or disable the receiver; \em arg : \token{0=disable; 1=enable}
\ref ARM_ETH_MAC_FLUSH | Flush a buffer; \em arg : see table <b>Parameter \em arg for FLUSH</b>
\ref ARM_ETH_MAC_SLEEP | Exit/Enter Sleep mode; \em arg : \token{0=exit; 1=enter and wait for Magic packet}
\ref ARM_ETH_MAC_VLAN_FILTER | Configure VLAN Filter for received frames; \em arg : See table <b>Parameter \em arg for VLAN Filter</b>
The table <b>Parameter \em arg for CONFIGURE</b> lists the \em arg values for the \em control \b ARM_ETH_MAC_CONFIGURE.
The values can be ORed in the following way:
\code
mac->Control(ARM_ETH_MAC_CONFIGURE, ARM_ETH_MAC_SPEED_100M | ARM_ETH_MAC_DUPLEX_FULL | ARM_ETH_MAC_LOOPBACK);
\endcode
<table class="cmtable" summary="">
<tr><th colspan="4">Parameter \em arg CONFIGURE </th></tr>
<tr><th>Parameter \em arg </th><th> Bit </th><th> Category </th><th>Description </th></tr>
<tr><td>\ref ARM_ETH_MAC_SPEED_10M </td><td rowspan="3"> 0..1 </td><td rowspan="3">Link Speed </td><td>Set the link speed to \token{10 [Mbps]} </td></tr>
<tr><td>\ref ARM_ETH_MAC_SPEED_100M </td> <td>Set the link speed to \token{100 [Mbps]}</td></tr>
<tr><td>\ref ARM_ETH_MAC_SPEED_1G </td> <td>Set the link speed to \token{1 [Gbps]} </td></tr>
<tr><td>\ref ARM_ETH_MAC_DUPLEX_HALF </td><td rowspan="2"> 2 </td><td rowspan="2">Link Mode </td><td>Set the link mode to half duplex </td></tr>
<tr><td>\ref ARM_ETH_MAC_DUPLEX_FULL </td> <td>Set the link mode to full duplex </td></tr>
<tr><td>n.a. </td><td> 3 </td><td> n.a. </td><td>\em reserved </td></tr>
<tr><td>\ref ARM_ETH_MAC_LOOPBACK </td><td> 4 </td><td> Loopback Test Mode </td><td>Set the interface into a Loop-back test mode</td></tr>
<tr><td>\ref ARM_ETH_MAC_CHECKSUM_OFFLOAD_RX</td><td> 5 </td><td>Receiver Checksum offload</td><td>Enable Receiver Checksum offload </td></tr>
<tr><td>\ref ARM_ETH_MAC_CHECKSUM_OFFLOAD_TX</td><td> 6 </td><td>Transmitter Checksum offload</td><td>Enable Transmitter Checksum offload </td></tr>
<tr><td>\ref ARM_ETH_MAC_ADDRESS_BROADCAST </td><td> 7 </td><td>Broadcast Frame address </td><td>Accept frames with Broadcast address </td></tr>
<tr><td>\ref ARM_ETH_MAC_ADDRESS_MULTICAST </td><td> 8 </td><td>Multicast Frame address </td><td>Accept frames with any Multicast address</td></tr>
<tr><td>\ref ARM_ETH_MAC_ADDRESS_ALL </td><td> 9 </td><td>Any Frame address </td><td>Accept frames with any address (Promiscuous Mode)</td></tr>
</table>
The table <b>Parameter \em arg for FLUSH</b> lists the \em arg values for the \em control \b ARM_ETH_MAC_FLUSH.
The \em arg values can be ORed.
<table class="cmtable" summary="">
<tr><th colspan="4">Parameter \em arg for FLUSH </th></tr>
<tr><th>Parameter \em arg </th><th> Bit </th><th> Category </th><th> Description </th></tr>
<tr><td>\ref ARM_ETH_MAC_FLUSH_RX </td><td> 1 </td><td> Receive buffer </td><td> Flush the Receive buffer </td></tr>
<tr><td>\ref ARM_ETH_MAC_FLUSH_TX </td><td> 2 </td><td> Transmit buffer </td><td> Flush the Transmit buffer </td></tr>
</table>
The table <b>Parameter \em arg for VLAN Filter</b> lists the \em arg values for the \em control \b ARM_ETH_MAC_VLAN_FILTER.
The \em arg values can be ORed.
<table class="cmtable" summary="">
<tr><th colspan="4">Parameter \em arg for VLAN Filter</th></tr>
<tr><th>Parameter \em arg </th><th> Bit </th><th> Category </th><th> Description </th></tr>
<tr><td>\em value </td><td> 0..15 </td><td> VLAN Tag </td><td> Set VLAN Tag value </td></tr>
<tr><td>\token{0} </td><td rowspan="2"> 16 </td><td rowspan="2"> Use of VLAN </td><td> Compare the complete 16-bit VLAN Tag value </td></tr>
<tr><td>\ref ARM_ETH_MAC_VLAN_FILTER_ID_ONLY </td> <td>Compare only the 12-bit VLAN Identifier </td></tr>
<tr><td>\token{0} </td><td> 0..16 </td><td> Disable </td><td> Disable the VLAN Filter </td></tr>
</table>
\b Example:
\code
...
// start transfer
mac->Control(ARM_ETH_MAC_CONFIGURE, ARM_ETH_MAC_SPEED_100M | ARM_ETH_MAC_DUPLEX_FULL | ARM_ETH_MAC_ADDRESS_BROADCAST);
mac->Control(ARM_ETH_MAC_CONTROL_TX, 1);
mac->Control(ARM_ETH_MAC_CONTROL_RX, 1);
... // stop transfer
mac->Control(ARM_ETH_MAC_FLUSH, ARM_ETH_MAC_FLUSH_TX | ARM_ETH_MAC_FLUSH_RX);
mac->Control(ARM_ETH_MAC_CONTROL_TX, 0);
mac->Control(ARM_ETH_MAC_CONTROL_RX, 0);
}
}
\endcode
For a complete example, refer to \ref eth_interface_gr - Driver Functions.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_ControlTimer (uint32_t control, ARM_ETH_MAC_TIME *time) {
}
/**
\fn int32_t ARM_ETH_MAC_ControlTimer (uint32_t control, ARM_ETH_MAC_TIME *time)
\details
The function \b ARM_ETH_MAC_ControlTimer controls the timer required for PTP (Precision Time Protocol).
The parameter \em control receives \b ARM_ETH_MAC_TIMER_xxx codes to manage the timer for a PTP enabled Ethernet MAC interface. \n
The parameter \em time is pointer to a structure that holds time information.
Mode Parameters: Timer Controls | Description
:---------------------------------------|:--------------------------------------------
\ref ARM_ETH_MAC_TIMER_GET_TIME | Retrieve the current time and update the content \ref ARM_ETH_MAC_TIME *time.
\ref ARM_ETH_MAC_TIMER_SET_TIME | Set the new time using the values provided with \ref ARM_ETH_MAC_TIME *time.
\ref ARM_ETH_MAC_TIMER_INC_TIME | Increment the current time by using the values provided with \ref ARM_ETH_MAC_TIME *time.
\ref ARM_ETH_MAC_TIMER_DEC_TIME | Decrement the current time by using the values provided with \ref ARM_ETH_MAC_TIME *time.
\ref ARM_ETH_MAC_TIMER_SET_ALARM | Set the alarm time to the values provided with \ref ARM_ETH_MAC_TIME *time.
\ref ARM_ETH_MAC_TIMER_ADJUST_CLOCK | Set the clock frequency; the value in time->ns is the <b>correction factor</b> in fractional format q31.
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_PHY_Read (uint8_t phy_addr, uint8_t reg_addr, uint16_t *data) {
}
/**
\fn int32_t ARM_ETH_MAC_PHY_Read (uint8_t phy_addr, uint8_t reg_addr, uint16_t *data)
\details
Read Ethernet PHY Register through the Management Interface. The function is passed to \ref ARM_ETH_PHY_Initialize.
The Ethernet PHY driver uses this function to read the value of PHY registers.
\b Example:
- see \ref eth_interface_gr - Driver Functions
*******************************************************************************************************************/
int32_t ARM_ETH_MAC_PHY_Write (uint8_t phy_addr, uint8_t reg_addr, uint16_t data) {
}
/**
\fn int32_t ARM_ETH_MAC_PHY_Write (uint8_t phy_addr, uint8_t reg_addr, uint16_t data)
\details
The function \b ARM_ETH_MAC_PHY_Write writes to a Ethernet PHY register through the Management Interface. The function is passed to \ref ARM_ETH_PHY_Initialize.
The Ethernet PHY driver uses this function to write data to PHY registers.
\b Example:
- see \ref eth_interface_gr - Driver Functions
*******************************************************************************************************************/
void ARM_ETH_MAC_SignalEvent (uint32_t event) {
;
}
/**
\fn void ARM_ETH_MAC_SignalEvent (uint32_t event)
\details
The function \b ARM_ETH_MAC_SignalEvent is a callback function registered by the function
\ref ARM_ETH_MAC_Initialize. This function is typically called from interrupt service routines (ISR) to indicate that
a frame is processed or a special event occurred.
The parameter \a event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_ETH_MAC_CAPABILITIES, which can be retrieved with the function \ref ARM_ETH_MAC_GetCapabilities.
The following events can be generated:
Parameter \em event | Bit | Description
:----------------------------------------|:---:|:----------------------------------------
\ref ARM_ETH_MAC_EVENT_RX_FRAME | 0 | Occurs after a frame is received. Frame can be read by calling \ref ARM_ETH_MAC_ReadFrame.
\ref ARM_ETH_MAC_EVENT_TX_FRAME | 1 | Occurs after call to \ref ARM_ETH_MAC_SendFrame to indicate that the frame is transmitted.
\ref ARM_ETH_MAC_EVENT_WAKEUP | 2 | Indicates that a Magic Packet is received while the driver is in Sleep mode (set by \ref ARM_ETH_MAC_SLEEP using \ref ARM_ETH_MAC_Control).
\ref ARM_ETH_MAC_EVENT_TIMER_ALARM | 3 | Indicates that a Timer Alarm occurred that was set with \ref ARM_ETH_MAC_TIMER_SET_ALARM using ARM_ETH_MAC_ControlTimer.
*******************************************************************************************************************/
/**
\defgroup eth_mac_control Ethernet MAC Control Codes
\ingroup eth_mac_interface_gr
\brief Configure and control the Ethernet MAC using the \ref ARM_ETH_MAC_Control.
\details
@{
Many parameters of the Ethernet MAC driver are configured using the \ref ARM_ETH_MAC_Control function.
The various Ethernet MAC control codes define:
- \ref eth_mac_ctrls configures and controls the Ethernet MAC interface
- \ref eth_mac_configuration_ctrls specifies speed mode, link mode, checksum, and frame filtering modes
- \ref eth_mac_flush_flag_ctrls specify controls to flush a buffer
- \ref eth_mac_vlan_filter_ctrls specifies whether to compare only the VLAN Identifier
Refer to the \ref ARM_ETH_MAC_Control function for further details.
*/
/**
\defgroup eth_mac_ctrls Ethernet MAC Controls
\brief Configure and control the Ethernet MAC interface.
\details
@{
\def ARM_ETH_MAC_CONFIGURE
\sa ARM_ETH_MAC_Control
\def ARM_ETH_MAC_CONTROL_TX
\sa ARM_ETH_MAC_Control
\def ARM_ETH_MAC_CONTROL_RX
\sa ARM_ETH_MAC_Control
\def ARM_ETH_MAC_FLUSH
\sa ARM_ETH_MAC_Control
\def ARM_ETH_MAC_SLEEP
\sa ARM_ETH_MAC_Control
\def ARM_ETH_MAC_VLAN_FILTER
\sa ARM_ETH_MAC_Control
@}
*/
/**
\defgroup eth_mac_configuration_ctrls Ethernet MAC Configuration
\brief Specifies speed mode, link mode, checksum, and frame filtering modes.
\details
@{
The function \ref ARM_ETH_MAC_Control with \em control = \ref ARM_ETH_MAC_CONFIGURE configures the Ethernet MAC interface
as specified with \em arg listed bellow.
\def ARM_ETH_MAC_SPEED_10M
\def ARM_ETH_MAC_SPEED_100M
\def ARM_ETH_MAC_SPEED_1G
\def ARM_ETH_MAC_DUPLEX_HALF
\def ARM_ETH_MAC_DUPLEX_FULL
\def ARM_ETH_MAC_LOOPBACK
\def ARM_ETH_MAC_CHECKSUM_OFFLOAD_RX
\def ARM_ETH_MAC_CHECKSUM_OFFLOAD_TX
\def ARM_ETH_MAC_ADDRESS_BROADCAST
\def ARM_ETH_MAC_ADDRESS_MULTICAST
\def ARM_ETH_MAC_ADDRESS_ALL
@}
*/
/**
\defgroup eth_mac_flush_flag_ctrls Ethernet MAC Flush Flags
\brief Specify controls to flush a buffer
\details
@{
The function \ref ARM_ETH_MAC_Control with \em control = \ref ARM_ETH_MAC_FLUSH flushes the buffer
which is specified with \em arg listed bellow.
\def ARM_ETH_MAC_FLUSH_RX
\def ARM_ETH_MAC_FLUSH_TX
@}
*/
/**
\defgroup eth_mac_vlan_filter_ctrls Ethernet MAC VLAN Filter Flag
\brief Specify whether to compare only the VLAN Identifier
\details
@{
The function \ref ARM_ETH_MAC_Control with \em control = \ref ARM_ETH_MAC_VLAN_FILTER configures the VLAN Filter for received frames as specified with \em arg.
By default the complete VLAN Tag (16-bit) is compared. When \ref ARM_ETH_MAC_VLAN_FILTER_ID_ONLY is specified then only the VLAN Identifier (12-bit) is compared.
Specifying \em arg=0 disables the VLAN Filter.
\def ARM_ETH_MAC_VLAN_FILTER_ID_ONLY
@}
*/
/**
@} */ // end group eth_mac_control
/**
\defgroup eth_mac_time_control Ethernet MAC Timer Control Codes
\ingroup eth_mac_interface_gr
\brief Control codes for \ref ARM_ETH_MAC_ControlTimer function.
\details
The following timer controls are used as parameter \em control for the \ref ARM_ETH_MAC_ControlTimer function:
@{
\def ARM_ETH_MAC_TIMER_GET_TIME
\sa ARM_ETH_MAC_ControlTimer
\def ARM_ETH_MAC_TIMER_SET_TIME
\sa ARM_ETH_MAC_ControlTimer
\def ARM_ETH_MAC_TIMER_INC_TIME
\sa ARM_ETH_MAC_ControlTimer
\def ARM_ETH_MAC_TIMER_DEC_TIME
\sa ARM_ETH_MAC_ControlTimer
\def ARM_ETH_MAC_TIMER_SET_ALARM
\sa ARM_ETH_MAC_ControlTimer
\def ARM_ETH_MAC_TIMER_ADJUST_CLOCK
\sa ARM_ETH_MAC_ControlTimer
@}
*/
/**
\defgroup eth_mac_frame_transmit_ctrls Ethernet MAC Frame Transmit Flags
\brief Specify frame transmit flags
\details
@{
\def ARM_ETH_MAC_TX_FRAME_FRAGMENT
\sa ARM_ETH_MAC_SendFrame
\def ARM_ETH_MAC_TX_FRAME_EVENT
\sa ARM_ETH_MAC_SendFrame
\def ARM_ETH_MAC_TX_FRAME_TIMESTAMP
\sa ARM_ETH_MAC_SendFrame
@}
*/
/**
@}
*/
// End ETH MAC Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_ETH_MAC.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 6,588 |
```c
/**
\defgroup mci_interface_gr MCI Interface
\brief Driver API for Memory Card Interface using SD/MMC interface (%Driver_MCI.h)
\details
The <b>Memory Card Interface</b> (MCI) implements the hardware abstraction layer for Secure Digital (SD) and Multi Media Card (MMC)
memory that is typically used as file storage. For embedded systems, SD/MMC devices are available as memory cards in several
forms (SD, miniSD, microSD, MMC, MMCmicro) or as non-removable device
es that are directly soldered to the PCB (eMMC).
\b References:
- Wikipedia offers more information about the <a href="path_to_url" target="_blank"><b>Secure Digital</b> memory</a>.
- Wikipedia offers more information about the <a href="path_to_url" target="_blank"><b>MultiMediaCard</b></a>.
- The SD Association provides detailed documentation under <a href="path_to_url">www.sdcard.org</a>.
- The MultiMediaCard Association (merged with JEDEC) provides detailed documentation under <a href="path_to_url">www.jedec.org</a>.
<b>Block Diagram</b>
The MCI driver allows you to exchange data of the SD/MMC memory via SD/MMC interface.
The following modes are supported by SD/MMC memory cards:
- SPI bus mode: Serial Peripheral Interface Bus supported by most microcontrollers.
- 1-bit SD/MMC Bus mode: proprietary data transfer protocol supported by SD/MMC interfaces.
- 4-bit SD/MMC Bus mode: high-speed version of the SD/MMC interface using 4 data I/O pins.
- 8-bit SD/MMC Bus mode: high-speed version of the SD/MMC interface using 8 data I/O pins.
\image html SPI_BusMode.png "SD memory connected via SPI interface"
<p> </p>
\image html SD_1BitBusMode.png "SD memory connected via 1-bit SD Bus Mode"
<p> </p>
\image html SD_4BitBusMode.png "SD memory connected via 4-bit SD Bus Mode"
<b>MCI API</b>
The following header files define the Application Programming Interface (API) for the MCI interface:
- \b %Driver_MCI.h : Driver API for Memory Card Interface using SD/MMC interface
The driver implementation is a typical part of the Device Family Pack (DFP) that supports the
peripherals of the microcontroller family.
\note
For parameters, the value marked with (default) is the setting after the driver initialization.
<b>Driver Functions</b>
The driver functions are published in the access struct as explained in \ref DriverFunctions
- \ref ARM_DRIVER_MCI : access struct for MCI driver functions
<b>Example Code</b>
The following example code shows the usage of the MCI interface.
\include MCI_Demo.c
@{
*/
/************* Structures ******************************************************************************************************/
/**
\struct ARM_DRIVER_MCI
\details
The functions of the MCI are accessed by function pointers exposed by this structure. Refer to \ref DriverFunctions for overview information.
Each instance of an MCI provides such an access structure.
The instance is identified by a postfix number in the symbol name of the access structure, for example:
- \b Driver_MCI0 is the name of the access struct of the first instance (no. 0).
- \b Driver_MCI1 is the name of the access struct of the second instance (no. 1).
A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_MCI<i>n</i></b>.
The default is \token{0}, which connects a middleware to the first instance of a driver.
*******************************************************************************************************************/
/**
\struct ARM_MCI_CAPABILITIES
\details
A MCI driver can be implemented with different capabilities.
The data fields of this struct encode the capabilities implemented by this driver.
<b>Returned by:</b>
- \ref ARM_MCI_GetCapabilities
*******************************************************************************************************************/
/**
\defgroup mci_event_gr MCI Events
\brief The MCI driver generates call back events that are notified via the function \ref ARM_MCI_SignalEvent.
\details
This section provides the event values for the \ref ARM_MCI_SignalEvent callback function.
The following call back notification events are generated:
@{
\def ARM_MCI_EVENT_CARD_INSERTED
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_CARD_REMOVED
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_COMMAND_COMPLETE
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_COMMAND_TIMEOUT
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_COMMAND_ERROR
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_TRANSFER_COMPLETE
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_TRANSFER_TIMEOUT
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_TRANSFER_ERROR
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_SDIO_INTERRUPT
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_CCS
\sa \ref ARM_MCI_SignalEvent
\def ARM_MCI_EVENT_CCS_TIMEOUT
\sa \ref ARM_MCI_SignalEvent
@}
*******************************************************************************************************************/
//open mci_contorl_gr
/**
@{
*/
/**
\defgroup mci_control_gr MCI Control Codes
\ingroup mci_interface_gr
\brief Configure and control the MCI using the \ref ARM_MCI_Control.
\details
@{
Many parameters of the MCI driver are configured using the \ref ARM_MCI_Control function.
The various MCI control codes define:
- \ref mci_mode_ctrls configures and controls the MCI interface
- \ref mci_bus_speed_ctrls specifies the bus speed mode
- \ref mci_bus_data_width_ctrls specifies the data bus width
- \ref mci_cmd_line_ctrls specifies the CMD line mode
- \ref mci_driver_strength_ctrls specifies the driver strength
Refer to the function \ref ARM_MCI_Control for further details.
@}
*******************************************************************************************************************/
/**
\defgroup mci_mode_ctrls MCI Controls
\ingroup mci_control_gr
\brief Configure and control the MCI interface.
\details
The following codes are used as values for the parameter \em control of the function \ref ARM_MCI_Control to setup the MCI interface.
@{
\def ARM_MCI_BUS_SPEED
\def ARM_MCI_BUS_SPEED_MODE
\def ARM_MCI_BUS_CMD_MODE
\def ARM_MCI_BUS_DATA_WIDTH
\def ARM_MCI_DRIVER_STRENGTH
\def ARM_MCI_CONTROL_RESET
\def ARM_MCI_CONTROL_CLOCK_IDLE
\def ARM_MCI_UHS_TUNING_OPERATION
\def ARM_MCI_UHS_TUNING_RESULT
\def ARM_MCI_DATA_TIMEOUT
\def ARM_MCI_CSS_TIMEOUT
\def ARM_MCI_MONITOR_SDIO_INTERRUPT
\def ARM_MCI_CONTROL_READ_WAIT
\def ARM_MCI_SUSPEND_TRANSFER
\def ARM_MCI_RESUME_TRANSFER
@}
*******************************************************************************************************************/
/**
\defgroup mci_bus_speed_ctrls MCI Bus Speed Mode
\ingroup mci_control_gr
\brief Specify the bus speed mode.
\details
@{
The function \ref ARM_MCI_Control with \em control = \ref ARM_MCI_BUS_SPEED configures the bus speed of the MCI to the
requested bits/s specified with \em arg.
The function \ref ARM_MCI_Control with \em control = \ref ARM_MCI_BUS_SPEED_MODE configures the bus speed mode of the MCI
as specified with \em arg listed bellow.
The function \ref ARM_MCI_GetCapabilities lists the supported bus speed modes. Initially, all SD cards use a 3.3 volt electrical interface.
Some SD cards can switch to 1.8 volt operation. For example, the use of ultra-high-speed (UHS)
SD cards requires 1.8 volt operation and a 4-bit bus data width. The data field \em uhs_signaling of the structure ARM_MCI_CAPABILITIES encodes
whether the driver supports 1.8 volt UHS signaling.
\sa
- \ref mci_driver_strength_ctrls
The following codes are defined:
\def ARM_MCI_BUS_DEFAULT_SPEED
\def ARM_MCI_BUS_HIGH_SPEED
\def ARM_MCI_BUS_UHS_SDR12
\def ARM_MCI_BUS_UHS_SDR25
\def ARM_MCI_BUS_UHS_SDR50
\def ARM_MCI_BUS_UHS_SDR104
\def ARM_MCI_BUS_UHS_DDR50
@}
*******************************************************************************************************************/
/**
\defgroup mci_bus_data_width_ctrls MCI Bus Data Width
\ingroup mci_control_gr
\brief Specify the data bus width.
\details
@{
The function \ref ARM_MCI_Control with \em control = \ref ARM_MCI_BUS_DATA_WIDTH specifies with \em arg the number of data I/O pins on the SD/MMC interface.
For high-speed memory cards, a 4-bit bus data width should be used (or 8-bit for eMMC). The data fields \em data_width_4 and \em data_width_8
of the structure ARM_MCI_CAPABILITIES encode whether the driver supports a specific bus data with.
The following codes are defined:
\def ARM_MCI_BUS_DATA_WIDTH_1
\def ARM_MCI_BUS_DATA_WIDTH_4
\def ARM_MCI_BUS_DATA_WIDTH_8
\def ARM_MCI_BUS_DATA_WIDTH_4_DDR
\def ARM_MCI_BUS_DATA_WIDTH_8_DDR
@}
*******************************************************************************************************************/
/**
\defgroup mci_cmd_line_ctrls MCI CMD Line Mode
\ingroup mci_control_gr
\brief Specify the CMD line mode (Push-Pull or Open Drain).
\details
@{
Set the CMD line type with the function \ref ARM_MCI_Control.
The CMD line mode is push-pull (default) or open drain (needed for older MMC).
\def ARM_MCI_BUS_CMD_PUSH_PULL
\def ARM_MCI_BUS_CMD_OPEN_DRAIN
@}
*******************************************************************************************************************/
/**
\defgroup mci_driver_strength_ctrls MCI Driver Strength
\ingroup mci_control_gr
\brief Specify the driver strength.
\details
@{
The function \ref ARM_MCI_Control with \em control = \ref ARM_MCI_DRIVER_STRENGTH specifies with \em arg the driver type of the SD interface.
\sa
- \ref mci_bus_speed_ctrls
The following codes are defined:
\def ARM_MCI_DRIVER_TYPE_A
\def ARM_MCI_DRIVER_TYPE_B
\def ARM_MCI_DRIVER_TYPE_C
\def ARM_MCI_DRIVER_TYPE_D
@}
*******************************************************************************************************************/
/**
@}
*/ // close group mci_control_gr
/**
\defgroup mci_send_command_flags_ctrls MCI Send Command Flags
\ingroup mci_interface_gr
\brief Specify various options for sending commands to the card and the expected response.
\details
\b ARM_MCI_xxx flags are sent with the function \ref ARM_MCI_SendCommand as the parameter \em flag.
It controls the behavior of the command sent to the card and provides information about the expected response from the card.
The following codes are defined:
@{
\def ARM_MCI_RESPONSE_NONE
\def ARM_MCI_RESPONSE_SHORT
\def ARM_MCI_RESPONSE_SHORT_BUSY
\def ARM_MCI_RESPONSE_LONG
\def ARM_MCI_RESPONSE_INDEX
\def ARM_MCI_RESPONSE_CRC
\def ARM_MCI_WAIT_BUSY
\def ARM_MCI_TRANSFER_DATA
\def ARM_MCI_CARD_INITIALIZE
\def ARM_MCI_INTERRUPT_COMMAND
\def ARM_MCI_INTERRUPT_RESPONSE
\def ARM_MCI_BOOT_OPERATION
\def ARM_MCI_BOOT_ALTERNATIVE
\def ARM_MCI_BOOT_ACK
\def ARM_MCI_CCSD
\def ARM_MCI_CCS
@}
*******************************************************************************************************************/
/**
\defgroup mci_transfer_ctrls MCI Transfer Controls
\ingroup mci_interface_gr
\brief Specify data transfer mode.
\details
Data transfer codes specifies the transfer direction and type and are used with the function \ref ARM_MCI_SetupTransfer as the parameter \em mode.
The following codes are defined:
@{
\def ARM_MCI_TRANSFER_READ
\def ARM_MCI_TRANSFER_WRITE
\def ARM_MCI_TRANSFER_BLOCK
\def ARM_MCI_TRANSFER_STREAM
@}
*******************************************************************************************************************/
/**
\defgroup mci_card_power_ctrls MCI Card Power Controls
\ingroup mci_interface_gr
\brief Specify Memory Card Power supply voltage
\details
Specifies the power supply volatge for a memory card. Used with the function \ref ARM_MCI_CardPower as the parameter \em voltage.
The following codes are defined:
@{
\def ARM_MCI_POWER_VDD_OFF
\def ARM_MCI_POWER_VDD_3V3
\def ARM_MCI_POWER_VDD_1V8
\def ARM_MCI_POWER_VCCQ_OFF
\def ARM_MCI_POWER_VCCQ_3V3
\def ARM_MCI_POWER_VCCQ_1V8
\def ARM_MCI_POWER_VCCQ_1V2
@}
*******************************************************************************************************************/
/**
\struct ARM_MCI_STATUS
\details
Structure with information about the status of the MCI.
<b>Returned by:</b>
- \ref ARM_MCI_GetStatus
*******************************************************************************************************************/
/**
\typedef ARM_MCI_SignalEvent_t
\details
Provides the typedef for the callback function \ref ARM_MCI_SignalEvent.
<b>Parameter for:</b>
- \ref ARM_MCI_Initialize
*******************************************************************************************************************/
//
// Functions
//
ARM_DRIVER_VERSION ARM_MCI_GetVersion (void) {
return { 0, 0 };
}
/**
\fn ARM_DRIVER_VERSION ARM_MCI_GetVersion (void)
\details
The function \b ARM_MCI_GetVersion returns version information of the driver implementation in \ref ARM_DRIVER_VERSION
- API version is the version of the CMSIS-Driver specification used to implement this driver.
- Driver version is source code version of the actual driver implementation.
Example:
\code
extern ARM_DRIVER_MCI Driver_MCI0;
ARM_DRIVER_MCI *drv_info;
void setup_mci (void) {
ARM_DRIVER_VERSION version;
drv_info = &Driver_MCI0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
\endcode
*******************************************************************************************************************/
ARM_MCI_CAPABILITIES ARM_MCI_GetCapabilities (void) {
return { 0 };
}
/**
\fn ARM_MCI_CAPABILITIES ARM_MCI_GetCapabilities (void)
\details
The function \b ARM_MCI_GetCapabilities returns information about capabilities in this driver implementation.
The data fields of the structure \ref ARM_MCI_CAPABILITIES encode various capabilities, for example
supported bus modes ...
Example:
\code
extern ARM_DRIVER_MCI Driver_MCI0;
ARM_DRIVER_MCI *drv_info;
void read_capabilities (void) {
ARM_MCI_CAPABILITIES drv_capabilities;
drv_info = &Driver_MCI0;
drv_capabilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
\endcode
*******************************************************************************************************************/
int32_t ARM_MCI_Initialize (ARM_MCI_SignalEvent_t cb_event) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_Initialize (ARM_MCI_SignalEvent_t cb_event)
\details
The function \b ARM_MCI_Initialize initializes the MCI interface.
It is called when the middleware component starts operation.
The function performs the following operations:
- Initializes the resources needed for the MCI interface.
- Registers the \ref ARM_MCI_SignalEvent callback function.
The parameter \em cb_event is a pointer to the \ref ARM_MCI_SignalEvent callback function; use a NULL pointer
when no callback signals are required.
\b Example:
- see \ref mci_interface_gr - Driver Functions
*******************************************************************************************************************/
int32_t ARM_MCI_Uninitialize (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_Uninitialize (void)
\details
The function \b ARM_MCI_Uninitialize de-initializes the resources of I2C interface.
It is called when the middleware component stops operation and releases the software resources used by the interface.
*******************************************************************************************************************/
int32_t ARM_MCI_PowerControl (ARM_POWER_STATE state) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_PowerControl (ARM_POWER_STATE state)
\details
The function \b ARM_MCI_PowerControl operates the power modes of the MCI interface.
The parameter \em state can have the following values:
- \ref ARM_POWER_FULL : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA. Can be called multiple times.
If the peripheral is already in this mode, then the function performs no operation and returns with \ref ARM_DRIVER_OK.
- \ref ARM_POWER_LOW : may use power saving. Returns \ref ARM_DRIVER_ERROR_UNSUPPORTED when not implemented.
- \ref ARM_POWER_OFF : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.
Refer to \ref CallSequence for more information.
*******************************************************************************************************************/
int32_t ARM_MCI_CardPower (uint32_t voltage) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_CardPower (uint32_t voltage)
\details
The function \b ARM_MCI_CardPower operates the memory card power supply voltage.
The parameter \em voltage sets the voltage. Not every voltage might be supported by the driver implementation.
The structure \ref ARM_MCI_CAPABILITIES encodes the supported voltage. Retrieve the information with the function \ref ARM_MCI_GetCapabilities and
verify the data fields.
The following values:
Parameter \em voltage | Description | supported when ARM_MCI_CAPABILITIES
:-------------------------------------|:------------------------------|-----------------------------------------
\ref ARM_MCI_POWER_VDD_OFF | VDD (VCC) turned off | <i>always supported</i>
\ref ARM_MCI_POWER_VDD_3V3 | VDD (VCC) = \token{3.3V} | data field \em vdd = \token{1}
\ref ARM_MCI_POWER_VDD_1V8 | VDD (VCC) = \token{1.8V} | data field \em vdd_1v8 = \token{1}
\ref ARM_MCI_POWER_VCCQ_OFF | eMMC VCCQ turned off | <i>always supported</i>
\ref ARM_MCI_POWER_VCCQ_3V3 | eMMC VCCQ = \token{3.3V} | data field \em vccq = \token{1}
\ref ARM_MCI_POWER_VCCQ_1V8 | eMMC VCCQ = \token{1.8V} | data field \em vccq_1v8 = \token{1}
\ref ARM_MCI_POWER_VCCQ_1V2 | eMMC VCCQ = \token{1.2V} | data field \em vccq_1v2 = \token{1}
*******************************************************************************************************************/
int32_t ARM_MCI_ReadCD (void) {
return 0;
}
/**
\fn int32_t ARM_MCI_ReadCD (void)
\details
The function \b ARM_MCI_ReadCD reads the status of the Card Detect (CD) pin.
*******************************************************************************************************************/
int32_t ARM_MCI_ReadWP (void) {
return 0;
}
/**
\fn int32_t ARM_MCI_ReadWP (void)
\details
The function \b ARM_MCI_ReadWP reads the status of the Write Protect (WP) pin.
*******************************************************************************************************************/
int32_t ARM_MCI_SendCommand (uint32_t cmd, uint32_t arg, uint32_t flags, uint32_t *response) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_SendCommand (uint32_t cmd, uint32_t arg, uint32_t flags, uint32_t *response)
\details
The function \b ARM_MCI_SendCommand
- sends commands to the memory card
- retrieve the response from the card
- optionally, start the data transfer.
The parameter \em cmd is the command sent to the card. \n
The parameter \em arg contains arguments for the command \em cmd. \n
The parameter \em flags controls the behavior of the operation and takes predefined values listed in the table below. \n
The parameter \em response is a pointer to receive data.
The parameter \em flags can have the following values:
Parameter \em flags | Description
:-------------------------------------|:------------
\ref ARM_MCI_RESPONSE_NONE | No response expected (default)
\ref ARM_MCI_RESPONSE_SHORT | Short response (\token{48}-bit) expected
\ref ARM_MCI_RESPONSE_SHORT_BUSY | Short response with busy signal (\token{48}-bit) expected
\ref ARM_MCI_RESPONSE_LONG | Long response (\token{136}-bit) expected
\ref ARM_MCI_RESPONSE_INDEX | Check command index in response
\ref ARM_MCI_RESPONSE_CRC | Check CRC in response
\ref ARM_MCI_WAIT_BUSY | Wait until busy before sending the command
\ref ARM_MCI_TRANSFER_DATA | Activate Data transfer
\ref ARM_MCI_CARD_INITIALIZE | Execute Memory Card initialization sequence
\ref ARM_MCI_INTERRUPT_COMMAND | Send Interrupt command (CMD40 - MMC only)
\ref ARM_MCI_INTERRUPT_RESPONSE | Send Interrupt response (CMD40 - MMC only)
\ref ARM_MCI_BOOT_OPERATION | Execute Boot operation (MMC only)
\ref ARM_MCI_BOOT_ALTERNATIVE | Execute Alternative Boot operation (MMC only)
\ref ARM_MCI_BOOT_ACK | Expect Boot Acknowledge (MMC only)
\ref ARM_MCI_CCSD | Send Command Completion Signal Disable (CCSD) for CE-ATA device
\ref ARM_MCI_CCS | Expect Command Completion Signal (CCS) for CE-ATA device
Calling the function <b>ARM_MCI_SendCommand</b> only starts the operation.
The function is non-blocking and returns as soon as the driver has started the operation.
It is not allowed to call this function again until the operation is in progress.
After the command is sent the response is retrieved if specified with <b>ARM_MCI_RESPONSE_xxx</b> flags.
When the command completes successfully (requested response is received without errors) the \ref ARM_MCI_EVENT_COMMAND_COMPLETE event is generated.
In case that response is requested but not received the \ref ARM_MCI_EVENT_COMMAND_TIMEOUT event is generated instead.
In case of invalid response (or CRC error) the \ref ARM_MCI_EVENT_COMMAND_ERROR event is generated instead.
Progress of command operation can be monitored by calling the \ref ARM_MCI_GetStatus and checking the \em command_active flag.
After the command operation the data transfer operation is started if specified with <b>ARM_MCI_TRANSFER_DATA</b> flag.
The data transfer needs to be configured before that by calling the \ref ARM_MCI_SetupTransfer.
When the data transfer completes successfully the \ref ARM_MCI_EVENT_TRANSFER_COMPLETE event is generated.
In case that data transfer is not completed in-time (specified by \ref ARM_MCI_DATA_TIMEOUT) the \ref ARM_MCI_EVENT_TRANSFER_TIMEOUT event is generated instead.
In case of CRC errors the \ref ARM_MCI_EVENT_TRANSFER_ERROR event is generated instead.
Progress of data transfer operation can be monitored by calling the \ref ARM_MCI_GetStatus and checking the \em transfer_active flag.
<b>See also:</b>
- \ref ARM_MCI_SignalEvent
*******************************************************************************************************************/
int32_t ARM_MCI_SetupTransfer (uint8_t *data, uint32_t block_count, uint32_t block_size, uint32_t mode) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_SetupTransfer (uint8_t *data, uint32_t block_count, uint32_t block_size, uint32_t mode)
\details
The function \b ARM_MCI_SetupTransfer prepares the data transfer operation that is initiated
by calling the function \ref ARM_MCI_SendCommand with the parameter \em flags = \ref ARM_MCI_TRANSFER_DATA.
The parameter \em data is a pointer to the data to transfer. \n
The parameter \em block_count is the number of blocks to transfer. \n
The parameter \em block_size is the size of a block. \n
The parameter \em mode sets the transfer mode and can have the values liste in the table below:
Transfer Directions | Description
:-------------------------------------|:------------
\ref ARM_MCI_TRANSFER_READ | Read data from MCI
\ref ARM_MCI_TRANSFER_WRITE | Write data to MCI
\ref ARM_MCI_TRANSFER_BLOCK (default) | Block Data transfer
\ref ARM_MCI_TRANSFER_STREAM | Stream Data transfer (MMC only)
*******************************************************************************************************************/
int32_t ARM_MCI_AbortTransfer (void) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_AbortTransfer (void)
\details
The function \b ARM_MCI_AbortTransfer aborts the active data transfer operation initiated with \ref ARM_MCI_SendCommand.
*******************************************************************************************************************/
int32_t ARM_MCI_Control (uint32_t control, uint32_t arg) {
return ARM_DRIVER_OK;
}
/**
\fn int32_t ARM_MCI_Control (uint32_t control, uint32_t arg)
\details
Th function \b ARM_MCI_Control controls the MCI interface and executes various operations.
The parameter \em control specifies the operation.
Values for \em control cannot be ORed, but must be called separately in the code. \n
The parameter \em arg provides, depending on the operation, additional information or sets values.
\note
For parameters, the values marked with (default) are the setting after the driver initialization.
The table lists values for the parameter \em control.
Parameter \em control | Operation
:-------------------------------------|:------------
\ref ARM_MCI_BUS_SPEED | Set the Bus Speed. The parameter \em arg specifies the speed in bits/s; The function returns the bus speed configured in bits/s.
\ref ARM_MCI_BUS_SPEED_MODE | Set the Bus Speed Mode. Predefined values for \em arg are listed in the table <b>Bus Speed Mode</b>.
\ref ARM_MCI_BUS_CMD_MODE | Set the CMD Line Mode. Predefined values for \em arg are listed in the table <b>Bus CMD Line Mode</b>.
\ref ARM_MCI_BUS_DATA_WIDTH | Set data bus width. Predefined values for \em arg are encoded in <b>Bus Data Width</b>.
\ref ARM_MCI_DRIVER_STRENGTH | Set driver strength. Predefined values for \em arg are listed in the table <b>Driver Type</b>
\ref ARM_MCI_CONTROL_RESET | Control optional RST_n Pin (eMMC). The parameter \em arg can have the values \token{[0:inactive(default); 1:active]}
\ref ARM_MCI_CONTROL_CLOCK_IDLE | Control clock generation on CLK Pin when idle. The parameter \em arg can have the values \token{[0:disabled; 1:enabled]}
\ref ARM_MCI_UHS_TUNING_OPERATION | Sampling clock Tuning operation (SD UHS-I). The parameter \em arg can have the values \token{[0:reset; 1:execute]}
\ref ARM_MCI_UHS_TUNING_RESULT | Sampling clock Tuning result (SD UHS-I). Returns \token{[0:done; 1:in progress; -1:error]}
\ref ARM_MCI_DATA_TIMEOUT | Set Data timeout; The parameter \em arg sets the timeout in bus cycles.
\ref ARM_MCI_CSS_TIMEOUT | Set Command Completion Signal (CCS) timeout. The parameter \em arg sets timeout in bus cycles.
\ref ARM_MCI_MONITOR_SDIO_INTERRUPT | Monitor SD I/O interrupt. The parameter \em arg can have the values \token{[0:disabled(default); 1:enabled]}. Monitoring is automatically disabled when an interrupt is recognized.
\ref ARM_MCI_CONTROL_READ_WAIT | Control Read/Wait states for SD I/O. The parameter \em arg can have the values \token{[0:disabled(default); 1:enabled]}.
\ref ARM_MCI_SUSPEND_TRANSFER | Suspend Data transfer (SD I/O). Returns the number of remaining bytes to transfer.
\ref ARM_MCI_RESUME_TRANSFER | Resume Data transfer (SD I/O).
<b>Bus Speed Mode</b>
The function \ref ARM_MCI_GetCapabilities lists the supported bus speed modes. Initially, all SD cards use a 3.3 volt electrical interface.
Some SD cards can switch to 1.8 volt operation. For example, the use of ultra-high-speed (UHS)
SD cards requires 1.8 volt operation and a 4-bit bus data width. The bit field ARM_MCI_CAPABILITIES.uhs_signaling encodes
whether the driver supports 1.8 volt UHS signaling.
The \em control operation \b ARM_MCI_BUS_SPEED_MODE sets the bus speed mode using the parameter \em arg.
Parameter \em arg | Bus Speed Mode
:-------------------------------------------------------------|:------------------------------------------
\ref ARM_MCI_BUS_DEFAULT_SPEED (default) | Set the bus speed for SD/MMC cards: Default Speed mode up to \token{[25;26]MHz}
\ref ARM_MCI_BUS_HIGH_SPEED | Set the bus speed for SD/MMC: High Speed mode up to \token{[50;52]MHz}
\ref ARM_MCI_BUS_UHS_SDR12 | Set the bus speed for SD: SDR12 (Single Data Rate) up to \token{25MHz, 12.5MB/s: UHS-I (Ultra High Speed) 1.8V signalling}
\ref ARM_MCI_BUS_UHS_SDR25 | Set the bus speed for SD: SDR25 (Single Data Rate) up to \token{50MHz, 25 MB/s: UHS-I (Ultra High Speed) 1.8V signalling}
\ref ARM_MCI_BUS_UHS_SDR50 | Set the bus speed for SD: SDR50 (Single Data Rate) up to \token{100MHz, 50 MB/s: UHS-I (Ultra High Speed) 1.8V signalling}
\ref ARM_MCI_BUS_UHS_SDR104 | Set the bus speed for SD: SDR104 (Single Data Rate) up to \token{208MHz, 104 MB/s: UHS-I (Ultra High Speed) 1.8V signalling}
\ref ARM_MCI_BUS_UHS_DDR50 | Set the bus speed for SD: DDR50 (Dual Data Rate) up to \token{50MHz, 50 MB/s: UHS-I (Ultra High Speed) 1.8V signalling}
<b>Bus CMD Line Mode</b>
The \em control operation \b ARM_MCI_BUS_CMD_MODE sets the bus command line mode using the parameter \em arg.
Parameter \em arg | Bus CMD Line Mode
:-------------------------------------------------------------|:------------------------------------------
\ref ARM_MCI_BUS_CMD_PUSH_PULL (default) | Set the Push-Pull CMD line
\ref ARM_MCI_BUS_CMD_OPEN_DRAIN | Set the Open Drain CMD line (MMC only)
<b>Bus Data Width</b>
Specifies the bus data width (the number of data I/O pins on the SD/MMC interface).
For high speed memory cards, a 4-bit bus data width should be used (or 8-bit for eMMC). The bit fields ARM_MCI_CAPABILITIES.data_width_4 and
ARM_MCI_CAPABILITIES.data_width_8 encode whether the driver supports a specific bus data with.
The \em control operation \b ARM_MCI_BUS_DATA_WIDTH sets the bus data width using the parameter \em arg.
Parameter \em arg | Bus Data Width
:-------------------------------------------------------------|:------------------------------------------
\ref ARM_MCI_BUS_DATA_WIDTH_1 (default) | Set the Bus data width to \token{1 bit}
\ref ARM_MCI_BUS_DATA_WIDTH_4 | Set the Bus data width to \token{4 bits}
\ref ARM_MCI_BUS_DATA_WIDTH_8 | Set the Bus data width to \token{8 bits}
\ref ARM_MCI_BUS_DATA_WIDTH_4_DDR | Set the Bus data width to \token{4 bits}, DDR (Dual Data Rate) - MMC only
\ref ARM_MCI_BUS_DATA_WIDTH_8_DDR | Set the Bus data width to \token{8 bits}, DDR (Dual Data Rate) - MMC only
<b>Driver Type</b>
Specifies the interface driver type.
The \em control operation \b ARM_MCI_DRIVER_STRENGTH sets the interface driver type using the parameter \em arg.
Parameter \em arg | Driver Type
:-------------------------------------------------------------|:------------------------------------------
\ref ARM_MCI_DRIVER_TYPE_A | Set the interface to SD UHS-I Driver Type A
\ref ARM_MCI_DRIVER_TYPE_B (default) | Set the interface to SD UHS-I Driver Type B
\ref ARM_MCI_DRIVER_TYPE_C | Set the interface to SD UHS-I Driver Type C
\ref ARM_MCI_DRIVER_TYPE_D | Set the interface to SD UHS-I Driver Type D
\b Examples:
\code
// Set Bus Speed to 25MHz
MCIdrv->Control(ARM_MCI_BUS_SPEED, 25000000);
// Set High Speed mode
MCIdrv->Control(ARM_MCI_BUS_SPEED_MODE, ARM_MCI_BUS_HIGH_SPEED);
// Configure CMD line as Open Drain (MMC only)
MCIdrv->Control(ARM_MCI_BUS_CMD_MODE, ARM_MCI_BUS_CMD_OPEN_DRAIN);
// Set Bus Data Width = 4bits
MCIdrv->Control(ARM_MCI_BUS_DATA_WIDTH, ARM_MCI_BUS_DATA_WIDTH_4);
// Set SD UHS-I Driver Type B
MCIdrv->Control(ARM_MCI_DRIVER_STRENGTH, ARM_MCI_DRIVER_TYPE_B);
// RTS_n Pin is not active by default
// Assert RTS_n Pin (eMMC)
MCIdrv->Control(ARM_MCI_CONTROL_RESET, 1);
// De-assert RTS_n Pin (eMMC)
MCIdrv->Control(ARM_MCI_CONTROL_RESET, 0);
// Clock generation on CLK when Idle: hardware specific default behavior
// Enable Clock generation on CLK when Idle
MCIdrv->Control(ARM_MCI_CONTROL_CLOCK_IDLE, 1);
// Disable Clock generation on CLK when Idle
MCIdrv->Control(ARM_MCI_CONTROL_CLOCK_IDLE, 0);
// UHS Tuning
MCIdrv->Control(ARM_MCI_UHS_TUNING_OPERATION, 1); // start tuning
do {
status = MCIdrv->Control(ARM_MCI_UHS_TUNING_RESULT, 0/*argument not used*/);
if (status == -1) { break; /* tuning failed */ }
} while (status == 1);
// Set Data Timeout to 12500000 bus cycles (0.5s @25MHz Bus Speed)
// Default value is hardware specific (typically 2^32-1)
MCIdrv->Control(ARM_MCI_DATA_TIMEOUT, 12500000);
// Set CSS Timeout to 1000000 bus cycles
// Default value is hardware specific
MCIdrv->Control(ARM_MCI_CSS_TIMEOUT, 1000000);
// SD I/O Interrupt Monitoring is disabled by default
// Enable SD I/O Interrupt Monitoring
MCIdrv->Control(ARM_MCI_MONITOR_SDIO_INTERRUPT, 1);
// Disable SD I/O Interrupt Monitoring
MCIdrv->Control(ARM_MCI_MONITOR_SDIO_INTERRUPT, 0);
// Read/Wait for SD I/O is disabled by default
// Enable Read/Wait for SD I/O
MCIdrv->Control(ARM_MCI_CONTROL_READ_WAIT, 1);
// Disable Read/Wait for SD I/O
MCIdrv->Control(ARM_MCI_CONTROL_READ_WAIT, 0);
// Suspend Data transfer (SD I/O)
MCIdrv->Control(ARM_MCI_SUSPEND_TRANSFER, 0/*argument not used*/);
// Resume Data transfer (SD I/O)
MCIdrv->Control(ARM_MCI_RESUME_TRANSFER, 0/*argument not used*/);
\endcode
*******************************************************************************************************************/
ARM_MCI_STATUS ARM_MCI_GetStatus (void) {
return ARM_DRIVER_OK;
}
/**
\fn ARM_MCI_STATUS ARM_MCI_GetStatus (void)
\details
The function \b ARM_MCI_GetStatus returns the current MCI interface status.
*******************************************************************************************************************/
void ARM_MCI_SignalEvent (uint32_t event) {
// function body
}
/**
\fn void ARM_MCI_SignalEvent (uint32_t event)
\details
The function \b ARM_MCI_SignalEvent is a callback function registered by the function \ref ARM_MCI_Initialize.
The parameter \em event indicates one or more events that occurred during driver operation.
Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.
Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the
data fields of the structure \ref ARM_NAND_CAPABILITIES, which can be retrieved with the function \ref ARM_NAND_GetCapabilities.
The following events can be generated:
Parameter \em event |Bit | Description | supported when \ref ARM_NAND_CAPABILITIES
:------------------------------------------|---:|:your_sha256_hash------|:---------------------------------------------
\ref ARM_MCI_EVENT_CARD_INSERTED | 0 | Occurs after Memory Card inserted | <i>always supported</i>
\ref ARM_MCI_EVENT_CARD_REMOVED | 1 | Occurs after Memory Card removal | <i>always supported</i>
\ref ARM_MCI_EVENT_COMMAND_COMPLETE | 2 | Occurs after command completed successfully | <i>always supported</i>
\ref ARM_MCI_EVENT_COMMAND_TIMEOUT | 3 | Occurs after command timeout | <i>always supported</i>
\ref ARM_MCI_EVENT_COMMAND_ERROR | 4 | Occurs after command response error (CRC error or invalid response) | <i>always supported</i>
\ref ARM_MCI_EVENT_TRANSFER_COMPLETE | 5 | Occurs after data transfer completed successfully | <i>always supported</i>
\ref ARM_MCI_EVENT_TRANSFER_TIMEOUT | 6 | Occurs after data transfer timeout | <i>always supported</i>
\ref ARM_MCI_EVENT_TRANSFER_ERROR | 7 | Occurs after data transfer error (CRC failed) | <i>always supported</i>
\ref ARM_MCI_EVENT_SDIO_INTERRUPT | 8 | Indicates SD I/O Interrupt | data field \em sdio_interrupt = \token{1}
\ref ARM_MCI_EVENT_CCS | 9 | Indicates a Command Completion Signal (CCS) | data field \em ccs = \token{1}
\ref ARM_MCI_EVENT_CCS_TIMEOUT |10 | Indicates a Command Completion Signal (CCS) Timeout | data field \em css_timeout = \token{1}
<b>See also:</b>
- \ref ARM_MCI_SendCommand
*******************************************************************************************************************/
/**
@}
*/
// End MCI Interface
``` | /content/code_sandbox/CMSIS/DoxyGen/Driver/src/Driver_MCI.c | c | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 8,576 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<title>Redirect to the corresponding CMSIS-DSP page after 0 seconds</title>
<meta http-equiv="refresh" content="0; URL=path_to_url">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If the automatic redirection is failing, click <a href="path_to_url">here</a> or try to find corresponding topic described in <a href="path_to_url">CMSIS-DSP resources</a>.
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/group__cmplx__dot__prod.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 132 |
```javascript
var NAVTREE =
[
[ "CMSIS-DSP", "index.html"]
];
var NAVTREEINDEX =
[
"index.html"
];
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var navTreeSubIndices = new Array();
function getData(varName)
{
var i = varName.lastIndexOf('/');
var n = i>=0 ? varName.substring(i+1) : varName;
return eval(n.replace(/\-/g,'_'));
}
function stripPath(uri)
{
return uri.substring(uri.lastIndexOf('/')+1);
}
function stripPath2(uri)
{
var i = uri.lastIndexOf('/');
var s = uri.substring(i+1);
var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
return m ? uri.substring(i-6) : s;
}
function localStorageSupported()
{
try {
return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
}
catch(e) {
return false;
}
}
function storeLink(link)
{
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
window.localStorage.setItem('navpath',link);
}
}
function deleteLink()
{
if (localStorageSupported()) {
window.localStorage.setItem('navpath','');
}
}
function cachedLink()
{
if (localStorageSupported()) {
return window.localStorage.getItem('navpath');
} else {
return '';
}
}
function getScript(scriptName,func,show)
{
var head = document.getElementsByTagName("head")[0];
var script = document.createElement('script');
script.id = scriptName;
script.type = 'text/javascript';
script.onload = func;
script.src = scriptName+'.js';
if ($.browser.msie && $.browser.version<=8) {
// script.onload does not work with older versions of IE
script.onreadystatechange = function() {
if (script.readyState=='complete' || script.readyState=='loaded') {
func(); if (show) showRoot();
}
}
}
head.appendChild(script);
}
function createIndent(o,domNode,node,level)
{
var level=-1;
var n = node;
while (n.parentNode) { level++; n=n.parentNode; }
if (node.childrenData) {
var imgNode = document.createElement("img");
imgNode.style.paddingLeft=(16*level).toString()+'px';
imgNode.width = 16;
imgNode.height = 22;
imgNode.border = 0;
node.plus_img = imgNode;
node.expandToggle = document.createElement("a");
node.expandToggle.href = "javascript:void(0)";
node.expandToggle.onclick = function() {
if (node.expanded) {
$(node.getChildrenUL()).slideUp("fast");
node.plus_img.src = node.relpath+"ftv2pnode.png";
node.expanded = false;
} else {
expandNode(o, node, false, false);
}
}
node.expandToggle.appendChild(imgNode);
domNode.appendChild(node.expandToggle);
imgNode.src = node.relpath+"ftv2pnode.png";
} else {
var span = document.createElement("span");
span.style.display = 'inline-block';
span.style.width = 16*(level+1)+'px';
span.style.height = '22px';
span.innerHTML = ' ';
domNode.appendChild(span);
}
}
var animationInProgress = false;
function gotoAnchor(anchor,aname,updateLocation)
{
var pos, docContent = $('#doc-content');
if (anchor.parent().attr('class')=='memItemLeft' ||
anchor.parent().attr('class')=='fieldtype' ||
anchor.parent().is(':header'))
{
pos = anchor.parent().position().top;
} else if (anchor.position()) {
pos = anchor.position().top;
}
if (pos) {
var dist = Math.abs(Math.min(
pos-docContent.offset().top,
docContent[0].scrollHeight-
docContent.height()-docContent.scrollTop()));
animationInProgress=true;
docContent.animate({
scrollTop: pos + docContent.scrollTop() - docContent.offset().top
},Math.max(50,Math.min(500,dist)),function(){
if (updateLocation) window.location.href=aname;
animationInProgress=false;
});
}
}
function newNode(o, po, text, link, childrenData, lastNode)
{
var node = new Object();
node.children = Array();
node.childrenData = childrenData;
node.depth = po.depth + 1;
node.relpath = po.relpath;
node.isLast = lastNode;
node.li = document.createElement("li");
po.getChildrenUL().appendChild(node.li);
node.parentNode = po;
node.itemDiv = document.createElement("div");
node.itemDiv.className = "item";
node.labelSpan = document.createElement("span");
node.labelSpan.className = "label";
createIndent(o,node.itemDiv,node,0);
node.itemDiv.appendChild(node.labelSpan);
node.li.appendChild(node.itemDiv);
var a = document.createElement("a");
node.labelSpan.appendChild(a);
node.label = document.createTextNode(text);
node.expanded = false;
a.appendChild(node.label);
if (link) {
var url;
if (link.substring(0,1)=='^') {
url = link.substring(1);
link = url;
} else {
url = node.relpath+link;
}
a.className = stripPath(link.replace('#',':'));
if (link.indexOf('#')!=-1) {
var aname = '#'+link.split('#')[1];
var srcPage = stripPath($(location).attr('pathname'));
var targetPage = stripPath(link.split('#')[0]);
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
a.onclick = function(){
storeLink(link);
if (!$(a).parent().parent().hasClass('selected'))
{
$('.item').removeClass('selected');
$('.item').removeAttr('id');
$(a).parent().parent().addClass('selected');
$(a).parent().parent().attr('id','selected');
}
var anchor = $(aname);
gotoAnchor(anchor,aname,true);
};
} else {
a.href = url;
a.onclick = function() { storeLink(link); }
}
} else {
if (childrenData != null)
{
a.className = "nolink";
a.href = "javascript:void(0)";
a.onclick = node.expandToggle.onclick;
}
}
node.childrenUL = null;
node.getChildrenUL = function() {
if (!node.childrenUL) {
node.childrenUL = document.createElement("ul");
node.childrenUL.className = "children_ul";
node.childrenUL.style.display = "none";
node.li.appendChild(node.childrenUL);
}
return node.childrenUL;
};
return node;
}
function showRoot()
{
var headerHeight = $("#top").height();
var footerHeight = $("#nav-path").height();
var windowHeight = $(window).height() - headerHeight - footerHeight;
(function (){ // retry until we can scroll to the selected item
try {
var navtree=$('#nav-tree');
navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
} catch (err) {
setTimeout(arguments.callee, 0);
}
})();
}
function expandNode(o, node, imm, showRoot)
{
if (node.childrenData && !node.expanded) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
expandNode(o, node, imm, showRoot);
}, showRoot);
} else {
if (!node.childrenVisited) {
getNode(o, node);
} if (imm || ($.browser.msie && $.browser.version>8)) {
// somehow slideDown jumps to the start of tree for IE9 :-(
$(node.getChildrenUL()).show();
} else {
$(node.getChildrenUL()).slideDown("fast");
}
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
}
}
}
function glowEffect(n,duration)
{
n.addClass('glow').delay(duration).queue(function(next){
$(this).removeClass('glow');next();
});
}
function highlightAnchor()
{
var aname = $(location).attr('hash');
var anchor = $(aname);
if (anchor.parent().attr('class')=='memItemLeft'){
var rows = $('.memberdecls tr[class$="'+
window.location.hash.substring(1)+'"]');
glowEffect(rows.children(),300); // member without details
} else if (anchor.parents().slice(2).prop('tagName')=='TR') {
glowEffect(anchor.parents('div.memitem'),1000); // enum value
} else if (anchor.parent().attr('class')=='fieldtype'){
glowEffect(anchor.parent().parent(),1000); // struct field
} else if (anchor.parent().is(":header")) {
glowEffect(anchor.parent(),1000); // section header
} else {
glowEffect(anchor.next(),1000); // normal member
}
gotoAnchor(anchor,aname,false);
}
function selectAndHighlight(hash,n)
{
var a;
if (hash) {
var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);
a=$('.item a[class$="'+link+'"]');
}
if (a && a.length) {
a.parent().parent().addClass('selected');
a.parent().parent().attr('id','selected');
highlightAnchor();
} else if (n) {
$(n.itemDiv).addClass('selected');
$(n.itemDiv).attr('id','selected');
}
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
$('#nav-sync').css('top','30px');
} else {
$('#nav-sync').css('top','5px');
}
showRoot();
}
function showNode(o, node, index, hash)
{
if (node && node.childrenData) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
showNode(o,node,index,hash);
},true);
} else {
if (!node.childrenVisited) {
getNode(o, node);
}
$(node.getChildrenUL()).css({'display':'block'});
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
var n = node.children[o.breadcrumbs[index]];
if (index+1<o.breadcrumbs.length) {
showNode(o,n,index+1,hash);
} else {
if (typeof(n.childrenData)==='string') {
var varName = n.childrenData;
getScript(n.relpath+varName,function(){
n.childrenData = getData(varName);
node.expanded=false;
showNode(o,node,index,hash); // retry with child node expanded
},true);
} else {
var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
expandNode(o, n, true, true);
}
selectAndHighlight(hash,n);
}
}
}
} else {
selectAndHighlight(hash);
}
}
function removeToInsertLater(element) {
var parentNode = element.parentNode;
var nextSibling = element.nextSibling;
parentNode.removeChild(element);
return function() {
if (nextSibling) {
parentNode.insertBefore(element, nextSibling);
} else {
parentNode.appendChild(element);
}
};
}
function getNode(o, po)
{
var insertFunction = removeToInsertLater(po.li);
po.childrenVisited = true;
var l = po.childrenData.length-1;
for (var i in po.childrenData) {
var nodeData = po.childrenData[i];
po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
i==l);
}
insertFunction();
}
function gotoNode(o,subIndex,root,hash,relpath)
{
var nti = navTreeSubIndices[subIndex][root+hash];
o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
navTo(o,NAVTREE[0][1],"",relpath);
$('.item').removeClass('selected');
$('.item').removeAttr('id');
}
if (o.breadcrumbs) {
o.breadcrumbs.unshift(0); // add 0 for root node
showNode(o, o.node, 0, hash);
}
}
function navTo(o,root,hash,relpath)
{
var link = cachedLink();
if (link) {
var parts = link.split('#');
root = parts[0];
if (parts.length>1) hash = '#'+parts[1];
else hash='';
}
if (hash.match(/^#l\d+$/)) {
var anchor=$('a[name='+hash.substring(1)+']');
glowEffect(anchor.parent(),1000); // line number
hash=''; // strip line number anchors
//root=root.replace(/_source\./,'.'); // source link to doc link
}
var url=root+hash;
var i=-1;
while (NAVTREEINDEX[i+1]<=url) i++;
if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
if (navTreeSubIndices[i]) {
gotoNode(o,i,root,hash,relpath)
} else {
getScript(relpath+'navtreeindex'+i,function(){
navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
if (navTreeSubIndices[i]) {
gotoNode(o,i,root,hash,relpath);
}
},true);
}
}
function showSyncOff(n,relpath)
{
n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
}
function showSyncOn(n,relpath)
{
n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
}
function toggleSyncButton(relpath)
{
var navSync = $('#nav-sync');
if (navSync.hasClass('sync')) {
navSync.removeClass('sync');
showSyncOff(navSync,relpath);
storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
} else {
navSync.addClass('sync');
showSyncOn(navSync,relpath);
deleteLink();
}
}
function initNavTree(toroot,relpath)
{
var o = new Object();
o.toroot = toroot;
o.node = new Object();
o.node.li = document.getElementById("nav-tree-contents");
o.node.childrenData = NAVTREE;
o.node.children = new Array();
o.node.childrenUL = document.createElement("ul");
o.node.getChildrenUL = function() { return o.node.childrenUL; };
o.node.li.appendChild(o.node.childrenUL);
o.node.depth = 0;
o.node.relpath = relpath;
o.node.expanded = false;
o.node.isLast = true;
o.node.plus_img = document.createElement("img");
o.node.plus_img.src = relpath+"ftv2pnode.png";
o.node.plus_img.width = 16;
o.node.plus_img.height = 22;
if (localStorageSupported()) {
var navSync = $('#nav-sync');
if (cachedLink()) {
showSyncOff(navSync,relpath);
navSync.removeClass('sync');
} else {
showSyncOn(navSync,relpath);
}
navSync.click(function(){ toggleSyncButton(relpath); });
}
$(window).load(function(){
navTo(o,toroot,window.location.hash,relpath);
showRoot();
});
$(window).bind('hashchange', function(){
if (window.location.hash && window.location.hash.length>1){
var a;
if ($(location).attr('hash')){
var clslink=stripPath($(location).attr('pathname'))+':'+
$(location).attr('hash').substring(1);
a=$('.item a[class$="'+clslink+'"]');
}
if (a==null || !$(a).parent().parent().hasClass('selected')){
$('.item').removeClass('selected');
$('.item').removeAttr('id');
}
var link=stripPath2($(location).attr('pathname'));
navTo(o,link,$(location).attr('hash'),relpath);
} else if (!animationInProgress) {
$('#doc-content').scrollTop(0);
$('.item').removeClass('selected');
$('.item').removeAttr('id');
navTo(o,toroot,window.location.hash,relpath);
}
})
}
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/navtree.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 3,873 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<title>Redirect to the corresponding Open-CMSIS-Pack page after 0 seconds</title>
<meta http-equiv="refresh" content="0; URL=path_to_url">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If the automatic redirection is failing, click <a href="path_to_url">here</a> or try to find corresponding topic described in <a href="path_to_url">CMSIS-DSP resources</a>.
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/pages.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 133 |
```javascript
function writeHeader() {
document.write('Version 1.10.1');
};
function writeFooter() {
};
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/footer.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 26 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CMSIS DSP Software Library</title>
<title>CMSIS-DSP: CMSIS DSP Software Library</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<script type="text/javascript" src="footer.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-DSP
 <span id="projectnumber"><script type="text/javascript">
<!--
writeHeader.call(this);
//-->
</script>
</span>
</div>
<div id="projectbrief">CMSIS DSP Software Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Usage and Description</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('index.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">CMSIS DSP Software Library </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><b>CMSIS-DSP</b> is now in its GitHub project at <a href="path_to_url" target="_blank">ARM-software/CMSIS-DSP</a>.</p>
Content of this documentation is now <a href="path_to_url" target="_blank"><b>provided here</b></a> and individual pages are redirected to the corresponding pages in CMSIS-DSP documentation.
</div></div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/index.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,301 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="defines_a.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/defines_a.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 244 |
```javascript
var searchData=
[
['f32x2_5ft',['f32x2_t',['../arm__math__types_8h.html#a5a2e6d25ddb5523307305c42189bf05d',1,'arm_math_types.h']]],
['f32x2x2_5ft',['f32x2x2_t',['../arm__math__types_8h.html#a4e8ac500763bf83f06aeb0113ad297e6',1,'arm_math_types.h']]],
['f32x2x3_5ft',['f32x2x3_t',['../arm__math__types_8h.html#a56b58ee03e4f65b8be19d79f653e3863',1,'arm_math_types.h']]],
['f32x2x4_5ft',['f32x2x4_t',['../arm__math__types_8h.html#af9f443d7781e43e681beb3e4725902aa',1,'arm_math_types.h']]],
['f32x4_5ft',['f32x4_t',['../arm__math__types_8h.html#aa72ea28cbde94b8b5992a6fe3e1dbd6c',1,'arm_math_types.h']]],
['f32x4x2_5ft',['f32x4x2_t',['../arm__math__types_8h.html#a915e90433fb41b8db1e0dfb621337c38',1,'arm_math_types.h']]],
['f32x4x3_5ft',['f32x4x3_t',['../arm__math__types_8h.html#ac2b1a8aad973e75a63ff72c48d0410de',1,'arm_math_types.h']]],
['f32x4x4_5ft',['f32x4x4_t',['../arm__math__types_8h.html#ac0b7ca992b885f69bb8789505b482d24',1,'arm_math_types.h']]],
['float32_5ft',['float32_t',['../arm__math__types_8h.html#a4611b605e45ab401f02cab15c5e38715',1,'arm_math_types.h']]],
['float64_5ft',['float64_t',['../arm__math__types_8h.html#ac55f3ae81b5bc9053760baacf57e47f4',1,'arm_math_types.h']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/typedefs_0.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 545 |
```javascript
var searchData=
[
['elem',['ELEM',['../matrix__utils_8h.html#ad57c3933860c3112ab5099050d93d53a',1,'matrix_utils.h']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/defines_5.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 45 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="pages_2.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/pages_2.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 245 |
```javascript
var searchData=
[
['graphic_20audio_20equalizer_20example',['Graphic Audio Equalizer Example',['../group__GEQ5Band.html',1,'']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/groups_6.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 37 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="files_9.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/files_9.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 245 |
```javascript
var searchData=
[
['interpolation_20functions',['Interpolation Functions',['../group__groupInterpolation.html',1,'']]],
['i',['i',['../unionany32x4__t.html#a6e232dfcd7a652e04fb1bc6aceac95b2',1,'any32x4_t::i()'],['../unionany32x2__t.html#a8ee30a051b7359703a20fa9d1c25b504',1,'any32x2_t::i()']]],
['if',['if',['../Source_2CMakeLists_8txt.html#a2f377352b17e126f542d6083f72197f4',1,'CMakeLists.txt']]],
['ifftflag',['ifftFlag',['../structarm__cfft__radix2__instance__q15.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix2_instance_q15::ifftFlag()'],['../structarm__cfft__radix4__instance__q15.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix4_instance_q15::ifftFlag()'],['../structarm__cfft__radix2__instance__q31.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix2_instance_q31::ifftFlag()'],['../structarm__cfft__radix4__instance__q31.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix4_instance_q31::ifftFlag()'],['../structarm__cfft__radix2__instance__f32.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix2_instance_f32::ifftFlag()'],['../structarm__cfft__radix4__instance__f32.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix4_instance_f32::ifftFlag()'],['../structarm__cfft__radix2__instance__f16.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix2_instance_f16::ifftFlag()'],['../structarm__cfft__radix4__instance__f16.html#ad6ca6e223f986ebfd94c5ee1e410aa73',1,'arm_cfft_radix4_instance_f16::ifftFlag()'],['../arm__fft__bin__example__f32_8c.html#a379ccb99013d369a41b49619083c16ef',1,'ifftFlag(): arm_fft_bin_example_f32.c']]],
['ifftflagr',['ifftFlagR',['../structarm__rfft__instance__q15.html#a787d72055c89e4d62b188d6bd646341c',1,'arm_rfft_instance_q15::ifftFlagR()'],['../structarm__rfft__instance__q31.html#a787d72055c89e4d62b188d6bd646341c',1,'arm_rfft_instance_q31::ifftFlagR()'],['../structarm__rfft__instance__f32.html#a787d72055c89e4d62b188d6bd646341c',1,'arm_rfft_instance_f32::ifftFlagR()']]],
['infinite_20impulse_20response_20_28iir_29_20lattice_20filters',['Infinite Impulse Response (IIR) Lattice Filters',['../group__IIR__Lattice.html',1,'']]],
['include',['include',['../Examples_2ARM_2CMakeLists_8txt.html#aae0662a24fd8c56d9539485f6a32bab2',1,'CMakeLists.txt']]],
['index_5fmask',['INDEX_MASK',['../utils_8h.html#a29f839928f4752b73c8858d6dbb55294',1,'utils.h']]],
['input_5fspacing',['INPUT_SPACING',['../controller__functions_8h.html#a1339e9abc11a3870e0c04f822a62166a',1,'controller_functions.h']]],
['inputq31',['inputQ31',['../arm__graphic__equalizer__example__q31_8c.html#a79521a4d6a9adb144c4d999ae713413c',1,'arm_graphic_equalizer_example_q31.c']]],
['intercept',['intercept',['../structarm__svm__linear__instance__f32.html#a4c677d8d24d26b5f2aeb6162f796460b',1,'arm_svm_linear_instance_f32::intercept()'],['../structarm__svm__polynomial__instance__f32.html#a4c677d8d24d26b5f2aeb6162f796460b',1,'arm_svm_polynomial_instance_f32::intercept()'],['../structarm__svm__rbf__instance__f32.html#a4c677d8d24d26b5f2aeb6162f796460b',1,'arm_svm_rbf_instance_f32::intercept()'],['../structarm__svm__sigmoid__instance__f32.html#a4c677d8d24d26b5f2aeb6162f796460b',1,'arm_svm_sigmoid_instance_f32::intercept()'],['../structarm__svm__linear__instance__f16.html#a1abe530f26ba6a68edea942ebd904a0a',1,'arm_svm_linear_instance_f16::intercept()'],['../structarm__svm__polynomial__instance__f16.html#a1abe530f26ba6a68edea942ebd904a0a',1,'arm_svm_polynomial_instance_f16::intercept()'],['../structarm__svm__rbf__instance__f16.html#a1abe530f26ba6a68edea942ebd904a0a',1,'arm_svm_rbf_instance_f16::intercept()'],['../structarm__svm__sigmoid__instance__f16.html#a1abe530f26ba6a68edea942ebd904a0a',1,'arm_svm_sigmoid_instance_f16::intercept()']]],
['interpolation_5ffunctions_2eh',['interpolation_functions.h',['../interpolation__functions_8h.html',1,'']]],
['interpolation_5ffunctions_5ff16_2eh',['interpolation_functions_f16.h',['../interpolation__functions__f16_8h.html',1,'']]],
['interpolationfunctions_2ec',['InterpolationFunctions.c',['../InterpolationFunctions_8c.html',1,'']]],
['interpolationfunctionsf16_2ec',['InterpolationFunctionsF16.c',['../InterpolationFunctionsF16_8c.html',1,'']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/all_9.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 1,560 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_4.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/functions_4.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 245 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="defines_0.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/defines_0.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 245 |
```javascript
var searchData=
[
['deprecated_20list',['Deprecated List',['../deprecated.html',1,'']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/pages_1.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 22 |
```javascript
var searchData=
[
['revision_20history',['Revision History',['../ChangeLog_pg.html',1,'']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/pages_2.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 24 |
```javascript
var searchData=
[
['cmakelists_2etxt',['CMakeLists.txt',['../Examples_2ARM_2CMakeLists_8txt.html',1,'']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/files_4.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 38 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="groups_8.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/groups_8.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 245 |
```javascript
var searchData=
[
['fixed_20point_20division',['Fixed point division',['../group__divide.html',1,'']]],
['finite_20impulse_20response_20_28fir_29_20filters',['Finite Impulse Response (FIR) Filters',['../group__FIR.html',1,'']]],
['finite_20impulse_20response_20_28fir_29_20decimator',['Finite Impulse Response (FIR) Decimator',['../group__FIR__decimate.html',1,'']]],
['finite_20impulse_20response_20_28fir_29_20interpolator',['Finite Impulse Response (FIR) Interpolator',['../group__FIR__Interpolate.html',1,'']]],
['finite_20impulse_20response_20_28fir_29_20lattice_20filters',['Finite Impulse Response (FIR) Lattice Filters',['../group__FIR__Lattice.html',1,'']]],
['finite_20impulse_20response_20_28fir_29_20sparse_20filters',['Finite Impulse Response (FIR) Sparse Filters',['../group__FIR__Sparse.html',1,'']]],
['fir_20lowpass_20filter_20example',['FIR Lowpass Filter Example',['../group__FIRLPF.html',1,'']]],
['float_20distances',['Float Distances',['../group__FloatDist.html',1,'']]],
['frequency_20bin_20example',['Frequency Bin Example',['../group__FrequencyBin.html',1,'']]],
['fast_20math_20functions',['Fast Math Functions',['../group__groupFastMath.html',1,'']]],
['filtering_20functions',['Filtering Functions',['../group__groupFilters.html',1,'']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/groups_5.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 364 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="defines_6.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/defines_6.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 245 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="namespaces_0.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/namespaces_0.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 246 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="variables_9.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/variables_9.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 245 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="defines_e.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/defines_e.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 244 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="typedefs_2.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/typedefs_2.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 246 |
```javascript
var searchData=
[
['x',['x',['../structarm__spline__instance__f32.html#ad15db0a88cd7095cda0e9b32efbbc772',1,'arm_spline_instance_f32::x()'],['../namespacetrain.html#a7a74e6f2f6355f34b63513f77c839a9e',1,'train.x()']]],
['x0',['x0',['../structarm__lms__norm__instance__f32.html#ab56b6f83c5b324c3ef620474b6e5a6e1',1,'arm_lms_norm_instance_f32::x0()'],['../structarm__lms__norm__instance__q31.html#a973b8350a0c7b113a5f002bc0b86bf76',1,'arm_lms_norm_instance_q31::x0()'],['../structarm__lms__norm__instance__q15.html#a3c975fed200b19723a2ed11efccca6cd',1,'arm_lms_norm_instance_q15::x0()']]],
['x1',['x1',['../structarm__linear__interp__instance__f32.html#a795ed79ea4c18d52afe5eb5e868e1c5a',1,'arm_linear_interp_instance_f32::x1()'],['../structarm__linear__interp__instance__f16.html#a4f7ecfee28de250d7bb9e73f669a467c',1,'arm_linear_interp_instance_f16::x1()'],['../namespacetrain.html#a9e35eade070e30155e7dcc25908be8e8',1,'train.x1()']]],
['x2',['x2',['../namespacetrain.html#a747ee6cc5399a7bbc948c0b0dfc140c0',1,'train']]],
['x3',['x3',['../namespacetrain.html#a86e94041899dd8239a1973b438269b58',1,'train']]],
['x_5ff32',['X_f32',['../arm__matrix__example__f32_8c.html#a98c67c0fc0cb5f2df51b21482d31d21c',1,'arm_matrix_example_f32.c']]],
['x_5fmax',['x_max',['../namespacetrain.html#aea9f93a2cf3c4a208bbd758a0f741f2a',1,'train']]],
['x_5fmin',['x_min',['../namespacetrain.html#ae4ac1a5ae6b3098f763c0b7b474af1f9',1,'train']]],
['x_5ftrain',['X_train',['../namespacetrain.html#ab86dbd36afe7f9791b7ee110a52b2d26',1,'train']]],
['xa',['xa',['../namespacetrain.html#a61a67e5f327713096a497dd257b35687',1,'train']]],
['xref_5ff32',['xRef_f32',['../arm__matrix__example__f32_8c.html#a6184758419722fa16bb883097c2f596b',1,'arm_matrix_example_f32.c']]],
['xspacing',['xSpacing',['../structarm__linear__interp__instance__f32.html#a08675584bb57fc42bbb3739c13674346',1,'arm_linear_interp_instance_f32::xSpacing()'],['../structarm__linear__interp__instance__f16.html#a3ca98ab12e8278b03be58cd48cdbdbab',1,'arm_linear_interp_instance_f16::xSpacing()']]]
];
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/variables_13.js | javascript | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 811 |
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.6">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="defines_f.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
``` | /content/code_sandbox/CMSIS/DoxyGen/DSP/html/search/defines_f.html | html | 2016-02-18T08:04:18 | 2024-08-16T08:24:23 | CMSIS_5 | ARM-software/CMSIS_5 | 1,295 | 244 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.