mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
WiFi library to the new format
This commit is contained in:
parent
e7ef38e27c
commit
fd7e9c6d90
@ -1,163 +0,0 @@
|
||||
/*
|
||||
Wifi Twitter Client with Strings
|
||||
|
||||
This sketch connects to Twitter using using an Arduino WiFi shield.
|
||||
It parses the XML returned, and looks for <text>this is a tweet</text>
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
This example uses the String library, which is part of the Arduino core from
|
||||
version 0019.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached to pins 10, 11, 12, 13
|
||||
|
||||
created 23 apr 2012
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
|
||||
This code is in the public domain.
|
||||
|
||||
*/
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "password"; // your network password (use for WPA, or use as key for WEP)
|
||||
int keyIndex = 0; // your network key Index number (needed only for WEP)
|
||||
|
||||
int status = WL_IDLE_STATUS; // status of the wifi connection
|
||||
|
||||
// initialize the library instance:
|
||||
WiFiClient client;
|
||||
|
||||
const unsigned long requestInterval = 30*1000; // delay between requests; 30 seconds
|
||||
|
||||
// if you don't want to use DNS (and reduce your sketch size)
|
||||
// use the numeric IP instead of the name for the server:
|
||||
//IPAddress server(199,59,149,200); // numeric IP for api.twitter.com
|
||||
char server[] = "api.twitter.com"; // name address for twitter API
|
||||
|
||||
boolean requested; // whether you've made a request since connecting
|
||||
unsigned long lastAttemptTime = 0; // last time you connected to the server, in milliseconds
|
||||
|
||||
String currentLine = ""; // string to hold the text from server
|
||||
String tweet = ""; // string to hold the tweet
|
||||
boolean readingTweet = false; // if you're currently reading the tweet
|
||||
|
||||
void setup() {
|
||||
// reserve space for the strings:
|
||||
currentLine.reserve(256);
|
||||
tweet.reserve(150);
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
// you're connected now, so print out the status:
|
||||
printWifiStatus();
|
||||
connectToServer();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
if (client.connected()) {
|
||||
if (client.available()) {
|
||||
// read incoming bytes:
|
||||
char inChar = client.read();
|
||||
|
||||
// add incoming byte to end of line:
|
||||
currentLine += inChar;
|
||||
|
||||
// if you get a newline, clear the line:
|
||||
if (inChar == '\n') {
|
||||
currentLine = "";
|
||||
}
|
||||
// if the current line ends with <text>, it will
|
||||
// be followed by the tweet:
|
||||
if ( currentLine.endsWith("<text>")) {
|
||||
// tweet is beginning. Clear the tweet string:
|
||||
readingTweet = true;
|
||||
tweet = "";
|
||||
// break out of the loop so this character isn't added to the tweet:
|
||||
return;
|
||||
}
|
||||
// if you're currently reading the bytes of a tweet,
|
||||
// add them to the tweet String:
|
||||
if (readingTweet) {
|
||||
if (inChar != '<') {
|
||||
tweet += inChar;
|
||||
}
|
||||
else {
|
||||
// if you got a "<" character,
|
||||
// you've reached the end of the tweet:
|
||||
readingTweet = false;
|
||||
Serial.println(tweet);
|
||||
// close the connection to the server:
|
||||
client.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (millis() - lastAttemptTime > requestInterval) {
|
||||
// if you're not connected, and two minutes have passed since
|
||||
// your last connection, then attempt to connect again:
|
||||
connectToServer();
|
||||
}
|
||||
}
|
||||
|
||||
void connectToServer() {
|
||||
// attempt to connect, and wait a millisecond:
|
||||
Serial.println("connecting to server...");
|
||||
if (client.connect(server, 80)) {
|
||||
Serial.println("making HTTP request...");
|
||||
// make HTTP GET request to twitter:
|
||||
client.println("GET /1/statuses/user_timeline.xml?screen_name=arduino HTTP/1.1");
|
||||
client.println("Host: api.twitter.com");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
}
|
||||
// note the time of this connect attempt:
|
||||
lastAttemptTime = millis();
|
||||
}
|
||||
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
/*
|
||||
*
|
||||
@file socket.c
|
||||
@brief define function of socket API
|
||||
*
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
#include "socket.h"
|
||||
|
||||
SOCKET socket(uint8 protocol) {return 0;} // Opens a socket(TCP or UDP or IP_RAW mode)
|
||||
void close(SOCKET s) {} // Close socket
|
||||
uint8 connect(SOCKET s, uint8 * addr, uint16 port) {return 0;} // Establish TCP connection (Active connection)
|
||||
void disconnect(SOCKET s) {} // disconnect the connection
|
||||
uint8 listen(SOCKET s) { return 0;} // Establish TCP connection (Passive connection)
|
||||
uint16 send(SOCKET s, const uint8 * buf, uint16 len) { return 0;} // Send data (TCP)
|
||||
uint16 recv(SOCKET s, uint8 * buf, uint16 len) {return 0;} // Receive data (TCP)
|
||||
uint16 sendto(SOCKET s, const uint8 * buf, uint16 len, uint8 * addr, uint16 port) {return 0;} // Send data (UDP/IP RAW)
|
||||
uint16 recvfrom(SOCKET s, uint8 * buf, uint16 len, uint8 * addr, uint16 *port) {return 0;} // Receive data (UDP/IP RAW)
|
||||
|
||||
uint16 igmpsend(SOCKET s, const uint8 * buf, uint16 len) {return 0;}
|
@ -1,199 +0,0 @@
|
||||
#include "wifi_drv.h"
|
||||
#include "WiFi.h"
|
||||
|
||||
extern "C" {
|
||||
#include "utility/wl_definitions.h"
|
||||
#include "utility/wl_types.h"
|
||||
#include "debug.h"
|
||||
}
|
||||
|
||||
// XXX: don't make assumptions about the value of MAX_SOCK_NUM.
|
||||
int16_t WiFiClass::_state[MAX_SOCK_NUM] = { 0, 0, 0, 0 };
|
||||
uint16_t WiFiClass::_server_port[MAX_SOCK_NUM] = { 0, 0, 0, 0 };
|
||||
|
||||
WiFiClass::WiFiClass()
|
||||
{
|
||||
// Driver initialization
|
||||
init();
|
||||
}
|
||||
|
||||
void WiFiClass::init()
|
||||
{
|
||||
WiFiDrv::wifiDriverInit();
|
||||
}
|
||||
|
||||
uint8_t WiFiClass::getSocket()
|
||||
{
|
||||
for (uint8_t i = 0; i < MAX_SOCK_NUM; ++i)
|
||||
{
|
||||
if (WiFiClass::_server_port[i] == 0)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return NO_SOCKET_AVAIL;
|
||||
}
|
||||
|
||||
char* WiFiClass::firmwareVersion()
|
||||
{
|
||||
return WiFiDrv::getFwVersion();
|
||||
}
|
||||
|
||||
int WiFiClass::begin(char* ssid)
|
||||
{
|
||||
uint8_t status = WL_IDLE_STATUS;
|
||||
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
|
||||
|
||||
if (WiFiDrv::wifiSetNetwork(ssid, strlen(ssid)) != WL_FAILURE)
|
||||
{
|
||||
do
|
||||
{
|
||||
delay(WL_DELAY_START_CONNECTION);
|
||||
status = WiFiDrv::getConnectionStatus();
|
||||
}
|
||||
while ((( status == WL_IDLE_STATUS)||(status == WL_SCAN_COMPLETED))&&(--attempts>0));
|
||||
}else
|
||||
{
|
||||
status = WL_CONNECT_FAILED;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int WiFiClass::begin(char* ssid, uint8_t key_idx, const char *key)
|
||||
{
|
||||
uint8_t status = WL_IDLE_STATUS;
|
||||
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
|
||||
|
||||
// set encryption key
|
||||
if (WiFiDrv::wifiSetKey(ssid, strlen(ssid), key_idx, key, strlen(key)) != WL_FAILURE)
|
||||
{
|
||||
do
|
||||
{
|
||||
delay(WL_DELAY_START_CONNECTION);
|
||||
status = WiFiDrv::getConnectionStatus();
|
||||
}
|
||||
while ((( status == WL_IDLE_STATUS)||(status == WL_SCAN_COMPLETED))&&(--attempts>0));
|
||||
}else{
|
||||
status = WL_CONNECT_FAILED;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int WiFiClass::begin(char* ssid, const char *passphrase)
|
||||
{
|
||||
uint8_t status = WL_IDLE_STATUS;
|
||||
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
|
||||
|
||||
// set passphrase
|
||||
if (WiFiDrv::wifiSetPassphrase(ssid, strlen(ssid), passphrase, strlen(passphrase))!= WL_FAILURE)
|
||||
{
|
||||
do
|
||||
{
|
||||
delay(WL_DELAY_START_CONNECTION);
|
||||
status = WiFiDrv::getConnectionStatus();
|
||||
}
|
||||
while ((( status == WL_IDLE_STATUS)||(status == WL_SCAN_COMPLETED))&&(--attempts>0));
|
||||
}else{
|
||||
status = WL_CONNECT_FAILED;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int WiFiClass::disconnect()
|
||||
{
|
||||
return WiFiDrv::disconnect();
|
||||
}
|
||||
|
||||
uint8_t* WiFiClass::macAddress(uint8_t* mac)
|
||||
{
|
||||
uint8_t* _mac = WiFiDrv::getMacAddress();
|
||||
memcpy(mac, _mac, WL_MAC_ADDR_LENGTH);
|
||||
return mac;
|
||||
}
|
||||
|
||||
IPAddress WiFiClass::localIP()
|
||||
{
|
||||
IPAddress ret;
|
||||
WiFiDrv::getIpAddress(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
IPAddress WiFiClass::subnetMask()
|
||||
{
|
||||
IPAddress ret;
|
||||
WiFiDrv::getSubnetMask(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
IPAddress WiFiClass::gatewayIP()
|
||||
{
|
||||
IPAddress ret;
|
||||
WiFiDrv::getGatewayIP(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
char* WiFiClass::SSID()
|
||||
{
|
||||
return WiFiDrv::getCurrentSSID();
|
||||
}
|
||||
|
||||
uint8_t* WiFiClass::BSSID(uint8_t* bssid)
|
||||
{
|
||||
uint8_t* _bssid = WiFiDrv::getCurrentBSSID();
|
||||
memcpy(bssid, _bssid, WL_MAC_ADDR_LENGTH);
|
||||
return bssid;
|
||||
}
|
||||
|
||||
int32_t WiFiClass::RSSI()
|
||||
{
|
||||
return WiFiDrv::getCurrentRSSI();
|
||||
}
|
||||
|
||||
uint8_t WiFiClass::encryptionType()
|
||||
{
|
||||
return WiFiDrv::getCurrentEncryptionType();
|
||||
}
|
||||
|
||||
|
||||
int8_t WiFiClass::scanNetworks()
|
||||
{
|
||||
uint8_t attempts = 10;
|
||||
uint8_t numOfNetworks = 0;
|
||||
|
||||
if (WiFiDrv::startScanNetworks() == WL_FAILURE)
|
||||
return WL_FAILURE;
|
||||
do
|
||||
{
|
||||
delay(2000);
|
||||
numOfNetworks = WiFiDrv::getScanNetworks();
|
||||
}
|
||||
while (( numOfNetworks == 0)&&(--attempts>0));
|
||||
return numOfNetworks;
|
||||
}
|
||||
|
||||
char* WiFiClass::SSID(uint8_t networkItem)
|
||||
{
|
||||
return WiFiDrv::getSSIDNetoworks(networkItem);
|
||||
}
|
||||
|
||||
int32_t WiFiClass::RSSI(uint8_t networkItem)
|
||||
{
|
||||
return WiFiDrv::getRSSINetoworks(networkItem);
|
||||
}
|
||||
|
||||
uint8_t WiFiClass::encryptionType(uint8_t networkItem)
|
||||
{
|
||||
return WiFiDrv::getEncTypeNetowrks(networkItem);
|
||||
}
|
||||
|
||||
uint8_t WiFiClass::status()
|
||||
{
|
||||
return WiFiDrv::getConnectionStatus();
|
||||
}
|
||||
|
||||
int WiFiClass::hostByName(const char* aHostname, IPAddress& aResult)
|
||||
{
|
||||
return WiFiDrv::getHostByName(aHostname, aResult);
|
||||
}
|
||||
|
||||
WiFiClass WiFi;
|
@ -1,183 +0,0 @@
|
||||
#ifndef WiFi_h
|
||||
#define WiFi_h
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
extern "C" {
|
||||
#include "utility/wl_definitions.h"
|
||||
#include "utility/wl_types.h"
|
||||
}
|
||||
|
||||
#include "IPAddress.h"
|
||||
#include "WiFiClient.h"
|
||||
#include "WiFiServer.h"
|
||||
|
||||
class WiFiClass
|
||||
{
|
||||
private:
|
||||
|
||||
static void init();
|
||||
public:
|
||||
static int16_t _state[MAX_SOCK_NUM];
|
||||
static uint16_t _server_port[MAX_SOCK_NUM];
|
||||
|
||||
WiFiClass();
|
||||
|
||||
/*
|
||||
* Get the first socket available
|
||||
*/
|
||||
static uint8_t getSocket();
|
||||
|
||||
/*
|
||||
* Get firmware version
|
||||
*/
|
||||
static char* firmwareVersion();
|
||||
|
||||
|
||||
/* Start Wifi connection for OPEN networks
|
||||
*
|
||||
* param ssid: Pointer to the SSID string.
|
||||
*/
|
||||
int begin(char* ssid);
|
||||
|
||||
/* Start Wifi connection with WEP encryption.
|
||||
* Configure a key into the device. The key type (WEP-40, WEP-104)
|
||||
* is determined by the size of the key (5 bytes for WEP-40, 13 bytes for WEP-104).
|
||||
*
|
||||
* param ssid: Pointer to the SSID string.
|
||||
* param key_idx: The key index to set. Valid values are 0-3.
|
||||
* param key: Key input buffer.
|
||||
*/
|
||||
int begin(char* ssid, uint8_t key_idx, const char* key);
|
||||
|
||||
/* Start Wifi connection with passphrase
|
||||
* the most secure supported mode will be automatically selected
|
||||
*
|
||||
* param ssid: Pointer to the SSID string.
|
||||
* param passphrase: Passphrase. Valid characters in a passphrase
|
||||
* must be between ASCII 32-126 (decimal).
|
||||
*/
|
||||
int begin(char* ssid, const char *passphrase);
|
||||
|
||||
/*
|
||||
* Disconnect from the network
|
||||
*
|
||||
* return: one value of wl_status_t enum
|
||||
*/
|
||||
int disconnect(void);
|
||||
|
||||
/*
|
||||
* Get the interface MAC address.
|
||||
*
|
||||
* return: pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
|
||||
*/
|
||||
uint8_t* macAddress(uint8_t* mac);
|
||||
|
||||
/*
|
||||
* Get the interface IP address.
|
||||
*
|
||||
* return: Ip address value
|
||||
*/
|
||||
IPAddress localIP();
|
||||
|
||||
/*
|
||||
* Get the interface subnet mask address.
|
||||
*
|
||||
* return: subnet mask address value
|
||||
*/
|
||||
IPAddress subnetMask();
|
||||
|
||||
/*
|
||||
* Get the gateway ip address.
|
||||
*
|
||||
* return: gateway ip address value
|
||||
*/
|
||||
IPAddress gatewayIP();
|
||||
|
||||
/*
|
||||
* Return the current SSID associated with the network
|
||||
*
|
||||
* return: ssid string
|
||||
*/
|
||||
char* SSID();
|
||||
|
||||
/*
|
||||
* Return the current BSSID associated with the network.
|
||||
* It is the MAC address of the Access Point
|
||||
*
|
||||
* return: pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
|
||||
*/
|
||||
uint8_t* BSSID(uint8_t* bssid);
|
||||
|
||||
/*
|
||||
* Return the current RSSI /Received Signal Strength in dBm)
|
||||
* associated with the network
|
||||
*
|
||||
* return: signed value
|
||||
*/
|
||||
int32_t RSSI();
|
||||
|
||||
/*
|
||||
* Return the Encryption Type associated with the network
|
||||
*
|
||||
* return: one value of wl_enc_type enum
|
||||
*/
|
||||
uint8_t encryptionType();
|
||||
|
||||
/*
|
||||
* Start scan WiFi networks available
|
||||
*
|
||||
* return: Number of discovered networks
|
||||
*/
|
||||
int8_t scanNetworks();
|
||||
|
||||
/*
|
||||
* Return the SSID discovered during the network scan.
|
||||
*
|
||||
* param networkItem: specify from which network item want to get the information
|
||||
*
|
||||
* return: ssid string of the specified item on the networks scanned list
|
||||
*/
|
||||
char* SSID(uint8_t networkItem);
|
||||
|
||||
/*
|
||||
* Return the encryption type of the networks discovered during the scanNetworks
|
||||
*
|
||||
* param networkItem: specify from which network item want to get the information
|
||||
*
|
||||
* return: encryption type (enum wl_enc_type) of the specified item on the networks scanned list
|
||||
*/
|
||||
uint8_t encryptionType(uint8_t networkItem);
|
||||
|
||||
/*
|
||||
* Return the RSSI of the networks discovered during the scanNetworks
|
||||
*
|
||||
* param networkItem: specify from which network item want to get the information
|
||||
*
|
||||
* return: signed value of RSSI of the specified item on the networks scanned list
|
||||
*/
|
||||
int32_t RSSI(uint8_t networkItem);
|
||||
|
||||
/*
|
||||
* Return Connection status.
|
||||
*
|
||||
* return: one of the value defined in wl_status_t
|
||||
*/
|
||||
uint8_t status();
|
||||
|
||||
/*
|
||||
* Resolve the given hostname to an IP address.
|
||||
* param aHostname: Name to be resolved
|
||||
* param aResult: IPAddress structure to store the returned IP address
|
||||
* result: 1 if aIPAddrString was successfully converted to an IP address,
|
||||
* else error code
|
||||
*/
|
||||
int hostByName(const char* aHostname, IPAddress& aResult);
|
||||
|
||||
friend class WiFiClient;
|
||||
friend class WiFiServer;
|
||||
};
|
||||
|
||||
extern WiFiClass WiFi;
|
||||
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
#ifndef wificlient_h
|
||||
#define wificlient_h
|
||||
#include "Arduino.h"
|
||||
#include "Print.h"
|
||||
#include "Client.h"
|
||||
#include "IPAddress.h"
|
||||
|
||||
class WiFiClient : public Client {
|
||||
|
||||
public:
|
||||
WiFiClient();
|
||||
WiFiClient(uint8_t sock);
|
||||
|
||||
uint8_t status();
|
||||
virtual int connect(IPAddress ip, uint16_t port);
|
||||
virtual int connect(const char *host, uint16_t port);
|
||||
virtual size_t write(uint8_t);
|
||||
virtual size_t write(const uint8_t *buf, size_t size);
|
||||
virtual int available();
|
||||
virtual int read();
|
||||
virtual int read(uint8_t *buf, size_t size);
|
||||
virtual int peek();
|
||||
virtual void flush();
|
||||
virtual void stop();
|
||||
virtual uint8_t connected();
|
||||
virtual operator bool();
|
||||
|
||||
friend class WiFiServer;
|
||||
|
||||
using Print::write;
|
||||
|
||||
private:
|
||||
static uint16_t _srcport;
|
||||
uint8_t _sock; //not used
|
||||
uint16_t _socket;
|
||||
|
||||
uint8_t getFirstSocket();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,88 +0,0 @@
|
||||
#include <string.h>
|
||||
#include "server_drv.h"
|
||||
|
||||
extern "C" {
|
||||
#include "utility/debug.h"
|
||||
}
|
||||
|
||||
#include "WiFi.h"
|
||||
#include "WiFiClient.h"
|
||||
#include "WiFiServer.h"
|
||||
|
||||
WiFiServer::WiFiServer(uint16_t port)
|
||||
{
|
||||
_port = port;
|
||||
}
|
||||
|
||||
void WiFiServer::begin()
|
||||
{
|
||||
uint8_t _sock = WiFiClass::getSocket();
|
||||
if (_sock != NO_SOCKET_AVAIL)
|
||||
{
|
||||
ServerDrv::startServer(_port, _sock);
|
||||
WiFiClass::_server_port[_sock] = _port;
|
||||
}
|
||||
}
|
||||
|
||||
WiFiClient WiFiServer::available(byte* status)
|
||||
{
|
||||
static int cycle_server_down = 0;
|
||||
const int TH_SERVER_DOWN = 50;
|
||||
|
||||
for (int sock = 0; sock < MAX_SOCK_NUM; sock++)
|
||||
{
|
||||
if (WiFiClass::_server_port[sock] == _port)
|
||||
{
|
||||
WiFiClient client(sock);
|
||||
uint8_t _status = client.status();
|
||||
uint8_t _ser_status = this->status();
|
||||
|
||||
if (status != NULL)
|
||||
*status = _status;
|
||||
|
||||
//server not in listen state, restart it
|
||||
if ((_ser_status == 0)&&(cycle_server_down++ > TH_SERVER_DOWN))
|
||||
{
|
||||
ServerDrv::startServer(_port, sock);
|
||||
cycle_server_down = 0;
|
||||
}
|
||||
|
||||
if (_status == ESTABLISHED)
|
||||
{
|
||||
return client; //TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return WiFiClient(255);
|
||||
}
|
||||
|
||||
uint8_t WiFiServer::status() {
|
||||
return ServerDrv::getServerState(0);
|
||||
}
|
||||
|
||||
|
||||
size_t WiFiServer::write(uint8_t b)
|
||||
{
|
||||
return write(&b, 1);
|
||||
}
|
||||
|
||||
size_t WiFiServer::write(const uint8_t *buffer, size_t size)
|
||||
{
|
||||
size_t n = 0;
|
||||
|
||||
for (int sock = 0; sock < MAX_SOCK_NUM; sock++)
|
||||
{
|
||||
if (WiFiClass::_server_port[sock] != 0)
|
||||
{
|
||||
WiFiClient client(sock);
|
||||
|
||||
if (WiFiClass::_server_port[sock] == _port &&
|
||||
client.status() == ESTABLISHED)
|
||||
{
|
||||
n+=client.write(buffer, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
#ifndef wifiserver_h
|
||||
#define wifiserver_h
|
||||
|
||||
extern "C" {
|
||||
#include "utility/wl_definitions.h"
|
||||
}
|
||||
|
||||
#include "Server.h"
|
||||
|
||||
class WiFiClient;
|
||||
|
||||
class WiFiServer : public Server {
|
||||
private:
|
||||
uint16_t _port;
|
||||
void* pcb;
|
||||
public:
|
||||
WiFiServer(uint16_t);
|
||||
WiFiClient available(uint8_t* status = NULL);
|
||||
void begin();
|
||||
virtual size_t write(uint8_t);
|
||||
virtual size_t write(const uint8_t *buf, size_t size);
|
||||
uint8_t status();
|
||||
|
||||
using Print::write;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,123 +0,0 @@
|
||||
/*
|
||||
|
||||
This example connects to an unencrypted Wifi network.
|
||||
Then it prints the MAC address of the Wifi shield,
|
||||
the IP address obtained, and other network details.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
|
||||
created 13 July 2010
|
||||
by dlf (Metodo2 srl)
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // the name of your network
|
||||
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to open SSID: ");
|
||||
Serial.println(ssid);
|
||||
status = WiFi.begin(ssid);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
|
||||
// you're connected now, so print out the data:
|
||||
Serial.print("You're connected to the network");
|
||||
printCurrentNet();
|
||||
printWifiData();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// check the network connection once every 10 seconds:
|
||||
delay(10000);
|
||||
printCurrentNet();
|
||||
}
|
||||
|
||||
void printWifiData() {
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
Serial.println(ip);
|
||||
|
||||
// print your MAC address:
|
||||
byte mac[6];
|
||||
WiFi.macAddress(mac);
|
||||
Serial.print("MAC address: ");
|
||||
Serial.print(mac[5],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[4],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[3],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[2],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[1],HEX);
|
||||
Serial.print(":");
|
||||
Serial.println(mac[0],HEX);
|
||||
|
||||
// print your subnet mask:
|
||||
IPAddress subnet = WiFi.subnetMask();
|
||||
Serial.print("NetMask: ");
|
||||
Serial.println(subnet);
|
||||
|
||||
// print your gateway address:
|
||||
IPAddress gateway = WiFi.gatewayIP();
|
||||
Serial.print("Gateway: ");
|
||||
Serial.println(gateway);
|
||||
}
|
||||
|
||||
void printCurrentNet() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print the MAC address of the router you're attached to:
|
||||
byte bssid[6];
|
||||
WiFi.BSSID(bssid);
|
||||
Serial.print("BSSID: ");
|
||||
Serial.print(bssid[5],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[4],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[3],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[2],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[1],HEX);
|
||||
Serial.print(":");
|
||||
Serial.println(bssid[0],HEX);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.println(rssi);
|
||||
|
||||
// print the encryption type:
|
||||
byte encryption = WiFi.encryptionType();
|
||||
Serial.print("Encryption Type:");
|
||||
Serial.println(encryption,HEX);
|
||||
}
|
||||
|
@ -1,128 +0,0 @@
|
||||
/*
|
||||
|
||||
This example connects to a WEP-encrypted Wifi network.
|
||||
Then it prints the MAC address of the Wifi shield,
|
||||
the IP address obtained, and other network details.
|
||||
|
||||
If you use 40-bit WEP, you need a key that is 10 characters long,
|
||||
and the characters must be hexadecimal (0-9 or A-F).
|
||||
e.g. for 40-bit, ABBADEAF01 will work, but ABBADEAF won't work
|
||||
(too short) and ABBAISDEAF won't work (I and S are not
|
||||
hexadecimal characters).
|
||||
|
||||
For 128-bit, you need a string that is 26 characters long.
|
||||
D0D0DEADF00DABBADEAFBEADED will work because it's 26 characters,
|
||||
all in the 0-9, A-F range.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
|
||||
created 13 July 2010
|
||||
by dlf (Metodo2 srl)
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char key[] = "D0D0DEADF00DABBADEAFBEADED"; // your network key
|
||||
int keyIndex = 0; // your network key Index number
|
||||
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to WEP network, SSID: ");
|
||||
Serial.println(ssid);
|
||||
status = WiFi.begin(ssid, keyIndex, key);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
|
||||
// once you are connected :
|
||||
Serial.print("You're connected to the network");
|
||||
printCurrentNet();
|
||||
printWifiData();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// check the network connection once every 10 seconds:
|
||||
delay(10000);
|
||||
printCurrentNet();
|
||||
}
|
||||
|
||||
void printWifiData() {
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
Serial.println(ip);
|
||||
|
||||
// print your MAC address:
|
||||
byte mac[6];
|
||||
WiFi.macAddress(mac);
|
||||
Serial.print("MAC address: ");
|
||||
Serial.print(mac[5],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[4],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[3],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[2],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[1],HEX);
|
||||
Serial.print(":");
|
||||
Serial.println(mac[0],HEX);
|
||||
}
|
||||
|
||||
void printCurrentNet() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print the MAC address of the router you're attached to:
|
||||
byte bssid[6];
|
||||
WiFi.BSSID(bssid);
|
||||
Serial.print("BSSID: ");
|
||||
Serial.print(bssid[5],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[4],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[3],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[2],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[1],HEX);
|
||||
Serial.print(":");
|
||||
Serial.println(bssid[0],HEX);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.println(rssi);
|
||||
|
||||
// print the encryption type:
|
||||
byte encryption = WiFi.encryptionType();
|
||||
Serial.print("Encryption Type:");
|
||||
Serial.println(encryption,HEX);
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,118 +0,0 @@
|
||||
/*
|
||||
|
||||
This example connects to an unencrypted Wifi network.
|
||||
Then it prints the MAC address of the Wifi shield,
|
||||
the IP address obtained, and other network details.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
|
||||
created 13 July 2010
|
||||
by dlf (Metodo2 srl)
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password
|
||||
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to WPA SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
|
||||
// you're connected now, so print out the data:
|
||||
Serial.print("You're connected to the network");
|
||||
printCurrentNet();
|
||||
printWifiData();
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// check the network connection once every 10 seconds:
|
||||
delay(10000);
|
||||
printCurrentNet();
|
||||
}
|
||||
|
||||
void printWifiData() {
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
Serial.println(ip);
|
||||
|
||||
// print your MAC address:
|
||||
byte mac[6];
|
||||
WiFi.macAddress(mac);
|
||||
Serial.print("MAC address: ");
|
||||
Serial.print(mac[5],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[4],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[3],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[2],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[1],HEX);
|
||||
Serial.print(":");
|
||||
Serial.println(mac[0],HEX);
|
||||
|
||||
}
|
||||
|
||||
void printCurrentNet() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print the MAC address of the router you're attached to:
|
||||
byte bssid[6];
|
||||
WiFi.BSSID(bssid);
|
||||
Serial.print("BSSID: ");
|
||||
Serial.print(bssid[5],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[4],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[3],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[2],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(bssid[1],HEX);
|
||||
Serial.print(":");
|
||||
Serial.println(bssid[0],HEX);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.println(rssi);
|
||||
|
||||
// print the encryption type:
|
||||
byte encryption = WiFi.encryptionType();
|
||||
Serial.print("Encryption Type:");
|
||||
Serial.println(encryption,HEX);
|
||||
Serial.println();
|
||||
}
|
||||
|
@ -1,118 +0,0 @@
|
||||
/*
|
||||
|
||||
This example prints the Wifi shield's MAC address, and
|
||||
scans for available Wifi networks using the Wifi shield.
|
||||
Every ten seconds, it scans again. It doesn't actually
|
||||
connect to any network, so no encryption scheme is specified.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
|
||||
created 13 July 2010
|
||||
by dlf (Metodo2 srl)
|
||||
modified 21 Junn 2012
|
||||
by Tom Igoe and Jaymes Dec
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// Print WiFi MAC address:
|
||||
printMacAddress();
|
||||
|
||||
// scan for existing networks:
|
||||
Serial.println("Scanning available networks...");
|
||||
listNetworks();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
delay(10000);
|
||||
// scan for existing networks:
|
||||
Serial.println("Scanning available networks...");
|
||||
listNetworks();
|
||||
}
|
||||
|
||||
void printMacAddress() {
|
||||
// the MAC address of your Wifi shield
|
||||
byte mac[6];
|
||||
|
||||
// print your MAC address:
|
||||
WiFi.macAddress(mac);
|
||||
Serial.print("MAC: ");
|
||||
Serial.print(mac[5],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[4],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[3],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[2],HEX);
|
||||
Serial.print(":");
|
||||
Serial.print(mac[1],HEX);
|
||||
Serial.print(":");
|
||||
Serial.println(mac[0],HEX);
|
||||
}
|
||||
|
||||
void listNetworks() {
|
||||
// scan for nearby networks:
|
||||
Serial.println("** Scan Networks **");
|
||||
int numSsid = WiFi.scanNetworks();
|
||||
if (numSsid == -1)
|
||||
{
|
||||
Serial.println("Couldn't get a wifi connection");
|
||||
while(true);
|
||||
}
|
||||
|
||||
// print the list of networks seen:
|
||||
Serial.print("number of available networks:");
|
||||
Serial.println(numSsid);
|
||||
|
||||
// print the network number and name for each network found:
|
||||
for (int thisNet = 0; thisNet<numSsid; thisNet++) {
|
||||
Serial.print(thisNet);
|
||||
Serial.print(") ");
|
||||
Serial.print(WiFi.SSID(thisNet));
|
||||
Serial.print("\tSignal: ");
|
||||
Serial.print(WiFi.RSSI(thisNet));
|
||||
Serial.print(" dBm");
|
||||
Serial.print("\tEncryption: ");
|
||||
printEncryptionType(WiFi.encryptionType(thisNet));
|
||||
}
|
||||
}
|
||||
|
||||
void printEncryptionType(int thisType) {
|
||||
// read the encryption type and print out the name:
|
||||
switch (thisType) {
|
||||
case ENC_TYPE_WEP:
|
||||
Serial.println("WEP");
|
||||
break;
|
||||
case ENC_TYPE_TKIP:
|
||||
Serial.println("WPA");
|
||||
break;
|
||||
case ENC_TYPE_CCMP:
|
||||
Serial.println("WPA2");
|
||||
break;
|
||||
case ENC_TYPE_NONE:
|
||||
Serial.println("None");
|
||||
break;
|
||||
case ENC_TYPE_AUTO:
|
||||
Serial.println("Auto");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,130 +0,0 @@
|
||||
/*
|
||||
WiFi Web Server LED Blink
|
||||
|
||||
A simple web server that lets you blink an LED via the web.
|
||||
This sketch will print the IP address of your WiFi Shield (once connected)
|
||||
to the Serial monitor. From there, you can open that address in a web browser
|
||||
to turn on and off the LED on pin 9.
|
||||
|
||||
If the IP address of your shield is yourAddress:
|
||||
http://yourAddress/H turns the LED on
|
||||
http://yourAddress/L turns it off
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
* LED attached to pin 9
|
||||
|
||||
created 25 Nov 2012
|
||||
by Tom Igoe
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password
|
||||
int keyIndex = 0; // your network key Index number (needed only for WEP)
|
||||
|
||||
int status = WL_IDLE_STATUS;
|
||||
WiFiServer server(80);
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600); // initialize serial communication
|
||||
pinMode(9, OUTPUT); // set the LED pin mode
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
while(true); // don't continue
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to Network named: ");
|
||||
Serial.println(ssid); // print the network name (SSID);
|
||||
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
server.begin(); // start the web server on port 80
|
||||
printWifiStatus(); // you're connected now, so print out the status
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
WiFiClient client = server.available(); // listen for incoming clients
|
||||
|
||||
if (client) { // if you get a client,
|
||||
Serial.println("new client"); // print a message out the serial port
|
||||
String currentLine = ""; // make a String to hold incoming data from the client
|
||||
while (client.connected()) { // loop while the client's connected
|
||||
if (client.available()) { // if there's bytes to read from the client,
|
||||
char c = client.read(); // read a byte, then
|
||||
Serial.write(c); // print it out the serial monitor
|
||||
if (c == '\n') { // if the byte is a newline character
|
||||
|
||||
// if the current line is blank, you got two newline characters in a row.
|
||||
// that's the end of the client HTTP request, so send a response:
|
||||
if (currentLine.length() == 0) {
|
||||
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
|
||||
// and a content-type so the client knows what's coming, then a blank line:
|
||||
client.println("HTTP/1.1 200 OK");
|
||||
client.println("Content-type:text/html");
|
||||
client.println();
|
||||
|
||||
// the content of the HTTP response follows the header:
|
||||
client.print("Click <a href=\"/H\">here</a> turn the LED on pin 9 on<br>");
|
||||
client.print("Click <a href=\"/L\">here</a> turn the LED on pin 9 off<br>");
|
||||
|
||||
// The HTTP response ends with another blank line:
|
||||
client.println();
|
||||
// break out of the while loop:
|
||||
break;
|
||||
}
|
||||
else { // if you got a newline, then clear currentLine:
|
||||
currentLine = "";
|
||||
}
|
||||
}
|
||||
else if (c != '\r') { // if you got anything else but a carriage return character,
|
||||
currentLine += c; // add it to the end of the currentLine
|
||||
}
|
||||
|
||||
// Check to see if the client request was "GET /H" or "GET /L":
|
||||
if (currentLine.endsWith("GET /H")) {
|
||||
digitalWrite(9, HIGH); // GET /H turns the LED on
|
||||
}
|
||||
if (currentLine.endsWith("GET /L")) {
|
||||
digitalWrite(9, LOW); // GET /L turns the LED off
|
||||
}
|
||||
}
|
||||
}
|
||||
// close the connection:
|
||||
client.stop();
|
||||
Serial.println("client disonnected");
|
||||
}
|
||||
}
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
// print where to go in a browser:
|
||||
Serial.print("To see this page in action, open a browser to http://");
|
||||
Serial.println(ip);
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
/*
|
||||
Chat Server
|
||||
|
||||
A simple server that distributes any incoming messages to all
|
||||
connected clients. To use telnet to your device's IP address and type.
|
||||
You can see the client's input in the serial monitor as well.
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
|
||||
created 18 Dec 2009
|
||||
by David A. Mellis
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password (use for WPA, or use as key for WEP)
|
||||
|
||||
int keyIndex = 0; // your network key Index number (needed only for WEP)
|
||||
|
||||
int status = WL_IDLE_STATUS;
|
||||
|
||||
WiFiServer server(23);
|
||||
|
||||
boolean alreadyConnected = false; // whether or not the client was connected previously
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
// start the server:
|
||||
server.begin();
|
||||
// you're connected now, so print out the status:
|
||||
printWifiStatus();
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// wait for a new client:
|
||||
WiFiClient client = server.available();
|
||||
|
||||
|
||||
// when the client sends the first byte, say hello:
|
||||
if (client) {
|
||||
if (!alreadyConnected) {
|
||||
// clead out the input buffer:
|
||||
client.flush();
|
||||
Serial.println("We have a new client");
|
||||
client.println("Hello, client!");
|
||||
alreadyConnected = true;
|
||||
}
|
||||
|
||||
if (client.available() > 0) {
|
||||
// read the bytes incoming from the client:
|
||||
char thisChar = client.read();
|
||||
// echo the bytes back to the client:
|
||||
server.write(thisChar);
|
||||
// echo the bytes to the server as well:
|
||||
Serial.write(thisChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
||||
|
@ -1,191 +0,0 @@
|
||||
/*
|
||||
Wifi Pachube sensor client
|
||||
|
||||
This sketch connects an analog sensor to Pachube (http://www.pachube.com)
|
||||
using an Arduino Wifi shield.
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
This example has been updated to use version 2.0 of the Pachube API.
|
||||
To make it work, create a feed with a datastream, and give it the ID
|
||||
sensor1. Or change the code below to match your feed.
|
||||
|
||||
Circuit:
|
||||
* Analog sensor attached to analog in 0
|
||||
* Wifi shield attached to pins 10, 11, 12, 13
|
||||
|
||||
created 13 Mar 2012
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
modified 8 Sept 2012
|
||||
by Scott Fitzgerald
|
||||
|
||||
This code is in the public domain.
|
||||
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
#define APIKEY "YOUR API KEY GOES HERE" // replace your pachube api key here
|
||||
#define FEEDID 00000 // replace your feed ID
|
||||
#define USERAGENT "My Arduino Project" // user agent is the project name
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password
|
||||
|
||||
int status = WL_IDLE_STATUS;
|
||||
|
||||
// initialize the library instance:
|
||||
WiFiClient client;
|
||||
// if you don't want to use DNS (and reduce your sketch size)
|
||||
// use the numeric IP instead of the name for the server:
|
||||
IPAddress server(216,52,233,121); // numeric IP for api.pachube.com
|
||||
//char server[] = "api.pachube.com"; // name address for pachube API
|
||||
|
||||
unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
|
||||
boolean lastConnected = false; // state of the connection last time through the main loop
|
||||
const unsigned long postingInterval = 10*1000; //delay between updates to pachube.com
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
// you're connected now, so print out the status:
|
||||
printWifiStatus();
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// read the analog sensor:
|
||||
int sensorReading = analogRead(A0);
|
||||
|
||||
// if there's incoming data from the net connection.
|
||||
// send it out the serial port. This is for debugging
|
||||
// purposes only:
|
||||
while (client.available()) {
|
||||
char c = client.read();
|
||||
Serial.print(c);
|
||||
}
|
||||
|
||||
// if there's no net connection, but there was one last time
|
||||
// through the loop, then stop the client:
|
||||
if (!client.connected() && lastConnected) {
|
||||
Serial.println();
|
||||
Serial.println("disconnecting.");
|
||||
client.stop();
|
||||
}
|
||||
|
||||
// if you're not connected, and ten seconds have passed since
|
||||
// your last connection, then connect again and send data:
|
||||
if(!client.connected() && (millis() - lastConnectionTime > postingInterval)) {
|
||||
sendData(sensorReading);
|
||||
}
|
||||
// store the state of the connection for next time through
|
||||
// the loop:
|
||||
lastConnected = client.connected();
|
||||
}
|
||||
|
||||
// this method makes a HTTP connection to the server:
|
||||
void sendData(int thisData) {
|
||||
// if there's a successful connection:
|
||||
if (client.connect(server, 80)) {
|
||||
Serial.println("connecting...");
|
||||
// send the HTTP PUT request:
|
||||
client.print("PUT /v2/feeds/");
|
||||
client.print(FEEDID);
|
||||
client.println(".csv HTTP/1.1");
|
||||
client.println("Host: api.pachube.com");
|
||||
client.print("X-ApiKey: ");
|
||||
client.println(APIKEY);
|
||||
client.print("User-Agent: ");
|
||||
client.println(USERAGENT);
|
||||
client.print("Content-Length: ");
|
||||
|
||||
// calculate the length of the sensor reading in bytes:
|
||||
// 8 bytes for "sensor1," + number of digits of the data:
|
||||
int thisLength = 8 + getLength(thisData);
|
||||
client.println(thisLength);
|
||||
|
||||
// last pieces of the HTTP PUT request:
|
||||
client.println("Content-Type: text/csv");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
|
||||
// here's the actual content of the PUT request:
|
||||
client.print("sensor1,");
|
||||
client.println(thisData);
|
||||
|
||||
}
|
||||
else {
|
||||
// if you couldn't make a connection:
|
||||
Serial.println("connection failed");
|
||||
Serial.println();
|
||||
Serial.println("disconnecting.");
|
||||
client.stop();
|
||||
}
|
||||
// note the time that the connection was made or attempted:
|
||||
lastConnectionTime = millis();
|
||||
}
|
||||
|
||||
|
||||
// This method calculates the number of digits in the
|
||||
// sensor reading. Since each digit of the ASCII decimal
|
||||
// representation is a byte, the number of digits equals
|
||||
// the number of bytes:
|
||||
|
||||
int getLength(int someValue) {
|
||||
// there's at least one byte:
|
||||
int digits = 1;
|
||||
// continually divide the value by ten,
|
||||
// adding one to the digit count for each
|
||||
// time you divide, until you're at 0:
|
||||
int dividend = someValue /10;
|
||||
while (dividend > 0) {
|
||||
dividend = dividend /10;
|
||||
digits++;
|
||||
}
|
||||
// return the number of digits:
|
||||
return digits;
|
||||
}
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,177 +0,0 @@
|
||||
/*
|
||||
Wifi Pachube sensor client with Strings
|
||||
|
||||
This sketch connects an analog sensor to Pachube (http://www.pachube.com)
|
||||
using a Arduino Wifi shield.
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
This example has been updated to use version 2.0 of the pachube.com API.
|
||||
To make it work, create a feed with a datastream, and give it the ID
|
||||
sensor1. Or change the code below to match your feed.
|
||||
|
||||
This example uses the String library, which is part of the Arduino core from
|
||||
version 0019.
|
||||
|
||||
Circuit:
|
||||
* Analog sensor attached to analog in 0
|
||||
* Wifi shield attached to pins 10, 11, 12, 13
|
||||
|
||||
created 16 Mar 2012
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
modified 8 Sept 2012
|
||||
by Scott Fitzgerald
|
||||
|
||||
This code is in the public domain.
|
||||
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
#define APIKEY "YOUR API KEY GOES HERE" // replace your pachube api key here
|
||||
#define FEEDID 00000 // replace your feed ID
|
||||
#define USERAGENT "My Arduino Project" // user agent is the project name
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password
|
||||
|
||||
int status = WL_IDLE_STATUS;
|
||||
|
||||
// initialize the library instance:
|
||||
WiFiClient client;
|
||||
|
||||
// if you don't want to use DNS (and reduce your sketch size)
|
||||
// use the numeric IP instead of the name for the server:
|
||||
//IPAddress server(216,52,233,121); // numeric IP for api.pachube.com
|
||||
char server[] = "api.pachube.com"; // name address for pachube API
|
||||
|
||||
unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
|
||||
boolean lastConnected = false; // state of the connection last time through the main loop
|
||||
const unsigned long postingInterval = 10*1000; //delay between updates to pachube.com
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
// you're connected now, so print out the status:
|
||||
printWifiStatus();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// read the analog sensor:
|
||||
int sensorReading = analogRead(A0);
|
||||
// convert the data to a String to send it:
|
||||
|
||||
String dataString = "sensor1,";
|
||||
dataString += sensorReading;
|
||||
|
||||
// you can append multiple readings to this String if your
|
||||
// pachube feed is set up to handle multiple values:
|
||||
int otherSensorReading = analogRead(A1);
|
||||
dataString += "\nsensor2,";
|
||||
dataString += otherSensorReading;
|
||||
|
||||
// if there's incoming data from the net connection.
|
||||
// send it out the serial port. This is for debugging
|
||||
// purposes only:
|
||||
while (client.available()) {
|
||||
char c = client.read();
|
||||
Serial.print(c);
|
||||
}
|
||||
|
||||
// if there's no net connection, but there was one last time
|
||||
// through the loop, then stop the client:
|
||||
if (!client.connected() && lastConnected) {
|
||||
Serial.println();
|
||||
Serial.println("disconnecting.");
|
||||
client.stop();
|
||||
}
|
||||
|
||||
// if you're not connected, and ten seconds have passed since
|
||||
// your last connection, then connect again and send data:
|
||||
if(!client.connected() && (millis() - lastConnectionTime > postingInterval)) {
|
||||
sendData(dataString);
|
||||
}
|
||||
// store the state of the connection for next time through
|
||||
// the loop:
|
||||
lastConnected = client.connected();
|
||||
}
|
||||
|
||||
// this method makes a HTTP connection to the server:
|
||||
void sendData(String thisData) {
|
||||
// if there's a successful connection:
|
||||
if (client.connect(server, 80)) {
|
||||
Serial.println("connecting...");
|
||||
// send the HTTP PUT request:
|
||||
client.print("PUT /v2/feeds/");
|
||||
client.print(FEEDID);
|
||||
client.println(".csv HTTP/1.1");
|
||||
client.println("Host: api.pachube.com");
|
||||
client.print("X-ApiKey: ");
|
||||
client.println(APIKEY);
|
||||
client.print("User-Agent: ");
|
||||
client.println(USERAGENT);
|
||||
client.print("Content-Length: ");
|
||||
client.println(thisData.length());
|
||||
|
||||
// last pieces of the HTTP PUT request:
|
||||
client.println("Content-Type: text/csv");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
|
||||
// here's the actual content of the PUT request:
|
||||
client.println(thisData);
|
||||
}
|
||||
else {
|
||||
// if you couldn't make a connection:
|
||||
Serial.println("connection failed");
|
||||
Serial.println();
|
||||
Serial.println("disconnecting.");
|
||||
client.stop();
|
||||
}
|
||||
// note the time that the connection was made or attempted:
|
||||
lastConnectionTime = millis();
|
||||
}
|
||||
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
||||
|
@ -1,164 +0,0 @@
|
||||
/*
|
||||
Wifi Twitter Client with Strings
|
||||
|
||||
This sketch connects to Twitter using using an Arduino WiFi shield.
|
||||
It parses the XML returned, and looks for <text>this is a tweet</text>
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
This example uses the String library, which is part of the Arduino core from
|
||||
version 0019.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached to pins 10, 11, 12, 13
|
||||
|
||||
created 23 apr 2012
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
|
||||
This code is in the public domain.
|
||||
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "password"; // your network password (use for WPA, or use as key for WEP)
|
||||
int keyIndex = 0; // your network key Index number (needed only for WEP)
|
||||
|
||||
int status = WL_IDLE_STATUS; // status of the wifi connection
|
||||
|
||||
// initialize the library instance:
|
||||
WiFiClient client;
|
||||
|
||||
const unsigned long requestInterval = 30*1000; // delay between requests; 30 seconds
|
||||
|
||||
// if you don't want to use DNS (and reduce your sketch size)
|
||||
// use the numeric IP instead of the name for the server:
|
||||
//IPAddress server(199,59,149,200); // numeric IP for api.twitter.com
|
||||
char server[] = "api.twitter.com"; // name address for twitter API
|
||||
|
||||
boolean requested; // whether you've made a request since connecting
|
||||
unsigned long lastAttemptTime = 0; // last time you connected to the server, in milliseconds
|
||||
|
||||
String currentLine = ""; // string to hold the text from server
|
||||
String tweet = ""; // string to hold the tweet
|
||||
boolean readingTweet = false; // if you're currently reading the tweet
|
||||
|
||||
void setup() {
|
||||
// reserve space for the strings:
|
||||
currentLine.reserve(256);
|
||||
tweet.reserve(150);
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
// you're connected now, so print out the status:
|
||||
printWifiStatus();
|
||||
connectToServer();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
if (client.connected()) {
|
||||
if (client.available()) {
|
||||
// read incoming bytes:
|
||||
char inChar = client.read();
|
||||
|
||||
// add incoming byte to end of line:
|
||||
currentLine += inChar;
|
||||
|
||||
// if you get a newline, clear the line:
|
||||
if (inChar == '\n') {
|
||||
currentLine = "";
|
||||
}
|
||||
// if the current line ends with <text>, it will
|
||||
// be followed by the tweet:
|
||||
if ( currentLine.endsWith("<text>")) {
|
||||
// tweet is beginning. Clear the tweet string:
|
||||
readingTweet = true;
|
||||
tweet = "";
|
||||
// break out of the loop so this character isn't added to the tweet:
|
||||
return;
|
||||
}
|
||||
// if you're currently reading the bytes of a tweet,
|
||||
// add them to the tweet String:
|
||||
if (readingTweet) {
|
||||
if (inChar != '<') {
|
||||
tweet += inChar;
|
||||
}
|
||||
else {
|
||||
// if you got a "<" character,
|
||||
// you've reached the end of the tweet:
|
||||
readingTweet = false;
|
||||
Serial.println(tweet);
|
||||
// close the connection to the server:
|
||||
client.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (millis() - lastAttemptTime > requestInterval) {
|
||||
// if you're not connected, and two minutes have passed since
|
||||
// your last connection, then attempt to connect again:
|
||||
connectToServer();
|
||||
}
|
||||
}
|
||||
|
||||
void connectToServer() {
|
||||
// attempt to connect, and wait a millisecond:
|
||||
Serial.println("connecting to server...");
|
||||
if (client.connect(server, 80)) {
|
||||
Serial.println("making HTTP request...");
|
||||
// make HTTP GET request to twitter:
|
||||
client.println("GET /1/statuses/user_timeline.xml?screen_name=arduino HTTP/1.1");
|
||||
client.println("Host:api.twitter.com");
|
||||
client.println("Connection:close");
|
||||
client.println();
|
||||
}
|
||||
// note the time of this connect attempt:
|
||||
lastAttemptTime = millis();
|
||||
}
|
||||
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,120 +0,0 @@
|
||||
|
||||
/*
|
||||
Web client
|
||||
|
||||
This sketch connects to a website (http://www.google.com)
|
||||
using a WiFi shield.
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
|
||||
created 13 July 2010
|
||||
by dlf (Metodo2 srl)
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password (use for WPA, or use as key for WEP)
|
||||
int keyIndex = 0; // your network key Index number (needed only for WEP)
|
||||
|
||||
int status = WL_IDLE_STATUS;
|
||||
// if you don't want to use DNS (and reduce your sketch size)
|
||||
// use the numeric IP instead of the name for the server:
|
||||
IPAddress server(173,194,73,105); // numeric IP for Google (no DNS)
|
||||
//char server[] = "www.google.com"; // name address for Google (using DNS)
|
||||
|
||||
// Initialize the Ethernet client library
|
||||
// with the IP address and port of the server
|
||||
// that you want to connect to (port 80 is default for HTTP):
|
||||
WiFiClient client;
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
Serial.println("Connected to wifi");
|
||||
printWifiStatus();
|
||||
|
||||
Serial.println("\nStarting connection to server...");
|
||||
// if you get a connection, report back via serial:
|
||||
if (client.connect(server, 80)) {
|
||||
Serial.println("connected to server");
|
||||
// Make a HTTP request:
|
||||
client.println("GET /search?q=arduino HTTP/1.1");
|
||||
client.println("Host:www.google.com");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// if there are incoming bytes available
|
||||
// from the server, read them and print them:
|
||||
while (client.available()) {
|
||||
char c = client.read();
|
||||
Serial.write(c);
|
||||
}
|
||||
|
||||
// if the server's disconnected, stop the client:
|
||||
if (!client.connected()) {
|
||||
Serial.println();
|
||||
Serial.println("disconnecting from server.");
|
||||
client.stop();
|
||||
|
||||
// do nothing forevermore:
|
||||
while(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,138 +0,0 @@
|
||||
/*
|
||||
Repeating Wifi Web client
|
||||
|
||||
This sketch connects to a a web server and makes a request
|
||||
using an Arduino Wifi shield.
|
||||
|
||||
Circuit:
|
||||
* Wifi shield attached to pins 10, 11, 12, 13
|
||||
|
||||
created 23 April 2012
|
||||
modifide 31 May 2012
|
||||
by Tom Igoe
|
||||
|
||||
http://arduino.cc/en/Tutorial/WifiWebClientRepeating
|
||||
This code is in the public domain.
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password
|
||||
int keyIndex = 0; // your network key Index number (needed only for WEP)
|
||||
|
||||
int status = WL_IDLE_STATUS;
|
||||
|
||||
// Initialize the Wifi client library
|
||||
WiFiClient client;
|
||||
|
||||
// server address:
|
||||
char server[] = "www.arduino.cc";
|
||||
//IPAddress server(64,131,82,241);
|
||||
|
||||
unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
|
||||
boolean lastConnected = false; // state of the connection last time through the main loop
|
||||
const unsigned long postingInterval = 10*1000; // delay between updates, in milliseconds
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
// you're connected now, so print out the status:
|
||||
printWifiStatus();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// if there's incoming data from the net connection.
|
||||
// send it out the serial port. This is for debugging
|
||||
// purposes only:
|
||||
while (client.available()) {
|
||||
char c = client.read();
|
||||
Serial.write(c);
|
||||
}
|
||||
|
||||
// if there's no net connection, but there was one last time
|
||||
// through the loop, then stop the client:
|
||||
if (!client.connected() && lastConnected) {
|
||||
Serial.println();
|
||||
Serial.println("disconnecting.");
|
||||
client.stop();
|
||||
}
|
||||
|
||||
// if you're not connected, and ten seconds have passed since
|
||||
// your last connection, then connect again and send data:
|
||||
if(!client.connected() && (millis() - lastConnectionTime > postingInterval)) {
|
||||
httpRequest();
|
||||
}
|
||||
// store the state of the connection for next time through
|
||||
// the loop:
|
||||
lastConnected = client.connected();
|
||||
}
|
||||
|
||||
// this method makes a HTTP connection to the server:
|
||||
void httpRequest() {
|
||||
// if there's a successful connection:
|
||||
if (client.connect(server, 80)) {
|
||||
Serial.println("connecting...");
|
||||
// send the HTTP PUT request:
|
||||
client.println("GET /latest.txt HTTP/1.1");
|
||||
client.println("Host: www.arduino.cc");
|
||||
client.println("User-Agent: arduino-ethernet");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
|
||||
// note the time that the connection was made:
|
||||
lastConnectionTime = millis();
|
||||
}
|
||||
else {
|
||||
// if you couldn't make a connection:
|
||||
Serial.println("connection failed");
|
||||
Serial.println("disconnecting.");
|
||||
client.stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,132 +0,0 @@
|
||||
/*
|
||||
Web Server
|
||||
|
||||
A simple web server that shows the value of the analog input pins.
|
||||
using a WiFi shield.
|
||||
|
||||
This example is written for a network using WPA encryption. For
|
||||
WEP or WPA, change the Wifi.begin() call accordingly.
|
||||
|
||||
Circuit:
|
||||
* WiFi shield attached
|
||||
* Analog inputs attached to pins A0 through A5 (optional)
|
||||
|
||||
created 13 July 2010
|
||||
by dlf (Metodo2 srl)
|
||||
modified 31 May 2012
|
||||
by Tom Igoe
|
||||
*/
|
||||
|
||||
#inlcude <SPI.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
||||
char pass[] = "secretPassword"; // your network password
|
||||
int keyIndex = 0; // your network key Index number (needed only for WEP)
|
||||
|
||||
int status = WL_IDLE_STATUS;
|
||||
|
||||
WiFiServer server(80);
|
||||
|
||||
void setup() {
|
||||
//Initialize serial and wait for port to open:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
}
|
||||
|
||||
// check for the presence of the shield:
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
Serial.println("WiFi shield not present");
|
||||
// don't continue:
|
||||
while(true);
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network:
|
||||
while ( status != WL_CONNECTED) {
|
||||
Serial.print("Attempting to connect to SSID: ");
|
||||
Serial.println(ssid);
|
||||
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
|
||||
status = WiFi.begin(ssid, pass);
|
||||
|
||||
// wait 10 seconds for connection:
|
||||
delay(10000);
|
||||
}
|
||||
server.begin();
|
||||
// you're connected now, so print out the status:
|
||||
printWifiStatus();
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// listen for incoming clients
|
||||
WiFiClient client = server.available();
|
||||
if (client) {
|
||||
Serial.println("new client");
|
||||
// an http request ends with a blank line
|
||||
boolean currentLineIsBlank = true;
|
||||
while (client.connected()) {
|
||||
if (client.available()) {
|
||||
char c = client.read();
|
||||
Serial.write(c);
|
||||
// if you've gotten to the end of the line (received a newline
|
||||
// character) and the line is blank, the http request has ended,
|
||||
// so you can send a reply
|
||||
if (c == '\n' && currentLineIsBlank) {
|
||||
// send a standard http response header
|
||||
client.println("HTTP/1.1 200 OK");
|
||||
client.println("Content-Type: text/html");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
client.println("<!DOCTYPE HTML>");
|
||||
client.println("<html>");
|
||||
// add a meta refresh tag, so the browser pulls again every 5 seconds:
|
||||
client.println("<meta http-equiv=\"refresh\" content=\"5\">");
|
||||
// output the value of each analog input pin
|
||||
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
|
||||
int sensorReading = analogRead(analogChannel);
|
||||
client.print("analog input ");
|
||||
client.print(analogChannel);
|
||||
client.print(" is ");
|
||||
client.print(sensorReading);
|
||||
client.println("<br />");
|
||||
}
|
||||
client.println("</html>");
|
||||
break;
|
||||
}
|
||||
if (c == '\n') {
|
||||
// you're starting a new line
|
||||
currentLineIsBlank = true;
|
||||
}
|
||||
else if (c != '\r') {
|
||||
// you've gotten a character on the current line
|
||||
currentLineIsBlank = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// give the web browser time to receive the data
|
||||
delay(1);
|
||||
// close the connection:
|
||||
client.stop();
|
||||
Serial.println("client disonnected");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void printWifiStatus() {
|
||||
// print the SSID of the network you're attached to:
|
||||
Serial.print("SSID: ");
|
||||
Serial.println(WiFi.SSID());
|
||||
|
||||
// print your WiFi shield's IP address:
|
||||
IPAddress ip = WiFi.localIP();
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(ip);
|
||||
|
||||
// print the received signal strength:
|
||||
long rssi = WiFi.RSSI();
|
||||
Serial.print("signal strength (RSSI):");
|
||||
Serial.print(rssi);
|
||||
Serial.println(" dBm");
|
||||
}
|
||||
|
@ -1,43 +0,0 @@
|
||||
#######################################
|
||||
# Syntax Coloring Map For WiFi
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
WiFi KEYWORD1
|
||||
Client KEYWORD1
|
||||
Server KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
status KEYWORD2
|
||||
connect KEYWORD2
|
||||
write KEYWORD2
|
||||
available KEYWORD2
|
||||
read KEYWORD2
|
||||
flush KEYWORD2
|
||||
stop KEYWORD2
|
||||
connected KEYWORD2
|
||||
begin KEYWORD2
|
||||
disconnect KEYWORD2
|
||||
macAddress KEYWORD2
|
||||
localIP KEYWORD2
|
||||
subnetMask KEYWORD2
|
||||
gatewayIP KEYWORD2
|
||||
SSID KEYWORD2
|
||||
BSSID KEYWORD2
|
||||
RSSI KEYWORD2
|
||||
encryptionType KEYWORD2
|
||||
getResult KEYWORD2
|
||||
getSocket KEYWORD2
|
||||
WiFiClient KEYWORD2
|
||||
WiFiServer KEYWORD2
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
||||
|
@ -1,77 +0,0 @@
|
||||
//*********************************************/
|
||||
//
|
||||
// File: debug.h
|
||||
//
|
||||
// Author: dlf (Metodo2 srl)
|
||||
//
|
||||
//********************************************/
|
||||
|
||||
|
||||
#ifndef Debug_H
|
||||
#define Debug_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PRINT_FILE_LINE() do { \
|
||||
Serial.print("[");Serial.print(__FILE__); \
|
||||
Serial.print("::");Serial.print(__LINE__);Serial.print("]");\
|
||||
}while (0);
|
||||
|
||||
#ifdef _DEBUG_
|
||||
|
||||
#define INFO(format, args...) do { \
|
||||
char buf[250]; \
|
||||
sprintf(buf, format, args); \
|
||||
Serial.println(buf); \
|
||||
} while(0);
|
||||
|
||||
#define INFO1(x) do { PRINT_FILE_LINE() Serial.print("-I-");\
|
||||
Serial.println(x); \
|
||||
}while (0);
|
||||
|
||||
|
||||
#define INFO2(x,y) do { PRINT_FILE_LINE() Serial.print("-I-");\
|
||||
Serial.print(x,16);Serial.print(",");Serial.println(y,16); \
|
||||
}while (0);
|
||||
|
||||
|
||||
#else
|
||||
#define INFO1(x) do {} while(0);
|
||||
#define INFO2(x,y) do {} while(0);
|
||||
#define INFO(format, args...) do {} while(0);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define WARN(args) do { PRINT_FILE_LINE() \
|
||||
Serial.print("-W-"); Serial.println(args); \
|
||||
}while (0);
|
||||
#else
|
||||
#define WARN(args) do {} while (0);
|
||||
#endif
|
||||
|
||||
#if _DEBUG_SPI_
|
||||
#define DBG_PIN2 5
|
||||
#define DBG_PIN 4
|
||||
|
||||
#define START() digitalWrite(DBG_PIN2, HIGH);
|
||||
#define END() digitalWrite(DBG_PIN2, LOW);
|
||||
#define SET_TRIGGER() digitalWrite(DBG_PIN, HIGH);
|
||||
#define RST_TRIGGER() digitalWrite(DBG_PIN, LOW);
|
||||
|
||||
#define INIT_TRIGGER() pinMode(DBG_PIN, OUTPUT); \
|
||||
pinMode(DBG_PIN2, OUTPUT); \
|
||||
RST_TRIGGER()
|
||||
#define TOGGLE_TRIGGER() SET_TRIGGER() \
|
||||
delayMicroseconds(2); \
|
||||
RST_TRIGGER()
|
||||
#else
|
||||
#define START()
|
||||
#define END()
|
||||
#define SET_TRIGGER()
|
||||
#define RST_TRIGGER()
|
||||
#define INIT_TRIGGER()
|
||||
#define TOGGLE_TRIGGER()
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,260 +0,0 @@
|
||||
//#define _DEBUG_
|
||||
|
||||
#include "server_drv.h"
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "spi_drv.h"
|
||||
|
||||
extern "C" {
|
||||
#include "wl_types.h"
|
||||
#include "debug.h"
|
||||
}
|
||||
|
||||
|
||||
// Start server TCP on port specified
|
||||
void ServerDrv::startServer(uint16_t port, uint8_t sock)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(START_SERVER_TCP_CMD, PARAM_NUMS_2);
|
||||
SpiDrv::sendParam(port);
|
||||
SpiDrv::sendParam(&sock, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(START_SERVER_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
}
|
||||
|
||||
// Start server TCP on port specified
|
||||
void ServerDrv::startClient(uint32_t ipAddress, uint16_t port, uint8_t sock)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(START_CLIENT_TCP_CMD, PARAM_NUMS_3);
|
||||
SpiDrv::sendParam((uint8_t*)&ipAddress, sizeof(ipAddress));
|
||||
SpiDrv::sendParam(port);
|
||||
SpiDrv::sendParam(&sock, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(START_CLIENT_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
}
|
||||
|
||||
// Start server TCP on port specified
|
||||
void ServerDrv::stopClient(uint8_t sock)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(STOP_CLIENT_TCP_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendParam(&sock, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(STOP_CLIENT_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
}
|
||||
|
||||
|
||||
uint8_t ServerDrv::getServerState(uint8_t sock)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_STATE_TCP_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendParam(&sock, sizeof(sock), LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(GET_STATE_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
return _data;
|
||||
}
|
||||
|
||||
uint8_t ServerDrv::getClientState(uint8_t sock)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_CLIENT_STATE_TCP_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendParam(&sock, sizeof(sock), LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(GET_CLIENT_STATE_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
return _data;
|
||||
}
|
||||
|
||||
uint8_t ServerDrv::availData(uint8_t sock)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(AVAIL_DATA_TCP_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendParam(&sock, sizeof(sock), LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(AVAIL_DATA_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
if (_dataLen!=0)
|
||||
{
|
||||
return (_data == 1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ServerDrv::getData(uint8_t sock, uint8_t *data, uint8_t peek)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_DATA_TCP_CMD, PARAM_NUMS_2);
|
||||
SpiDrv::sendParam(&sock, sizeof(sock));
|
||||
SpiDrv::sendParam(peek, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseData8(GET_DATA_TCP_CMD, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
if (_dataLen!=0)
|
||||
{
|
||||
*data = _data;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ServerDrv::getDataBuf(uint8_t sock, uint8_t *_data, uint16_t *_dataLen)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_DATABUF_TCP_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendBuffer(&sock, sizeof(sock), LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
if (!SpiDrv::waitResponseData16(GET_DATABUF_TCP_CMD, _data, _dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
if (*_dataLen!=0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool ServerDrv::sendData(uint8_t sock, const uint8_t *data, uint16_t len)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(SEND_DATA_TCP_CMD, PARAM_NUMS_2);
|
||||
SpiDrv::sendBuffer(&sock, sizeof(sock));
|
||||
SpiDrv::sendBuffer((uint8_t *)data, len, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseData8(SEND_DATA_TCP_CMD, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
if (_dataLen!=0)
|
||||
{
|
||||
return (_data == 1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
uint8_t ServerDrv::checkDataSent(uint8_t sock)
|
||||
{
|
||||
const uint16_t TIMEOUT_DATA_SENT = 25;
|
||||
uint16_t timeout = 0;
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
|
||||
do {
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(DATA_SENT_TCP_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendParam(&sock, sizeof(sock), LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
if (!SpiDrv::waitResponseCmd(DATA_SENT_TCP_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse isDataSent");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
if (_data) timeout = 0;
|
||||
else{
|
||||
++timeout;
|
||||
delay(100);
|
||||
}
|
||||
|
||||
}while((_data==0)&&(timeout<TIMEOUT_DATA_SENT));
|
||||
return (timeout==TIMEOUT_DATA_SENT)?0:1;
|
||||
}
|
||||
|
||||
ServerDrv serverDrv;
|
@ -1,34 +0,0 @@
|
||||
#ifndef Server_Drv_h
|
||||
#define Server_Drv_h
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "wifi_spi.h"
|
||||
|
||||
class ServerDrv
|
||||
{
|
||||
public:
|
||||
// Start server TCP on port specified
|
||||
static void startServer(uint16_t port, uint8_t sock);
|
||||
|
||||
static void startClient(uint32_t ipAddress, uint16_t port, uint8_t sock);
|
||||
|
||||
static void stopClient(uint8_t sock);
|
||||
|
||||
static uint8_t getServerState(uint8_t sock);
|
||||
|
||||
static uint8_t getClientState(uint8_t sock);
|
||||
|
||||
static bool getData(uint8_t sock, uint8_t *data, uint8_t peek = 0);
|
||||
|
||||
static bool getDataBuf(uint8_t sock, uint8_t *data, uint16_t *len);
|
||||
|
||||
static bool sendData(uint8_t sock, const uint8_t *data, uint16_t len);
|
||||
|
||||
static uint8_t availData(uint8_t sock);
|
||||
|
||||
static uint8_t checkDataSent(uint8_t sock);
|
||||
};
|
||||
|
||||
extern ServerDrv serverDrv;
|
||||
|
||||
#endif
|
@ -1,83 +0,0 @@
|
||||
#ifndef SPI_Drv_h
|
||||
#define SPI_Drv_h
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "wifi_spi.h"
|
||||
|
||||
#define SPI_START_CMD_DELAY 12
|
||||
|
||||
#define NO_LAST_PARAM 0
|
||||
#define LAST_PARAM 1
|
||||
|
||||
#define DUMMY_DATA 0xFF
|
||||
|
||||
#define WAIT_FOR_SLAVE_SELECT() \
|
||||
SpiDrv::waitForSlaveReady(); \
|
||||
SpiDrv::spiSlaveSelect();
|
||||
|
||||
|
||||
|
||||
class SpiDrv
|
||||
{
|
||||
private:
|
||||
//static bool waitSlaveReady();
|
||||
static void waitForSlaveSign();
|
||||
static void getParam(uint8_t* param);
|
||||
public:
|
||||
|
||||
static void begin();
|
||||
|
||||
static void end();
|
||||
|
||||
static void spiDriverInit();
|
||||
|
||||
static void spiSlaveSelect();
|
||||
|
||||
static void spiSlaveDeselect();
|
||||
|
||||
static char spiTransfer(volatile char data);
|
||||
|
||||
static void waitForSlaveReady();
|
||||
|
||||
//static int waitSpiChar(char waitChar, char* readChar);
|
||||
|
||||
static int waitSpiChar(unsigned char waitChar);
|
||||
|
||||
static int readAndCheckChar(char checkChar, char* readChar);
|
||||
|
||||
static char readChar();
|
||||
|
||||
static int waitResponseParams(uint8_t cmd, uint8_t numParam, tParam* params);
|
||||
|
||||
static int waitResponseCmd(uint8_t cmd, uint8_t numParam, uint8_t* param, uint8_t* param_len);
|
||||
|
||||
static int waitResponseData8(uint8_t cmd, uint8_t* param, uint8_t* param_len);
|
||||
|
||||
static int waitResponseData16(uint8_t cmd, uint8_t* param, uint16_t* param_len);
|
||||
/*
|
||||
static int waitResponse(uint8_t cmd, tParam* params, uint8_t* numParamRead, uint8_t maxNumParams);
|
||||
|
||||
static int waitResponse(uint8_t cmd, uint8_t numParam, uint8_t* param, uint16_t* param_len);
|
||||
*/
|
||||
static int waitResponse(uint8_t cmd, uint8_t* numParamRead, uint8_t** params, uint8_t maxNumParams);
|
||||
|
||||
static void sendParam(uint8_t* param, uint8_t param_len, uint8_t lastParam = NO_LAST_PARAM);
|
||||
|
||||
static void sendParamLen8(uint8_t param_len);
|
||||
|
||||
static void sendParamLen16(uint16_t param_len);
|
||||
|
||||
static uint8_t readParamLen8(uint8_t* param_len = NULL);
|
||||
|
||||
static uint16_t readParamLen16(uint16_t* param_len = NULL);
|
||||
|
||||
static void sendBuffer(uint8_t* param, uint16_t param_len, uint8_t lastParam = NO_LAST_PARAM);
|
||||
|
||||
static void sendParam(uint16_t param, uint8_t lastParam = NO_LAST_PARAM);
|
||||
|
||||
static void sendCmd(uint8_t cmd, uint8_t numParam);
|
||||
};
|
||||
|
||||
extern SpiDrv spiDrv;
|
||||
|
||||
#endif
|
@ -1,491 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "spi_drv.h"
|
||||
#include "wifi_drv.h"
|
||||
|
||||
#define _DEBUG_
|
||||
|
||||
extern "C" {
|
||||
#include "wifi_spi.h"
|
||||
#include "wl_types.h"
|
||||
#include "debug.h"
|
||||
}
|
||||
|
||||
// Array of data to cache the information related to the networks discovered
|
||||
char WiFiDrv::_networkSsid[][WL_SSID_MAX_LENGTH] = {{"1"},{"2"},{"3"},{"4"},{"5"}};
|
||||
int32_t WiFiDrv::_networkRssi[WL_NETWORKS_LIST_MAXNUM] = { 0 };
|
||||
uint8_t WiFiDrv::_networkEncr[WL_NETWORKS_LIST_MAXNUM] = { 0 };
|
||||
|
||||
// Cached values of retrieved data
|
||||
char WiFiDrv::_ssid[] = {0};
|
||||
uint8_t WiFiDrv::_bssid[] = {0};
|
||||
uint8_t WiFiDrv::_mac[] = {0};
|
||||
uint8_t WiFiDrv::_localIp[] = {0};
|
||||
uint8_t WiFiDrv::_subnetMask[] = {0};
|
||||
uint8_t WiFiDrv::_gatewayIp[] = {0};
|
||||
// Firmware version
|
||||
char WiFiDrv::fwVersion[] = {0};
|
||||
|
||||
|
||||
// Private Methods
|
||||
|
||||
void WiFiDrv::getNetworkData(uint8_t *ip, uint8_t *mask, uint8_t *gwip)
|
||||
{
|
||||
tParam params[PARAM_NUMS_3] = { {0, (char*)ip}, {0, (char*)mask}, {0, (char*)gwip}};
|
||||
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_IPADDR_CMD, PARAM_NUMS_1);
|
||||
|
||||
uint8_t _dummy = DUMMY_DATA;
|
||||
SpiDrv::sendParam(&_dummy, sizeof(_dummy), LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
SpiDrv::waitResponseParams(GET_IPADDR_CMD, PARAM_NUMS_3, params);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
}
|
||||
|
||||
// Public Methods
|
||||
|
||||
|
||||
void WiFiDrv::wifiDriverInit()
|
||||
{
|
||||
SpiDrv::begin();
|
||||
}
|
||||
|
||||
int8_t WiFiDrv::wifiSetNetwork(char* ssid, uint8_t ssid_len)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(SET_NET_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendParam((uint8_t*)ssid, ssid_len, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(SET_NET_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
_data = WL_FAILURE;
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return(_data == WIFI_SPI_ACK) ? WL_SUCCESS : WL_FAILURE;
|
||||
}
|
||||
|
||||
int8_t WiFiDrv::wifiSetPassphrase(char* ssid, uint8_t ssid_len, const char *passphrase, const uint8_t len)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(SET_PASSPHRASE_CMD, PARAM_NUMS_2);
|
||||
SpiDrv::sendParam((uint8_t*)ssid, ssid_len, NO_LAST_PARAM);
|
||||
SpiDrv::sendParam((uint8_t*)passphrase, len, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(SET_PASSPHRASE_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
_data = WL_FAILURE;
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
return _data;
|
||||
}
|
||||
|
||||
|
||||
int8_t WiFiDrv::wifiSetKey(char* ssid, uint8_t ssid_len, uint8_t key_idx, const void *key, const uint8_t len)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(SET_KEY_CMD, PARAM_NUMS_3);
|
||||
SpiDrv::sendParam((uint8_t*)ssid, ssid_len, NO_LAST_PARAM);
|
||||
SpiDrv::sendParam(&key_idx, KEY_IDX_LEN, NO_LAST_PARAM);
|
||||
SpiDrv::sendParam((uint8_t*)key, len, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(SET_KEY_CMD, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
_data = WL_FAILURE;
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
return _data;
|
||||
}
|
||||
|
||||
int8_t WiFiDrv::disconnect()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(DISCONNECT_CMD, PARAM_NUMS_1);
|
||||
|
||||
uint8_t _dummy = DUMMY_DATA;
|
||||
SpiDrv::sendParam(&_dummy, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
int8_t result = SpiDrv::waitResponseCmd(DISCONNECT_CMD, PARAM_NUMS_1, &_data, &_dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
uint8_t WiFiDrv::getConnectionStatus()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_CONN_STATUS_CMD, PARAM_NUMS_0);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = -1;
|
||||
uint8_t _dataLen = 0;
|
||||
SpiDrv::waitResponseCmd(GET_CONN_STATUS_CMD, PARAM_NUMS_1, &_data, &_dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return _data;
|
||||
}
|
||||
|
||||
uint8_t* WiFiDrv::getMacAddress()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_MACADDR_CMD, PARAM_NUMS_1);
|
||||
|
||||
uint8_t _dummy = DUMMY_DATA;
|
||||
SpiDrv::sendParam(&_dummy, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _dataLen = 0;
|
||||
SpiDrv::waitResponseCmd(GET_MACADDR_CMD, PARAM_NUMS_1, _mac, &_dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return _mac;
|
||||
}
|
||||
|
||||
void WiFiDrv::getIpAddress(IPAddress& ip)
|
||||
{
|
||||
getNetworkData(_localIp, _subnetMask, _gatewayIp);
|
||||
ip = _localIp;
|
||||
}
|
||||
|
||||
void WiFiDrv::getSubnetMask(IPAddress& mask)
|
||||
{
|
||||
getNetworkData(_localIp, _subnetMask, _gatewayIp);
|
||||
mask = _subnetMask;
|
||||
}
|
||||
|
||||
void WiFiDrv::getGatewayIP(IPAddress& ip)
|
||||
{
|
||||
getNetworkData(_localIp, _subnetMask, _gatewayIp);
|
||||
ip = _gatewayIp;
|
||||
}
|
||||
|
||||
char* WiFiDrv::getCurrentSSID()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_CURR_SSID_CMD, PARAM_NUMS_1);
|
||||
|
||||
uint8_t _dummy = DUMMY_DATA;
|
||||
SpiDrv::sendParam(&_dummy, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _dataLen = 0;
|
||||
SpiDrv::waitResponseCmd(GET_CURR_SSID_CMD, PARAM_NUMS_1, (uint8_t*)_ssid, &_dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return _ssid;
|
||||
}
|
||||
|
||||
uint8_t* WiFiDrv::getCurrentBSSID()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_CURR_BSSID_CMD, PARAM_NUMS_1);
|
||||
|
||||
uint8_t _dummy = DUMMY_DATA;
|
||||
SpiDrv::sendParam(&_dummy, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _dataLen = 0;
|
||||
SpiDrv::waitResponseCmd(GET_CURR_BSSID_CMD, PARAM_NUMS_1, _bssid, &_dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return _bssid;
|
||||
}
|
||||
|
||||
int32_t WiFiDrv::getCurrentRSSI()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_CURR_RSSI_CMD, PARAM_NUMS_1);
|
||||
|
||||
uint8_t _dummy = DUMMY_DATA;
|
||||
SpiDrv::sendParam(&_dummy, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _dataLen = 0;
|
||||
int32_t rssi = 0;
|
||||
SpiDrv::waitResponseCmd(GET_CURR_RSSI_CMD, PARAM_NUMS_1, (uint8_t*)&rssi, &_dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return rssi;
|
||||
}
|
||||
|
||||
uint8_t WiFiDrv::getCurrentEncryptionType()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_CURR_ENCT_CMD, PARAM_NUMS_1);
|
||||
|
||||
uint8_t _dummy = DUMMY_DATA;
|
||||
SpiDrv::sendParam(&_dummy, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t dataLen = 0;
|
||||
uint8_t encType = 0;
|
||||
SpiDrv::waitResponseCmd(GET_CURR_ENCT_CMD, PARAM_NUMS_1, (uint8_t*)&encType, &dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return encType;
|
||||
}
|
||||
|
||||
int8_t WiFiDrv::startScanNetworks()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(START_SCAN_NETWORKS, PARAM_NUMS_0);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
|
||||
if (!SpiDrv::waitResponseCmd(START_SCAN_NETWORKS, PARAM_NUMS_1, &_data, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
_data = WL_FAILURE;
|
||||
}
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return (_data == WL_FAILURE)? _data : WL_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
uint8_t WiFiDrv::getScanNetworks()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(SCAN_NETWORKS, PARAM_NUMS_0);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t ssidListNum = 0;
|
||||
SpiDrv::waitResponse(SCAN_NETWORKS, &ssidListNum, (uint8_t**)_networkSsid, WL_NETWORKS_LIST_MAXNUM);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return ssidListNum;
|
||||
}
|
||||
|
||||
char* WiFiDrv::getSSIDNetoworks(uint8_t networkItem)
|
||||
{
|
||||
if (networkItem >= WL_NETWORKS_LIST_MAXNUM)
|
||||
return NULL;
|
||||
|
||||
return _networkSsid[networkItem];
|
||||
}
|
||||
|
||||
uint8_t WiFiDrv::getEncTypeNetowrks(uint8_t networkItem)
|
||||
{
|
||||
if (networkItem >= WL_NETWORKS_LIST_MAXNUM)
|
||||
return NULL;
|
||||
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_IDX_ENCT_CMD, PARAM_NUMS_1);
|
||||
|
||||
SpiDrv::sendParam(&networkItem, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t dataLen = 0;
|
||||
uint8_t encType = 0;
|
||||
SpiDrv::waitResponseCmd(GET_IDX_ENCT_CMD, PARAM_NUMS_1, (uint8_t*)&encType, &dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return encType;
|
||||
}
|
||||
|
||||
int32_t WiFiDrv::getRSSINetoworks(uint8_t networkItem)
|
||||
{
|
||||
if (networkItem >= WL_NETWORKS_LIST_MAXNUM)
|
||||
return NULL;
|
||||
int32_t networkRssi = 0;
|
||||
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_IDX_RSSI_CMD, PARAM_NUMS_1);
|
||||
|
||||
SpiDrv::sendParam(&networkItem, 1, LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t dataLen = 0;
|
||||
SpiDrv::waitResponseCmd(GET_IDX_RSSI_CMD, PARAM_NUMS_1, (uint8_t*)&networkRssi, &dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return networkRssi;
|
||||
}
|
||||
|
||||
uint8_t WiFiDrv::reqHostByName(const char* aHostname)
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(REQ_HOST_BY_NAME_CMD, PARAM_NUMS_1);
|
||||
SpiDrv::sendParam((uint8_t*)aHostname, strlen(aHostname), LAST_PARAM);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _data = 0;
|
||||
uint8_t _dataLen = 0;
|
||||
uint8_t result = SpiDrv::waitResponseCmd(REQ_HOST_BY_NAME_CMD, PARAM_NUMS_1, &_data, &_dataLen);
|
||||
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int WiFiDrv::getHostByName(IPAddress& aResult)
|
||||
{
|
||||
uint8_t _ipAddr[WL_IPV4_LENGTH];
|
||||
IPAddress dummy(0xFF,0xFF,0xFF,0xFF);
|
||||
int result = 0;
|
||||
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_HOST_BY_NAME_CMD, PARAM_NUMS_0);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(GET_HOST_BY_NAME_CMD, PARAM_NUMS_1, _ipAddr, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}else{
|
||||
aResult = _ipAddr;
|
||||
result = (aResult != dummy);
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
return result;
|
||||
}
|
||||
|
||||
int WiFiDrv::getHostByName(const char* aHostname, IPAddress& aResult)
|
||||
{
|
||||
uint8_t retry = 10;
|
||||
if (reqHostByName(aHostname))
|
||||
{
|
||||
while(!getHostByName(aResult) && --retry > 0)
|
||||
{
|
||||
delay(1000);
|
||||
}
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
return (retry>0);
|
||||
}
|
||||
|
||||
char* WiFiDrv::getFwVersion()
|
||||
{
|
||||
WAIT_FOR_SLAVE_SELECT();
|
||||
// Send Command
|
||||
SpiDrv::sendCmd(GET_FW_VERSION_CMD, PARAM_NUMS_0);
|
||||
|
||||
//Wait the reply elaboration
|
||||
SpiDrv::waitForSlaveReady();
|
||||
|
||||
// Wait for reply
|
||||
uint8_t _dataLen = 0;
|
||||
if (!SpiDrv::waitResponseCmd(GET_FW_VERSION_CMD, PARAM_NUMS_1, (uint8_t*)fwVersion, &_dataLen))
|
||||
{
|
||||
WARN("error waitResponse");
|
||||
}
|
||||
SpiDrv::spiSlaveDeselect();
|
||||
return fwVersion;
|
||||
}
|
||||
|
||||
WiFiDrv wiFiDrv;
|
@ -1,219 +0,0 @@
|
||||
#ifndef WiFi_Drv_h
|
||||
#define WiFi_Drv_h
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "wifi_spi.h"
|
||||
#include "IPAddress.h"
|
||||
|
||||
// Key index length
|
||||
#define KEY_IDX_LEN 1
|
||||
// 5 secs of delay to have the connection established
|
||||
#define WL_DELAY_START_CONNECTION 5000
|
||||
// firmware version string length
|
||||
#define WL_FW_VER_LENGTH 6
|
||||
|
||||
class WiFiDrv
|
||||
{
|
||||
private:
|
||||
// settings of requested network
|
||||
static char _networkSsid[WL_NETWORKS_LIST_MAXNUM][WL_SSID_MAX_LENGTH];
|
||||
static int32_t _networkRssi[WL_NETWORKS_LIST_MAXNUM];
|
||||
static uint8_t _networkEncr[WL_NETWORKS_LIST_MAXNUM];
|
||||
|
||||
// firmware version string in the format a.b.c
|
||||
static char fwVersion[WL_FW_VER_LENGTH];
|
||||
|
||||
// settings of current selected network
|
||||
static char _ssid[WL_SSID_MAX_LENGTH];
|
||||
static uint8_t _bssid[WL_MAC_ADDR_LENGTH];
|
||||
static uint8_t _mac[WL_MAC_ADDR_LENGTH];
|
||||
static uint8_t _localIp[WL_IPV4_LENGTH];
|
||||
static uint8_t _subnetMask[WL_IPV4_LENGTH];
|
||||
static uint8_t _gatewayIp[WL_IPV4_LENGTH];
|
||||
|
||||
/*
|
||||
* Get network Data information
|
||||
*/
|
||||
static void getNetworkData(uint8_t *ip, uint8_t *mask, uint8_t *gwip);
|
||||
|
||||
static uint8_t reqHostByName(const char* aHostname);
|
||||
|
||||
static int getHostByName(IPAddress& aResult);
|
||||
|
||||
public:
|
||||
|
||||
/*
|
||||
* Driver initialization
|
||||
*/
|
||||
static void wifiDriverInit();
|
||||
|
||||
/*
|
||||
* Set the desired network which the connection manager should try to
|
||||
* connect to.
|
||||
*
|
||||
* The ssid of the desired network should be specified.
|
||||
*
|
||||
* param ssid: The ssid of the desired network.
|
||||
* param ssid_len: Lenght of ssid string.
|
||||
* return: WL_SUCCESS or WL_FAILURE
|
||||
*/
|
||||
static int8_t wifiSetNetwork(char* ssid, uint8_t ssid_len);
|
||||
|
||||
/* Start Wifi connection with passphrase
|
||||
* the most secure supported mode will be automatically selected
|
||||
*
|
||||
* param ssid: Pointer to the SSID string.
|
||||
* param ssid_len: Lenght of ssid string.
|
||||
* param passphrase: Passphrase. Valid characters in a passphrase
|
||||
* must be between ASCII 32-126 (decimal).
|
||||
* param len: Lenght of passphrase string.
|
||||
* return: WL_SUCCESS or WL_FAILURE
|
||||
*/
|
||||
static int8_t wifiSetPassphrase(char* ssid, uint8_t ssid_len, const char *passphrase, const uint8_t len);
|
||||
|
||||
/* Start Wifi connection with WEP encryption.
|
||||
* Configure a key into the device. The key type (WEP-40, WEP-104)
|
||||
* is determined by the size of the key (5 bytes for WEP-40, 13 bytes for WEP-104).
|
||||
*
|
||||
* param ssid: Pointer to the SSID string.
|
||||
* param ssid_len: Lenght of ssid string.
|
||||
* param key_idx: The key index to set. Valid values are 0-3.
|
||||
* param key: Key input buffer.
|
||||
* param len: Lenght of key string.
|
||||
* return: WL_SUCCESS or WL_FAILURE
|
||||
*/
|
||||
static int8_t wifiSetKey(char* ssid, uint8_t ssid_len, uint8_t key_idx, const void *key, const uint8_t len);
|
||||
|
||||
/*
|
||||
* Disconnect from the network
|
||||
*
|
||||
* return: WL_SUCCESS or WL_FAILURE
|
||||
*/
|
||||
static int8_t disconnect();
|
||||
|
||||
/*
|
||||
* Disconnect from the network
|
||||
*
|
||||
* return: one value of wl_status_t enum
|
||||
*/
|
||||
static uint8_t getConnectionStatus();
|
||||
|
||||
/*
|
||||
* Get the interface MAC address.
|
||||
*
|
||||
* return: pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
|
||||
*/
|
||||
static uint8_t* getMacAddress();
|
||||
|
||||
/*
|
||||
* Get the interface IP address.
|
||||
*
|
||||
* return: copy the ip address value in IPAddress object
|
||||
*/
|
||||
static void getIpAddress(IPAddress& ip);
|
||||
|
||||
/*
|
||||
* Get the interface subnet mask address.
|
||||
*
|
||||
* return: copy the subnet mask address value in IPAddress object
|
||||
*/
|
||||
static void getSubnetMask(IPAddress& mask);
|
||||
|
||||
/*
|
||||
* Get the gateway ip address.
|
||||
*
|
||||
* return: copy the gateway ip address value in IPAddress object
|
||||
*/
|
||||
static void getGatewayIP(IPAddress& ip);
|
||||
|
||||
/*
|
||||
* Return the current SSID associated with the network
|
||||
*
|
||||
* return: ssid string
|
||||
*/
|
||||
static char* getCurrentSSID();
|
||||
|
||||
/*
|
||||
* Return the current BSSID associated with the network.
|
||||
* It is the MAC address of the Access Point
|
||||
*
|
||||
* return: pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
|
||||
*/
|
||||
static uint8_t* getCurrentBSSID();
|
||||
|
||||
/*
|
||||
* Return the current RSSI /Received Signal Strength in dBm)
|
||||
* associated with the network
|
||||
*
|
||||
* return: signed value
|
||||
*/
|
||||
static int32_t getCurrentRSSI();
|
||||
|
||||
/*
|
||||
* Return the Encryption Type associated with the network
|
||||
*
|
||||
* return: one value of wl_enc_type enum
|
||||
*/
|
||||
static uint8_t getCurrentEncryptionType();
|
||||
|
||||
/*
|
||||
* Start scan WiFi networks available
|
||||
*
|
||||
* return: Number of discovered networks
|
||||
*/
|
||||
static int8_t startScanNetworks();
|
||||
|
||||
/*
|
||||
* Get the networks available
|
||||
*
|
||||
* return: Number of discovered networks
|
||||
*/
|
||||
static uint8_t getScanNetworks();
|
||||
|
||||
/*
|
||||
* Return the SSID discovered during the network scan.
|
||||
*
|
||||
* param networkItem: specify from which network item want to get the information
|
||||
*
|
||||
* return: ssid string of the specified item on the networks scanned list
|
||||
*/
|
||||
static char* getSSIDNetoworks(uint8_t networkItem);
|
||||
|
||||
/*
|
||||
* Return the RSSI of the networks discovered during the scanNetworks
|
||||
*
|
||||
* param networkItem: specify from which network item want to get the information
|
||||
*
|
||||
* return: signed value of RSSI of the specified item on the networks scanned list
|
||||
*/
|
||||
static int32_t getRSSINetoworks(uint8_t networkItem);
|
||||
|
||||
/*
|
||||
* Return the encryption type of the networks discovered during the scanNetworks
|
||||
*
|
||||
* param networkItem: specify from which network item want to get the information
|
||||
*
|
||||
* return: encryption type (enum wl_enc_type) of the specified item on the networks scanned list
|
||||
*/
|
||||
static uint8_t getEncTypeNetowrks(uint8_t networkItem);
|
||||
|
||||
/*
|
||||
* Resolve the given hostname to an IP address.
|
||||
* param aHostname: Name to be resolved
|
||||
* param aResult: IPAddress structure to store the returned IP address
|
||||
* result: 1 if aIPAddrString was successfully converted to an IP address,
|
||||
* else error code
|
||||
*/
|
||||
static int getHostByName(const char* aHostname, IPAddress& aResult);
|
||||
|
||||
/*
|
||||
* Get the firmware version
|
||||
* result: version as string with this format a.b.c
|
||||
*/
|
||||
static char* getFwVersion();
|
||||
|
||||
};
|
||||
|
||||
extern WiFiDrv wiFiDrv;
|
||||
|
||||
#endif
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* wl_types.h
|
||||
*
|
||||
* Created on: Jul 30, 2010
|
||||
* Author: dlafauci
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WL_TYPES_H_
|
||||
#define _WL_TYPES_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef enum {
|
||||
WL_FAILURE = -1,
|
||||
WL_SUCCESS = 1,
|
||||
} wl_error_code_t;
|
||||
|
||||
/* Authentication modes */
|
||||
enum wl_auth_mode {
|
||||
AUTH_MODE_INVALID,
|
||||
AUTH_MODE_AUTO,
|
||||
AUTH_MODE_OPEN_SYSTEM,
|
||||
AUTH_MODE_SHARED_KEY,
|
||||
AUTH_MODE_WPA,
|
||||
AUTH_MODE_WPA2,
|
||||
AUTH_MODE_WPA_PSK,
|
||||
AUTH_MODE_WPA2_PSK
|
||||
};
|
||||
|
||||
#endif //_WL_TYPES_H_
|
4
hardware/arduino/avr/libraries/WiFi/WiFiClient.cpp → libraries/WiFi/arch/avr/WiFiClient.cpp
Normal file → Executable file
4
hardware/arduino/avr/libraries/WiFi/WiFiClient.cpp → libraries/WiFi/arch/avr/WiFiClient.cpp
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
extern "C" {
|
||||
#include "utility/wl_definitions.h"
|
||||
#include "utility/wl_types.h"
|
||||
#include "socket.h"
|
||||
#include "utility/socket.h"
|
||||
#include "string.h"
|
||||
#include "utility/debug.h"
|
||||
}
|
||||
@ -9,7 +9,7 @@ extern "C" {
|
||||
#include "WiFi.h"
|
||||
#include "WiFiClient.h"
|
||||
#include "WiFiServer.h"
|
||||
#include "server_drv.h"
|
||||
#include "utility/server_drv.h"
|
||||
|
||||
|
||||
uint16_t WiFiClient::_srcport = 1024;
|
@ -4,8 +4,8 @@ extern "C" {
|
||||
#include "utility/wifi_spi.h"
|
||||
}
|
||||
#include <string.h>
|
||||
#include "server_drv.h"
|
||||
#include "wifi_drv.h"
|
||||
#include "utility/server_drv.h"
|
||||
#include "utility/wifi_drv.h"
|
||||
|
||||
#include "WiFi.h"
|
||||
#include "WiFiUdp.h"
|
@ -14,7 +14,7 @@
|
||||
|
||||
#define SOCK_NOT_AVAIL 255
|
||||
|
||||
#include "wl_definitions.h"
|
||||
#include "utility/wl_definitions.h"
|
||||
/**
|
||||
* The 8-bit signed data type.
|
||||
*/
|
@ -1,16 +1,17 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "spi_drv.h"
|
||||
#include <SPI.h>
|
||||
#include "utility/spi_drv.h"
|
||||
#include "pins_arduino.h"
|
||||
//#define _DEBUG_
|
||||
extern "C" {
|
||||
#include "debug.h"
|
||||
#include "utility/debug.h"
|
||||
}
|
||||
|
||||
#define DATAOUT 11 // MOSI
|
||||
#define DATAIN 12 // MISO
|
||||
#define SPICLOCK 13 // sck
|
||||
#define SLAVESELECT 10 // ss
|
||||
#define SLAVESELECT 10 // ss
|
||||
#define SLAVEREADY 7 // handshake pin
|
||||
#define WIFILED 9 // led on wifi shield
|
||||
|
||||
@ -20,15 +21,7 @@ extern "C" {
|
||||
|
||||
void SpiDrv::begin()
|
||||
{
|
||||
// Set direction register for SCK and MOSI pin.
|
||||
// MISO pin automatically overrides to INPUT.
|
||||
// When the SS pin is set as OUTPUT, it can be used as
|
||||
// a general purpose output port (it doesn't influence
|
||||
// SPI operations).
|
||||
|
||||
pinMode(SCK, OUTPUT);
|
||||
pinMode(MOSI, OUTPUT);
|
||||
pinMode(SS, OUTPUT);
|
||||
SPI.begin();
|
||||
pinMode(SLAVESELECT, OUTPUT);
|
||||
pinMode(SLAVEREADY, INPUT);
|
||||
pinMode(WIFILED, OUTPUT);
|
||||
@ -42,17 +35,10 @@ void SpiDrv::begin()
|
||||
#ifdef _DEBUG_
|
||||
INIT_TRIGGER()
|
||||
#endif
|
||||
|
||||
// Warning: if the SS pin ever becomes a LOW INPUT then SPI
|
||||
// automatically switches to Slave, so the data direction of
|
||||
// the SS pin MUST be kept as OUTPUT.
|
||||
SPCR |= _BV(MSTR);
|
||||
SPCR |= _BV(SPE);
|
||||
//SPSR |= _BV(SPI2X);
|
||||
}
|
||||
|
||||
void SpiDrv::end() {
|
||||
SPCR &= ~_BV(SPE);
|
||||
SPI.end();
|
||||
}
|
||||
|
||||
void SpiDrv::spiSlaveSelect()
|
||||
@ -66,6 +52,7 @@ void SpiDrv::spiSlaveDeselect()
|
||||
digitalWrite(SLAVESELECT,HIGH);
|
||||
}
|
||||
|
||||
/*
|
||||
void delaySpi()
|
||||
{
|
||||
int i = 0;
|
||||
@ -75,14 +62,11 @@ void delaySpi()
|
||||
int a =a+1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
char SpiDrv::spiTransfer(volatile char data)
|
||||
{
|
||||
SPDR = data; // Start the transmission
|
||||
while (!(SPSR & (1<<SPIF))) // Wait the end of the transmission
|
||||
{
|
||||
};
|
||||
char result = SPDR;
|
||||
char result = SPI.transfer(data);
|
||||
DELAY_TRANSFER();
|
||||
|
||||
return result; // return the received byte
|
@ -1,7 +1,7 @@
|
||||
#ifndef WiFi_Spi_h
|
||||
#define WiFi_Spi_h
|
||||
|
||||
#include "wl_definitions.h"
|
||||
#include "utility/wl_definitions.h"
|
||||
|
||||
#define CMD_FLAG 0
|
||||
#define REPLY_FLAG 1<<7
|
||||
@ -56,7 +56,7 @@ enum {
|
||||
GET_FW_VERSION_CMD = 0x37,
|
||||
GET_TEST_CMD = 0x38,
|
||||
SEND_DATA_UDP_CMD = 0x39,
|
||||
GET_REMOTE_DATA_CMD = 0x3A,
|
||||
GET_REMOTE_DATA_CMD = 0x3A,
|
||||
|
||||
// All command with DATA_FLAG 0x40 send a 16bit Len
|
||||
|
20
hardware/arduino/sam/libraries/WiFi/WiFiClient.cpp → libraries/WiFi/arch/sam/WiFiClient.cpp
Normal file → Executable file
20
hardware/arduino/sam/libraries/WiFi/WiFiClient.cpp → libraries/WiFi/arch/sam/WiFiClient.cpp
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
extern "C" {
|
||||
#include "utility/wl_definitions.h"
|
||||
#include "utility/wl_types.h"
|
||||
#include "socket.h"
|
||||
#include "utility/socket.h"
|
||||
#include "string.h"
|
||||
#include "utility/debug.h"
|
||||
}
|
||||
@ -9,7 +9,7 @@ extern "C" {
|
||||
#include "WiFi.h"
|
||||
#include "WiFiClient.h"
|
||||
#include "WiFiServer.h"
|
||||
#include "server_drv.h"
|
||||
#include "utility/server_drv.h"
|
||||
|
||||
|
||||
uint16_t WiFiClient::_srcport = 1024;
|
||||
@ -54,7 +54,7 @@ int WiFiClient::connect(IPAddress ip, uint16_t port) {
|
||||
}
|
||||
|
||||
size_t WiFiClient::write(uint8_t b) {
|
||||
return write(&b, static_cast<size_t>(1));
|
||||
return write(&b, 1);
|
||||
}
|
||||
|
||||
size_t WiFiClient::write(const uint8_t *buf, size_t size) {
|
||||
@ -130,13 +130,13 @@ void WiFiClient::stop() {
|
||||
return;
|
||||
|
||||
ServerDrv::stopClient(_sock);
|
||||
WiFiClass::_state[_sock] = NA_STATE;
|
||||
|
||||
unsigned long start = millis();
|
||||
|
||||
int count = 0;
|
||||
// wait maximum 5 secs for the connection to close
|
||||
while (status() != CLOSED && ++count < 50)
|
||||
delay(100);
|
||||
|
||||
// wait a second for the connection to close
|
||||
while (status() != CLOSED && millis() - start < 1000)
|
||||
delay(1);
|
||||
_sock = 255;
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ uint8_t WiFiClient::connected() {
|
||||
return !(s == LISTEN || s == CLOSED || s == FIN_WAIT_1 ||
|
||||
s == FIN_WAIT_2 || s == TIME_WAIT ||
|
||||
s == SYN_SENT || s== SYN_RCVD ||
|
||||
(s == CLOSE_WAIT && !available()));
|
||||
(s == CLOSE_WAIT));
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ WiFiClient::operator bool() {
|
||||
uint8_t WiFiClient::getFirstSocket()
|
||||
{
|
||||
for (int i = 0; i < MAX_SOCK_NUM; i++) {
|
||||
if (WiFiClass::_state[i] == 0)
|
||||
if (WiFiClass::_state[i] == NA_STATE)
|
||||
{
|
||||
return i;
|
||||
}
|
163
libraries/WiFi/arch/sam/WiFiUdp.cpp
Normal file
163
libraries/WiFi/arch/sam/WiFiUdp.cpp
Normal file
@ -0,0 +1,163 @@
|
||||
|
||||
extern "C" {
|
||||
#include "utility/debug.h"
|
||||
#include "utility/wifi_spi.h"
|
||||
}
|
||||
#include <string.h>
|
||||
#include "utility/server_drv.h"
|
||||
#include "utility/wifi_drv.h"
|
||||
|
||||
#include "WiFi.h"
|
||||
#include "WiFiUdp.h"
|
||||
#include "WiFiClient.h"
|
||||
#include "WiFiServer.h"
|
||||
|
||||
|
||||
/* Constructor */
|
||||
WiFiUDP::WiFiUDP() : _sock(NO_SOCKET_AVAIL) {}
|
||||
|
||||
/* Start WiFiUDP socket, listening at local port PORT */
|
||||
uint8_t WiFiUDP::begin(uint16_t port) {
|
||||
|
||||
uint8_t sock = WiFiClass::getSocket();
|
||||
if (sock != NO_SOCKET_AVAIL)
|
||||
{
|
||||
ServerDrv::startServer(port, sock, UDP_MODE);
|
||||
WiFiClass::_server_port[sock] = port;
|
||||
_sock = sock;
|
||||
_port = port;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/* return number of bytes available in the current packet,
|
||||
will return zero if parsePacket hasn't been called yet */
|
||||
int WiFiUDP::available() {
|
||||
if (_sock != NO_SOCKET_AVAIL)
|
||||
{
|
||||
return ServerDrv::availData(_sock);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Release any resources being used by this WiFiUDP instance */
|
||||
void WiFiUDP::stop()
|
||||
{
|
||||
if (_sock == NO_SOCKET_AVAIL)
|
||||
return;
|
||||
|
||||
ServerDrv::stopClient(_sock);
|
||||
|
||||
_sock = NO_SOCKET_AVAIL;
|
||||
}
|
||||
|
||||
int WiFiUDP::beginPacket(const char *host, uint16_t port)
|
||||
{
|
||||
// Look up the host first
|
||||
int ret = 0;
|
||||
IPAddress remote_addr;
|
||||
if (WiFi.hostByName(host, remote_addr))
|
||||
{
|
||||
return beginPacket(remote_addr, port);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int WiFiUDP::beginPacket(IPAddress ip, uint16_t port)
|
||||
{
|
||||
if (_sock == NO_SOCKET_AVAIL)
|
||||
_sock = WiFiClass::getSocket();
|
||||
if (_sock != NO_SOCKET_AVAIL)
|
||||
{
|
||||
ServerDrv::startClient(uint32_t(ip), port, _sock, UDP_MODE);
|
||||
WiFiClass::_state[_sock] = _sock;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WiFiUDP::endPacket()
|
||||
{
|
||||
return ServerDrv::sendUdpData(_sock);
|
||||
}
|
||||
|
||||
size_t WiFiUDP::write(uint8_t byte)
|
||||
{
|
||||
return write(&byte, 1);
|
||||
}
|
||||
|
||||
size_t WiFiUDP::write(const uint8_t *buffer, size_t size)
|
||||
{
|
||||
ServerDrv::insertDataBuf(_sock, buffer, size);
|
||||
return size;
|
||||
}
|
||||
|
||||
int WiFiUDP::parsePacket()
|
||||
{
|
||||
return available();
|
||||
}
|
||||
|
||||
int WiFiUDP::read()
|
||||
{
|
||||
uint8_t b;
|
||||
if (available())
|
||||
{
|
||||
ServerDrv::getData(_sock, &b);
|
||||
return b;
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int WiFiUDP::read(unsigned char* buffer, size_t len)
|
||||
{
|
||||
if (available())
|
||||
{
|
||||
uint16_t size = 0;
|
||||
if (!ServerDrv::getDataBuf(_sock, buffer, &size))
|
||||
return -1;
|
||||
// TODO check if the buffer is too smal respect to buffer size
|
||||
return size;
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int WiFiUDP::peek()
|
||||
{
|
||||
uint8_t b;
|
||||
if (!available())
|
||||
return -1;
|
||||
|
||||
ServerDrv::getData(_sock, &b, 1);
|
||||
return b;
|
||||
}
|
||||
|
||||
void WiFiUDP::flush()
|
||||
{
|
||||
while (available())
|
||||
read();
|
||||
}
|
||||
|
||||
IPAddress WiFiUDP::remoteIP()
|
||||
{
|
||||
uint8_t _remoteIp[4] = {0};
|
||||
uint8_t _remotePort[2] = {0};
|
||||
|
||||
WiFiDrv::getRemoteData(_sock, _remoteIp, _remotePort);
|
||||
IPAddress ip(_remoteIp);
|
||||
return ip;
|
||||
}
|
||||
|
||||
uint16_t WiFiUDP::remotePort()
|
||||
{
|
||||
uint8_t _remoteIp[4] = {0};
|
||||
uint8_t _remotePort[2] = {0};
|
||||
|
||||
WiFiDrv::getRemoteData(_sock, _remoteIp, _remotePort);
|
||||
uint16_t port = (_remotePort[0]<<8)+_remotePort[1];
|
||||
return port;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#define SOCK_NOT_AVAIL 255
|
||||
|
||||
#include "wl_definitions.h"
|
||||
#include "utility/wl_definitions.h"
|
||||
/**
|
||||
* The 8-bit signed data type.
|
||||
*/
|
||||
@ -67,7 +67,7 @@ typedef volatile unsigned long vuint32;
|
||||
|
||||
/* bsd */
|
||||
typedef uint8 u_char; /**< 8-bit value */
|
||||
typedef uint16_t SOCKET;
|
||||
typedef uint16_t SOCKET;
|
||||
//typedef uint16 u_short; /**< 16-bit value */
|
||||
typedef uint16 u_int; /**< 16-bit value */
|
||||
typedef uint32 u_long; /**< 32-bit value */
|
@ -1,11 +1,11 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <SPI.h>
|
||||
#include "spi_drv.h"
|
||||
#include "utility/spi_drv.h"
|
||||
#include "pins_arduino.h"
|
||||
//#define _DEBUG_
|
||||
extern "C" {
|
||||
#include "debug.h"
|
||||
#include "utility/debug.h"
|
||||
}
|
||||
|
||||
#define DATAOUT 11 // MOSI
|
@ -1,144 +1,154 @@
|
||||
#ifndef WiFi_Spi_h
|
||||
#define WiFi_Spi_h
|
||||
|
||||
#include "wl_definitions.h"
|
||||
|
||||
#define CMD_FLAG 0
|
||||
#define REPLY_FLAG 1<<7
|
||||
#define DATA_FLAG 0x40
|
||||
|
||||
#define WIFI_SPI_ACK 1
|
||||
#define WIFI_SPI_ERR 0xFF
|
||||
|
||||
#define TIMEOUT_CHAR 1000
|
||||
|
||||
//#define MAX_SOCK_NUM 4 /**< Maxmium number of socket */
|
||||
#define NO_SOCKET_AVAIL 255
|
||||
|
||||
#define START_CMD 0xE0
|
||||
#define END_CMD 0xEE
|
||||
#define ERR_CMD 0xEF
|
||||
|
||||
enum {
|
||||
SET_NET_CMD = 0x10,
|
||||
SET_PASSPHRASE_CMD = 0x11,
|
||||
SET_KEY_CMD = 0x12,
|
||||
TEST_CMD = 0x13,
|
||||
|
||||
GET_CONN_STATUS_CMD = 0x20,
|
||||
GET_IPADDR_CMD = 0x21,
|
||||
GET_MACADDR_CMD = 0x22,
|
||||
GET_CURR_SSID_CMD = 0x23,
|
||||
GET_CURR_BSSID_CMD = 0x24,
|
||||
GET_CURR_RSSI_CMD = 0x25,
|
||||
GET_CURR_ENCT_CMD = 0x26,
|
||||
SCAN_NETWORKS = 0x27,
|
||||
START_SERVER_TCP_CMD= 0x28,
|
||||
GET_STATE_TCP_CMD = 0x29,
|
||||
DATA_SENT_TCP_CMD = 0x2A,
|
||||
AVAIL_DATA_TCP_CMD = 0x2B,
|
||||
GET_DATA_TCP_CMD = 0x2C,
|
||||
START_CLIENT_TCP_CMD= 0x2D,
|
||||
STOP_CLIENT_TCP_CMD = 0x2E,
|
||||
GET_CLIENT_STATE_TCP_CMD= 0x2F,
|
||||
DISCONNECT_CMD = 0x30,
|
||||
GET_IDX_SSID_CMD = 0x31,
|
||||
GET_IDX_RSSI_CMD = 0x32,
|
||||
GET_IDX_ENCT_CMD = 0x33,
|
||||
REQ_HOST_BY_NAME_CMD= 0x34,
|
||||
GET_HOST_BY_NAME_CMD= 0x35,
|
||||
START_SCAN_NETWORKS = 0x36,
|
||||
GET_FW_VERSION_CMD = 0x37,
|
||||
|
||||
// All command with DATA_FLAG 0x40 send a 16bit Len
|
||||
|
||||
SEND_DATA_TCP_CMD = 0x44,
|
||||
GET_DATABUF_TCP_CMD = 0x45,
|
||||
};
|
||||
|
||||
|
||||
enum wl_tcp_state {
|
||||
CLOSED = 0,
|
||||
LISTEN = 1,
|
||||
SYN_SENT = 2,
|
||||
SYN_RCVD = 3,
|
||||
ESTABLISHED = 4,
|
||||
FIN_WAIT_1 = 5,
|
||||
FIN_WAIT_2 = 6,
|
||||
CLOSE_WAIT = 7,
|
||||
CLOSING = 8,
|
||||
LAST_ACK = 9,
|
||||
TIME_WAIT = 10
|
||||
};
|
||||
|
||||
|
||||
enum numParams{
|
||||
PARAM_NUMS_0,
|
||||
PARAM_NUMS_1,
|
||||
PARAM_NUMS_2,
|
||||
PARAM_NUMS_3,
|
||||
PARAM_NUMS_4,
|
||||
PARAM_NUMS_5,
|
||||
MAX_PARAM_NUMS
|
||||
};
|
||||
|
||||
#define MAX_PARAMS MAX_PARAM_NUMS-1
|
||||
#define PARAM_LEN_SIZE 1
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
char* param;
|
||||
}tParam;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint16_t dataLen;
|
||||
char* data;
|
||||
}tDataParam;
|
||||
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
unsigned char cmd;
|
||||
unsigned char tcmd;
|
||||
unsigned char nParam;
|
||||
tParam params[MAX_PARAMS];
|
||||
}tSpiMsg;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
unsigned char cmd;
|
||||
unsigned char tcmd;
|
||||
unsigned char nParam;
|
||||
tDataParam params[MAX_PARAMS];
|
||||
}tSpiMsgData;
|
||||
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
unsigned char cmd;
|
||||
unsigned char tcmd;
|
||||
//unsigned char totLen;
|
||||
unsigned char nParam;
|
||||
}tSpiHdr;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
uint32_t param;
|
||||
}tLongParam;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
uint16_t param;
|
||||
}tIntParam;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
uint8_t param;
|
||||
}tByteParam;
|
||||
|
||||
#endif
|
||||
#ifndef WiFi_Spi_h
|
||||
#define WiFi_Spi_h
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "utility/wl_definitions.h"
|
||||
|
||||
#define CMD_FLAG 0
|
||||
#define REPLY_FLAG 1<<7
|
||||
#define DATA_FLAG 0x40
|
||||
|
||||
#define WIFI_SPI_ACK 1
|
||||
#define WIFI_SPI_ERR 0xFF
|
||||
|
||||
#define TIMEOUT_CHAR 1000
|
||||
|
||||
//#define MAX_SOCK_NUM 4 /**< Maxmium number of socket */
|
||||
#define NO_SOCKET_AVAIL 255
|
||||
|
||||
#define START_CMD 0xE0
|
||||
#define END_CMD 0xEE
|
||||
#define ERR_CMD 0xEF
|
||||
#define CMD_POS 1 // Position of Command OpCode on SPI stream
|
||||
#define PARAM_LEN_POS 2 // Position of Param len on SPI stream
|
||||
|
||||
|
||||
enum {
|
||||
SET_NET_CMD = 0x10,
|
||||
SET_PASSPHRASE_CMD = 0x11,
|
||||
SET_KEY_CMD = 0x12,
|
||||
TEST_CMD = 0x13,
|
||||
SET_IP_CONFIG_CMD = 0x14,
|
||||
SET_DNS_CONFIG_CMD = 0x15,
|
||||
|
||||
GET_CONN_STATUS_CMD = 0x20,
|
||||
GET_IPADDR_CMD = 0x21,
|
||||
GET_MACADDR_CMD = 0x22,
|
||||
GET_CURR_SSID_CMD = 0x23,
|
||||
GET_CURR_BSSID_CMD = 0x24,
|
||||
GET_CURR_RSSI_CMD = 0x25,
|
||||
GET_CURR_ENCT_CMD = 0x26,
|
||||
SCAN_NETWORKS = 0x27,
|
||||
START_SERVER_TCP_CMD= 0x28,
|
||||
GET_STATE_TCP_CMD = 0x29,
|
||||
DATA_SENT_TCP_CMD = 0x2A,
|
||||
AVAIL_DATA_TCP_CMD = 0x2B,
|
||||
GET_DATA_TCP_CMD = 0x2C,
|
||||
START_CLIENT_TCP_CMD= 0x2D,
|
||||
STOP_CLIENT_TCP_CMD = 0x2E,
|
||||
GET_CLIENT_STATE_TCP_CMD= 0x2F,
|
||||
DISCONNECT_CMD = 0x30,
|
||||
GET_IDX_SSID_CMD = 0x31,
|
||||
GET_IDX_RSSI_CMD = 0x32,
|
||||
GET_IDX_ENCT_CMD = 0x33,
|
||||
REQ_HOST_BY_NAME_CMD= 0x34,
|
||||
GET_HOST_BY_NAME_CMD= 0x35,
|
||||
START_SCAN_NETWORKS = 0x36,
|
||||
GET_FW_VERSION_CMD = 0x37,
|
||||
GET_TEST_CMD = 0x38,
|
||||
SEND_DATA_UDP_CMD = 0x39,
|
||||
GET_REMOTE_DATA_CMD = 0x3A,
|
||||
|
||||
// All command with DATA_FLAG 0x40 send a 16bit Len
|
||||
|
||||
SEND_DATA_TCP_CMD = 0x44,
|
||||
GET_DATABUF_TCP_CMD = 0x45,
|
||||
INSERT_DATABUF_CMD = 0x46,
|
||||
};
|
||||
|
||||
|
||||
enum wl_tcp_state {
|
||||
CLOSED = 0,
|
||||
LISTEN = 1,
|
||||
SYN_SENT = 2,
|
||||
SYN_RCVD = 3,
|
||||
ESTABLISHED = 4,
|
||||
FIN_WAIT_1 = 5,
|
||||
FIN_WAIT_2 = 6,
|
||||
CLOSE_WAIT = 7,
|
||||
CLOSING = 8,
|
||||
LAST_ACK = 9,
|
||||
TIME_WAIT = 10
|
||||
};
|
||||
|
||||
|
||||
enum numParams{
|
||||
PARAM_NUMS_0,
|
||||
PARAM_NUMS_1,
|
||||
PARAM_NUMS_2,
|
||||
PARAM_NUMS_3,
|
||||
PARAM_NUMS_4,
|
||||
PARAM_NUMS_5,
|
||||
MAX_PARAM_NUMS
|
||||
};
|
||||
|
||||
#define MAX_PARAMS MAX_PARAM_NUMS-1
|
||||
#define PARAM_LEN_SIZE 1
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
char* param;
|
||||
}tParam;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint16_t dataLen;
|
||||
char* data;
|
||||
}tDataParam;
|
||||
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
unsigned char cmd;
|
||||
unsigned char tcmd;
|
||||
unsigned char nParam;
|
||||
tParam params[MAX_PARAMS];
|
||||
}tSpiMsg;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
unsigned char cmd;
|
||||
unsigned char tcmd;
|
||||
unsigned char nParam;
|
||||
tDataParam params[MAX_PARAMS];
|
||||
}tSpiMsgData;
|
||||
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
unsigned char cmd;
|
||||
unsigned char tcmd;
|
||||
//unsigned char totLen;
|
||||
unsigned char nParam;
|
||||
}tSpiHdr;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
uint32_t param;
|
||||
}tLongParam;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
uint16_t param;
|
||||
}tIntParam;
|
||||
|
||||
typedef struct __attribute__((__packed__))
|
||||
{
|
||||
uint8_t paramLen;
|
||||
uint8_t param;
|
||||
}tByteParam;
|
||||
|
||||
#endif
|
BIN
libraries/WiFi/extras/binary/wifiHD.elf
Normal file
BIN
libraries/WiFi/extras/binary/wifiHD.elf
Normal file
Binary file not shown.
16358
libraries/WiFi/extras/binary/wifiHD.hex
Normal file
16358
libraries/WiFi/extras/binary/wifiHD.hex
Normal file
File diff suppressed because it is too large
Load Diff
BIN
libraries/WiFi/extras/binary/wifiHD_2_1.elf
Normal file
BIN
libraries/WiFi/extras/binary/wifiHD_2_1.elf
Normal file
Binary file not shown.
BIN
libraries/WiFi/extras/binary/wifi_dnld.elf
Normal file
BIN
libraries/WiFi/extras/binary/wifi_dnld.elf
Normal file
Binary file not shown.
10470
libraries/WiFi/extras/binary/wifi_dnld.hex
Normal file
10470
libraries/WiFi/extras/binary/wifi_dnld.hex
Normal file
File diff suppressed because it is too large
Load Diff
BIN
libraries/WiFi/extras/binary/wifi_dnld_2_1.elf
Normal file
BIN
libraries/WiFi/extras/binary/wifi_dnld_2_1.elf
Normal file
Binary file not shown.
121
libraries/WiFi/extras/scripts/ArduinoWifiShield_upgrade.sh
Executable file
121
libraries/WiFi/extras/scripts/ArduinoWifiShield_upgrade.sh
Executable file
@ -0,0 +1,121 @@
|
||||
#!/bin/sh
|
||||
|
||||
#WIFI_FW_PATH="/hardware/arduino/firmwares/wifishield/binary"
|
||||
WIFI_FW_PATH="/libraries/WiFi/extras/binary"
|
||||
AVR_TOOLS_PATH="/hardware/tools/avr/bin"
|
||||
|
||||
TARGET_MICRO="at32uc3a1256"
|
||||
|
||||
|
||||
progname=$0
|
||||
|
||||
usage () {
|
||||
cat <<EOF
|
||||
Usage: $progname [-a Arduino_path] [-f which_firmware] [-h]
|
||||
-a set the path where the Arduino IDE is installed
|
||||
-f the firmware you want to upload, valid parameters are:
|
||||
shield - to upgrade the WiFi shield firmware
|
||||
all - to upgrade both firmwares
|
||||
-h help
|
||||
EOF
|
||||
exit 0
|
||||
}
|
||||
|
||||
upgradeHDmodule () {
|
||||
sleep 1 # Give time to the shield to end the boot
|
||||
echo "****Upgrade HD WiFi module firmware****\n"
|
||||
dfu-programmer $TARGET_MICRO erase
|
||||
dfu-programmer $TARGET_MICRO flash --suppress-bootloader-mem $WIFI_FW_PATH/wifi_dnld.hex
|
||||
dfu-programmer $TARGET_MICRO start
|
||||
|
||||
if [ $? != 0 ] ; then
|
||||
echo "\nError during device initialization, please close the J3 jumper and press the reset button.\nTry -h for help\n"
|
||||
exit 1 # if the device is not recognized exit
|
||||
fi
|
||||
|
||||
echo -n "\nPress the RESET button on the shield then type [ENTER] to upgrade the firmware of the shield..\n"
|
||||
read readEnter
|
||||
}
|
||||
|
||||
upgradeShield () {
|
||||
sleep 1 # Give time to the shield to end the boot
|
||||
echo "****Upgrade WiFi Shield firmware****\n"
|
||||
dfu-programmer $TARGET_MICRO erase
|
||||
dfu-programmer $TARGET_MICRO flash --suppress-bootloader-mem $WIFI_FW_PATH/wifiHD.hex
|
||||
dfu-programmer $TARGET_MICRO start
|
||||
|
||||
if [ $? != 0 ] ; then
|
||||
echo "\nError during device initialization, please close the J3 jumper and press the reset button.\nTry -h for help\n"
|
||||
exit 1 # if the device is not recognized exit
|
||||
fi
|
||||
|
||||
echo "\nDone. Remove the J3 jumper and press the RESET button on the shield."
|
||||
echo "Thank you!\n"
|
||||
}
|
||||
|
||||
|
||||
cat <<EOF
|
||||
|
||||
Arduino WiFi Shield upgrade
|
||||
=========================================
|
||||
Instructions:
|
||||
|
||||
To access to the USB devices correctly, the dfu-programmer needs to have the root permissions.
|
||||
|
||||
You can upgrade the firmware of the antenna togheter with the shield firmware or only the shield firmware
|
||||
if there aren't changes on the antenna firmware.
|
||||
|
||||
Use the '-h' parameter for help
|
||||
=========================================
|
||||
|
||||
EOF
|
||||
|
||||
if [ $USER = 'root' ] ; then #check if the current user is root
|
||||
while getopts ":a:f:h" opt; do
|
||||
case $opt in
|
||||
a)
|
||||
ARDUINO_PATH=$OPTARG
|
||||
WIFI_FW_PATH=$ARDUINO_PATH$WIFI_FW_PATH
|
||||
AVR_TOOLS_PATH=$ARDUINO_PATH$AVR_TOOLS_PATH
|
||||
cd $AVR_TOOLS_PATH
|
||||
./avr-objcopy --output-target=ihex $WIFI_FW_PATH/wifi_dnld.elf $WIFI_FW_PATH/wifi_dnld.hex
|
||||
./avr-objcopy --output-target=ihex $WIFI_FW_PATH/wifiHD.elf $WIFI_FW_PATH/wifiHD.hex
|
||||
;;
|
||||
f)
|
||||
if [ "$ARDUINO_PATH" != "" ] ; then
|
||||
if [ "$OPTARG" = "all" ] ; then
|
||||
upgradeHDmodule
|
||||
upgradeShield
|
||||
exit 0
|
||||
else
|
||||
if [ "$OPTARG" = "shield" ] ; then
|
||||
upgradeShield
|
||||
exit 0
|
||||
else
|
||||
echo "invalid parameter for the -f [firmware] option, please retry."
|
||||
echo "Type -h for help\n"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Arduino Path not setted. Retry...\n"
|
||||
fi
|
||||
;;
|
||||
h)
|
||||
usage ;;
|
||||
\?)
|
||||
echo "Invalid option: $OPTARG" >&2
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
echo "Please retry running the script as root.\n"
|
||||
fi
|
||||
|
||||
shift $(($OPTIND - 1))
|
4045
libraries/WiFi/extras/wifiHD/.cproject
Normal file
4045
libraries/WiFi/extras/wifiHD/.cproject
Normal file
@ -0,0 +1,4045 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="avr32.managedbuild.config.gnu.exe.debug.1622245200">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="avr32.managedbuild.config.gnu.exe.debug.1622245200" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
|
||||
<extension id="com.atmel.avr.toolchain.avr32gcc.elf32-avr32" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="wifiHD" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="AVR32 Standalone debug configuration" id="avr32.managedbuild.config.gnu.exe.debug.1622245200" name="Debug" parent="avr32.managedbuild.config.gnu.exe.debug" postannouncebuildStep="Size Before build" postbuildStep="avr32-size ${BuildArtifactFileName}" preannouncebuildStep="" prebuildStep="">
|
||||
<folderInfo id="avr32.managedbuild.config.gnu.exe.debug.1622245200." name="/" resourcePath="">
|
||||
<toolChain id="avr32.managedbuild.toolchain.gnu.exe.debug.1787446984" name="32-bit AVR/GNU C/C++ Toolchain" superClass="avr32.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="avr32.managedbuild.target.gnu.platform.exe.debug.1577294140" name="%PlatformName.Dbg" superClass="avr32.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/wifiHD/Debug}" enableAutoBuild="false" id="avr32.managedbuild.target.gnu.builder.exe.debug.860077655" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="avr32.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.archiver.exe.debug.716199814" name="32-bit AVR/GNU Archiver" superClass="avr32.managedbuild.tool.gnu.archiver.exe.debug"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.compiler.exe.debug.2050435638" name="32-bit AVR/GNU C++ Compiler" superClass="avr32.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.167185469" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1072153032" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.cpp.compiler.option.mcu.538485808" name="Microcontroller Unit" superClass="avr32.cpp.compiler.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1291994818" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
</option>
|
||||
<option id="avr32.cpp.compiler.option.flashvault.1873560474" name="Enable FlashVault support" superClass="avr32.cpp.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1012366065" name="32-bit AVR/GNU C Compiler" superClass="avr32.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.187661945" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.optimize" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.957359437" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.c.compiler.option.mcu.442256180" name="Microcontroller Unit" superClass="avr32.c.compiler.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.optimization.flags.1362317068" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="-fdata-sections -ffunction-sections" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.2032815329" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD=ARDUINO"/>
|
||||
<listOptionValue builtIn="false" value="NO_SYS"/>
|
||||
<listOptionValue builtIn="false" value="_DEBUG_"/>
|
||||
<listOptionValue builtIn="false" value="_ASSERT_ENABLE_"/>
|
||||
<listOptionValue builtIn="false" value="WITH_KEY"/>
|
||||
<listOptionValue builtIn="false" value="WITH_WPA"/>
|
||||
<listOptionValue builtIn="false" value="WITH_NO_DMA"/>
|
||||
<listOptionValue builtIn="false" value="DATAFLASH=1"/>
|
||||
<listOptionValue builtIn="false" value="_INFO_DEBUG_=1"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.199111087" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value="../src"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include/ipv4"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/if/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD"/>
|
||||
</option>
|
||||
<option id="avr32.c.compiler.option.flashvault.1511808014" name="Enable FlashVault support" superClass="avr32.c.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
<option id="avr32.c.compiler.option.fpic.1413737757" name="Generate position-independent code" superClass="avr32.c.compiler.option.fpic" value="false" valueType="boolean"/>
|
||||
<option id="avr32.c.compiler.option.mforce-double-align.1833231832" name="Force double-word alignment" superClass="avr32.c.compiler.option.mforce-double-align" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.warnings.pedantic.error.266375625" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="false" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.warnings.toerrors.1148543352" name="Warnings as errors (-Werror)" superClass="gnu.c.compiler.option.warnings.toerrors" value="false" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.misc.verbose.1690548506" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose" value="false" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.misc.other.617535058" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0" valueType="string"/>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.c.compiler.input.253539519" superClass="avr32.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.linker.exe.debug.1134510857" name="32-bit AVR/GNU C Linker" superClass="avr32.managedbuild.tool.gnu.c.linker.exe.debug">
|
||||
<option id="avr32.c.linker.option.mcu.208178139" name="Microcontroller Unit" superClass="avr32.c.linker.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.c.link.option.nostart.975559445" name="Do not use standard start files (-nostartfiles)" superClass="gnu.c.link.option.nostart" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.link.option.ldflags.569230699" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="-Wl,--gc-sections -Wl,-e,_trampoline -T../src/SOFTWARE_FRAMEWORK/UTILS/LINKER_SCRIPTS/AT32UC3A/1256/GCC/link_uc3a1256.lds" valueType="string"/>
|
||||
<option id="gnu.c.link.option.paths.1433794230" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC}""/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.libs.1720035119" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_spi_v2.7.0"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_wl_sta_intwpa_v2.7.0"/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.strip.878241046" name="Omit all symbol information (-s)" superClass="gnu.c.link.option.strip" value="false" valueType="boolean"/>
|
||||
<option id="avr32.c.linker.option.gc-sections.1193662367" name="Garbage collect unused sections" superClass="avr32.c.linker.option.gc-sections" value="true" valueType="boolean"/>
|
||||
<option id="avr32.c.linker.option.rodata-writable.1710110734" name="Put read-only data in writable data section" superClass="avr32.c.linker.option.rodata-writable" value="true" valueType="boolean"/>
|
||||
<option id="avr32.c.linker.option.fpic.953076621" name="Generate position-independent code" superClass="avr32.c.linker.option.fpic" value="false" valueType="boolean"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.974320538" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.linker.exe.debug.2023008784" name="32-bit AVR/GNU C++ Linker" superClass="avr32.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="avr32.cpp.linker.option.mcu.1842160542" name="Microcontroller Unit" superClass="avr32.cpp.linker.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.libs.553570579" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1808219646" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.assembler.exe.debug.1265602469" name="32-bit AVR/GNU Assembler" superClass="avr32.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<option id="avr32.both.asm.option.debugging.level.1267695286" name="Debug Level" superClass="avr32.both.asm.option.debugging.level" value="avr32.both.asm.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.both.asm.option.mcu.1719949047" name="Microcontroller Unit" superClass="avr32.both.asm.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.both.asm.option.include.paths.856598085" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.preprocessor.exe.debug.634227134" name="32-bit AVR/GNU Preprocessing Assembler" superClass="avr32.managedbuild.tool.gnu.preprocessor.exe.debug">
|
||||
<option id="avr32.both.preprocessor.option.debugging.level.1586886701" name="Debug Level" superClass="avr32.both.preprocessor.option.debugging.level" value="avr32.both.preprocessor.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.both.preprocessor.option.mcu.1298401384" name="Microcontroller Unit" superClass="avr32.both.preprocessor.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.flags.1724795968" name="Assembler flags" superClass="avr32.both.preprocessor.option.flags" value="-Wa,-g" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.paths.1859276996" name="Include paths (-I)" superClass="avr32.both.preprocessor.option.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.preprocessor.input.678543067" superClass="avr32.managedbuild.tool.gnu.preprocessor.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<entry excluding="spb.h|httpd.h|httpd.c|platform_spi.h|clocks.c|clocks.h|nor_flash.h|nor_flash.c|wl_util.h|wl_util.c|startup.h|startup.c|ttcp.h|ttcp.c|fsdata.c|hdwireless_gif.h|http_server_gui.h|http_server_gui.c|SOFTWARE_FRAMEWORK/COMPONENTS/TOUCH|SOFTWARE_FRAMEWORK/DRIVERS/ADC|SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/wl_fw.h|gui.c|SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC|SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY|SOFTWARE_FRAMEWORK/COMPONENTS/DISPLAY/ET024006DHU|gui_getstring.c|SOFTWARE_FRAMEWORK/BOARDS/EVK1105" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445;avr32.managedbuild.config.gnu.exe.release.1761605428.53366445.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1297103917;avr32.managedbuild.tool.gnu.c.compiler.input.1475497800">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200;avr32.managedbuild.config.gnu.exe.debug.1622245200.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1012366065;avr32.managedbuild.tool.gnu.c.compiler.input.253539519">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753;avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1323919988;avr32.managedbuild.tool.gnu.c.compiler.input.253409817">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428;avr32.managedbuild.config.gnu.exe.release.1761605428.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1267623154;avr32.managedbuild.tool.gnu.c.compiler.input.233400464">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="avr32.managedbuild.config.gnu.exe.release.1761605428">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="avr32.managedbuild.config.gnu.exe.release.1761605428" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
|
||||
<extension id="com.atmel.avr.toolchain.avr32gcc.elf32-avr32" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="wifiHD" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="AVR32 Standalone release configuration" id="avr32.managedbuild.config.gnu.exe.release.1761605428" name="Release" parent="avr32.managedbuild.config.gnu.exe.release">
|
||||
<folderInfo id="avr32.managedbuild.config.gnu.exe.release.1761605428." name="/" resourcePath="">
|
||||
<toolChain id="avr32.managedbuild.toolchain.gnu.exe.release.192267767" name="32-bit AVR/GNU C/C++ Toolchain" superClass="avr32.managedbuild.toolchain.gnu.exe.release">
|
||||
<targetPlatform id="avr32.managedbuild.target.gnu.platform.exe.release.1727872047" name="%PlatformName.Dbg" superClass="avr32.managedbuild.target.gnu.platform.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/wifiHD/Release}" id="avr32.managedbuild.target.gnu.builder.exe.release.1711429384" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="avr32.managedbuild.target.gnu.builder.exe.release"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.archiver.exe.release.105383899" name="32-bit AVR/GNU Archiver" superClass="avr32.managedbuild.tool.gnu.archiver.exe.release"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.compiler.exe.release.945608372" name="32-bit AVR/GNU C++ Compiler" superClass="avr32.managedbuild.tool.gnu.cpp.compiler.exe.release">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.502745007" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1743210246" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="avr32.cpp.compiler.option.optimization.level.release.1516030118" name="Optimization Level" superClass="avr32.cpp.compiler.option.optimization.level.release" valueType="enumerated"/>
|
||||
<option id="avr32.cpp.compiler.option.mcu.1422527380" name="Microcontroller Unit" superClass="avr32.cpp.compiler.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.866682810" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
</option>
|
||||
<option id="avr32.cpp.compiler.option.flashvault.576086454" name="Enable FlashVault support" superClass="avr32.cpp.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.compiler.exe.release.1267623154" name="32-bit AVR/GNU C Compiler" superClass="avr32.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="avr32.c.compiler.option.optimization.level.release.1407195495" name="Optimization Level" superClass="avr32.c.compiler.option.optimization.level.release" value="gnu.c.optimization.level.optimize" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1207086846" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="avr32.c.compiler.option.mcu.645886185" name="Microcontroller Unit" superClass="avr32.c.compiler.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.optimization.flags.1349270325" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="-fdata-sections" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1416657670" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD=ARDUINO"/>
|
||||
<listOptionValue builtIn="false" value="_ASSERT_ENABLE_"/>
|
||||
<listOptionValue builtIn="false" value="EXT_BOARD=SPB104"/>
|
||||
<listOptionValue builtIn="false" value="WITH_KEY"/>
|
||||
<listOptionValue builtIn="false" value="WITH_WPA"/>
|
||||
<listOptionValue builtIn="false" value="WITH_NO_DMA"/>
|
||||
<listOptionValue builtIn="false" value="DATAFLASH=1"/>
|
||||
<listOptionValue builtIn="false" value="_INFO_DEBUG_=1"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1012245137" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value="../src"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include/ipv4"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/if/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD"/>
|
||||
</option>
|
||||
<option id="avr32.c.compiler.option.flashvault.579935240" name="Enable FlashVault support" superClass="avr32.c.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
<option id="avr32.c.compiler.option.muse-rodata-section.46188949" name="Use section .rodata for read-only data" superClass="avr32.c.compiler.option.muse-rodata-section" value="false" valueType="boolean"/>
|
||||
<option id="avr32.c.compiler.option.mforce-double-align.1255447070" name="Force double-word alignment" superClass="avr32.c.compiler.option.mforce-double-align" value="true" valueType="boolean"/>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.c.compiler.input.233400464" superClass="avr32.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.linker.exe.release.166522415" name="32-bit AVR/GNU C Linker" superClass="avr32.managedbuild.tool.gnu.c.linker.exe.release">
|
||||
<option id="avr32.c.linker.option.mcu.1388034810" name="Microcontroller Unit" superClass="avr32.c.linker.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.c.link.option.nostart.1724907067" name="Do not use standard start files (-nostartfiles)" superClass="gnu.c.link.option.nostart" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.link.option.ldflags.870159720" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="-Wl,--gc-sections -Wl,-e,_trampoline -T../src/SOFTWARE_FRAMEWORK/UTILS/LINKER_SCRIPTS/AT32UC3A/1256/GCC/link_uc3a1256.lds" valueType="string"/>
|
||||
<option id="gnu.c.link.option.paths.1927497406" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC"/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.libs.161654023" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_wl_sta_intwpa_v2.7.0"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_spi_v2.7.0"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.506365499" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.linker.exe.release.1069051853" name="32-bit AVR/GNU C++ Linker" superClass="avr32.managedbuild.tool.gnu.cpp.linker.exe.release">
|
||||
<option id="avr32.cpp.linker.option.mcu.1425379346" name="Microcontroller Unit" superClass="avr32.cpp.linker.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.libs.672185409" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.58237415" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.assembler.exe.release.241240345" name="32-bit AVR/GNU Assembler" superClass="avr32.managedbuild.tool.gnu.assembler.exe.release">
|
||||
<option id="avr32.both.asm.option.debugging.level.1277884270" name="Debug Level" superClass="avr32.both.asm.option.debugging.level" value="avr32.both.asm.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="avr32.both.asm.option.mcu.856977235" name="Microcontroller Unit" superClass="avr32.both.asm.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="gnu.both.asm.option.include.paths.1233318581" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.preprocessor.exe.release.324928388" name="32-bit AVR/GNU Preprocessing Assembler" superClass="avr32.managedbuild.tool.gnu.preprocessor.exe.release">
|
||||
<option id="avr32.both.preprocessor.option.debugging.level.1893617259" name="Debug Level" superClass="avr32.both.preprocessor.option.debugging.level" value="avr32.both.preprocessor.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="avr32.both.preprocessor.option.mcu.1546028534" name="Microcontroller Unit" superClass="avr32.both.preprocessor.option.mcu" value="-mpart=uc3a1256" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.flags.211248019" name="Assembler flags" superClass="avr32.both.preprocessor.option.flags" value="-Wa,-g" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.paths.108191235" name="Include paths (-I)" superClass="avr32.both.preprocessor.option.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.preprocessor.input.1319925321" superClass="avr32.managedbuild.tool.gnu.preprocessor.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<entry excluding="spb.h|httpd.h|httpd.c|platform_spi.h|clocks.c|clocks.h|nor_flash.h|nor_flash.c|wl_util.h|wl_util.c|startup.h|startup.c|ttcp.h|ttcp.c|fsdata.c|hdwireless_gif.h|http_server_gui.h|http_server_gui.c|SOFTWARE_FRAMEWORK/COMPONENTS/TOUCH|SOFTWARE_FRAMEWORK/DRIVERS/ADC|SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/wl_fw.h|gui.c|SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC|SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY|SOFTWARE_FRAMEWORK/COMPONENTS/DISPLAY/ET024006DHU|gui_getstring.c|SOFTWARE_FRAMEWORK/BOARDS/EVK1105" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445;avr32.managedbuild.config.gnu.exe.release.1761605428.53366445.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1297103917;avr32.managedbuild.tool.gnu.c.compiler.input.1475497800">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200;avr32.managedbuild.config.gnu.exe.debug.1622245200.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1012366065;avr32.managedbuild.tool.gnu.c.compiler.input.253539519">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753;avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1323919988;avr32.managedbuild.tool.gnu.c.compiler.input.253409817">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428;avr32.managedbuild.config.gnu.exe.release.1761605428.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1267623154;avr32.managedbuild.tool.gnu.c.compiler.input.233400464">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753" moduleId="org.eclipse.cdt.core.settings" name="Debug_512">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
|
||||
<extension id="com.atmel.avr.toolchain.avr32gcc.elf32-avr32" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="wifiHD" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Debug version with UC3A1512" id="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753" name="Debug_512" parent="avr32.managedbuild.config.gnu.exe.debug" postannouncebuildStep="Size Before build" postbuildStep="avr32-size ${BuildArtifactFileName}" preannouncebuildStep="" prebuildStep="">
|
||||
<folderInfo id="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753." name="/" resourcePath="">
|
||||
<toolChain id="avr32.managedbuild.toolchain.gnu.exe.debug.2083074440" name="32-bit AVR/GNU C/C++ Toolchain" superClass="avr32.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="avr32.managedbuild.target.gnu.platform.exe.debug.38192914" name="%PlatformName.Dbg" superClass="avr32.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/wifiHD/Debug}" enableAutoBuild="false" id="avr32.managedbuild.target.gnu.builder.exe.debug.400270958" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="avr32.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.archiver.exe.debug.1395287317" name="32-bit AVR/GNU Archiver" superClass="avr32.managedbuild.tool.gnu.archiver.exe.debug"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.compiler.exe.debug.1383760306" name="32-bit AVR/GNU C++ Compiler" superClass="avr32.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1237270418" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.203852406" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.cpp.compiler.option.mcu.829173507" name="Microcontroller Unit" superClass="avr32.cpp.compiler.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.43763334" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
</option>
|
||||
<option id="avr32.cpp.compiler.option.flashvault.1105479483" name="Enable FlashVault support" superClass="avr32.cpp.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1323919988" name="32-bit AVR/GNU C Compiler" superClass="avr32.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1800930086" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.optimize" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.741746123" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.c.compiler.option.mcu.783032953" name="Microcontroller Unit" superClass="avr32.c.compiler.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.optimization.flags.603264233" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="-fdata-sections" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1502866122" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD=ARDUINO"/>
|
||||
<listOptionValue builtIn="false" value="_APP_DEBUG_"/>
|
||||
<listOptionValue builtIn="false" value="_DEBUG_"/>
|
||||
<listOptionValue builtIn="false" value="_ASSERT_ENABLE_"/>
|
||||
<listOptionValue builtIn="false" value="EXT_BOARD=SPB104"/>
|
||||
<listOptionValue builtIn="false" value="WITH_KEY"/>
|
||||
<listOptionValue builtIn="false" value="WITH_WPA"/>
|
||||
<listOptionValue builtIn="false" value="WITH_NO_DMA"/>
|
||||
<listOptionValue builtIn="false" value="LWIP_DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="_INFO_DEBUG_=1"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1906241430" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value="../src"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include/ipv4"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/if/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD"/>
|
||||
</option>
|
||||
<option id="avr32.c.compiler.option.flashvault.1472510326" name="Enable FlashVault support" superClass="avr32.c.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.c.compiler.input.253409817" superClass="avr32.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.linker.exe.debug.626271173" name="32-bit AVR/GNU C Linker" superClass="avr32.managedbuild.tool.gnu.c.linker.exe.debug">
|
||||
<option id="avr32.c.linker.option.mcu.538638440" name="Microcontroller Unit" superClass="avr32.c.linker.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.c.link.option.nostart.1656241739" name="Do not use standard start files (-nostartfiles)" superClass="gnu.c.link.option.nostart" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.link.option.ldflags.87118628" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="-Wl,--gc-sections" valueType="string"/>
|
||||
<option id="gnu.c.link.option.paths.812828263" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.1.1/UCR2/GCC"/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.libs.1653832984" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_spi_standalone_v2.1.1"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_wl_standalone_v2.1.1"/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.strip.877150339" name="Omit all symbol information (-s)" superClass="gnu.c.link.option.strip" value="false" valueType="boolean"/>
|
||||
<option id="avr32.c.linker.option.gc-sections.1011245889" name="Garbage collect unused sections" superClass="avr32.c.linker.option.gc-sections" value="true" valueType="boolean"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1861379244" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.linker.exe.debug.1598170753" name="32-bit AVR/GNU C++ Linker" superClass="avr32.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="avr32.cpp.linker.option.mcu.1325073325" name="Microcontroller Unit" superClass="avr32.cpp.linker.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.libs.124073665" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.550636764" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.assembler.exe.debug.417825307" name="32-bit AVR/GNU Assembler" superClass="avr32.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<option id="avr32.both.asm.option.debugging.level.806412699" name="Debug Level" superClass="avr32.both.asm.option.debugging.level" value="avr32.both.asm.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.both.asm.option.mcu.1562959054" name="Microcontroller Unit" superClass="avr32.both.asm.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.both.asm.option.include.paths.1195320391" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.preprocessor.exe.debug.274353966" name="32-bit AVR/GNU Preprocessing Assembler" superClass="avr32.managedbuild.tool.gnu.preprocessor.exe.debug">
|
||||
<option id="avr32.both.preprocessor.option.debugging.level.8654492" name="Debug Level" superClass="avr32.both.preprocessor.option.debugging.level" value="avr32.both.preprocessor.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="avr32.both.preprocessor.option.mcu.1357262899" name="Microcontroller Unit" superClass="avr32.both.preprocessor.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.flags.1867526301" name="Assembler flags" superClass="avr32.both.preprocessor.option.flags" value="-Wa,-g" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.paths.703046204" name="Include paths (-I)" superClass="avr32.both.preprocessor.option.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.preprocessor.input.1411171721" superClass="avr32.managedbuild.tool.gnu.preprocessor.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<entry excluding="spb.h|httpd.h|httpd.c|platform_spi.h|clocks.c|clocks.h|nor_flash.h|nor_flash.c|wl_util.h|wl_util.c|startup.h|startup.c|ttcp.h|ttcp.c|fsdata.c|hdwireless_gif.h|http_server_gui.h|http_server_gui.c|SOFTWARE_FRAMEWORK/COMPONENTS/TOUCH|SOFTWARE_FRAMEWORK/DRIVERS/ADC|SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/wl_fw.h|gui.c|SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC|SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY|SOFTWARE_FRAMEWORK/COMPONENTS/DISPLAY/ET024006DHU|gui_getstring.c|SOFTWARE_FRAMEWORK/BOARDS/EVK1105" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445;avr32.managedbuild.config.gnu.exe.release.1761605428.53366445.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1297103917;avr32.managedbuild.tool.gnu.c.compiler.input.1475497800">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200;avr32.managedbuild.config.gnu.exe.debug.1622245200.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1012366065;avr32.managedbuild.tool.gnu.c.compiler.input.253539519">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753;avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1323919988;avr32.managedbuild.tool.gnu.c.compiler.input.253409817">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428;avr32.managedbuild.config.gnu.exe.release.1761605428.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1267623154;avr32.managedbuild.tool.gnu.c.compiler.input.233400464">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445" moduleId="org.eclipse.cdt.core.settings" name="Release_512">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
|
||||
<extension id="com.atmel.avr.toolchain.avr32gcc.elf32-avr32" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="wifiHD" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Release version for UC3A1512" id="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445" name="Release_512" parent="avr32.managedbuild.config.gnu.exe.release">
|
||||
<folderInfo id="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445." name="/" resourcePath="">
|
||||
<toolChain id="avr32.managedbuild.toolchain.gnu.exe.release.567531772" name="32-bit AVR/GNU C/C++ Toolchain" superClass="avr32.managedbuild.toolchain.gnu.exe.release">
|
||||
<targetPlatform id="avr32.managedbuild.target.gnu.platform.exe.release.316254328" name="%PlatformName.Dbg" superClass="avr32.managedbuild.target.gnu.platform.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/wifiHD/Release}" id="avr32.managedbuild.target.gnu.builder.exe.release.1357743529" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="avr32.managedbuild.target.gnu.builder.exe.release"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.archiver.exe.release.761598511" name="32-bit AVR/GNU Archiver" superClass="avr32.managedbuild.tool.gnu.archiver.exe.release"/>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.compiler.exe.release.137271919" name="32-bit AVR/GNU C++ Compiler" superClass="avr32.managedbuild.tool.gnu.cpp.compiler.exe.release">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1518389785" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1317941226" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="avr32.cpp.compiler.option.optimization.level.release.888183134" name="Optimization Level" superClass="avr32.cpp.compiler.option.optimization.level.release" valueType="enumerated"/>
|
||||
<option id="avr32.cpp.compiler.option.mcu.501397069" name="Microcontroller Unit" superClass="avr32.cpp.compiler.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.721469775" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
</option>
|
||||
<option id="avr32.cpp.compiler.option.flashvault.194576687" name="Enable FlashVault support" superClass="avr32.cpp.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.compiler.exe.release.1297103917" name="32-bit AVR/GNU C Compiler" superClass="avr32.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="avr32.c.compiler.option.optimization.level.release.920485052" name="Optimization Level" superClass="avr32.c.compiler.option.optimization.level.release" value="gnu.c.optimization.level.optimize" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.601864900" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="avr32.c.compiler.option.mcu.1939612987" name="Microcontroller Unit" superClass="avr32.c.compiler.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.optimization.flags.1605444587" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="-fdata-sections" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.2051999757" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD=ARDUINO"/>
|
||||
<listOptionValue builtIn="false" value="_ASSERT_ENABLE_"/>
|
||||
<listOptionValue builtIn="false" value="EXT_BOARD=SPB104"/>
|
||||
<listOptionValue builtIn="false" value="WITH_KEY"/>
|
||||
<listOptionValue builtIn="false" value="WITH_WPA"/>
|
||||
<listOptionValue builtIn="false" value="WITH_NO_DMA"/>
|
||||
<listOptionValue builtIn="false" value="LWIP_DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="_INFO_DEBUG_=1"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.193739172" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value="../src"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/include/ipv4"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/if/include"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD"/>
|
||||
</option>
|
||||
<option id="avr32.c.compiler.option.flashvault.706805068" name="Enable FlashVault support" superClass="avr32.c.compiler.option.flashvault" value="false" valueType="boolean"/>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.c.compiler.input.1475497800" superClass="avr32.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.c.linker.exe.release.1288338195" name="32-bit AVR/GNU C Linker" superClass="avr32.managedbuild.tool.gnu.c.linker.exe.release">
|
||||
<option id="avr32.c.linker.option.mcu.1925600688" name="Microcontroller Unit" superClass="avr32.c.linker.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.c.link.option.nostart.2039417085" name="Do not use standard start files (-nostartfiles)" superClass="gnu.c.link.option.nostart" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.link.option.ldflags.1722356522" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="-Wl,--gc-sections" valueType="string"/>
|
||||
<option id="gnu.c.link.option.paths.1959265164" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.1.1/UCR2/GCC"/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.libs.1049639323" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_spi_standalone_v2.1.1"/>
|
||||
<listOptionValue builtIn="false" value="_ucr2_hd_wl_standalone_v2.1.1"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.632786917" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.cpp.linker.exe.release.524443971" name="32-bit AVR/GNU C++ Linker" superClass="avr32.managedbuild.tool.gnu.cpp.linker.exe.release">
|
||||
<option id="avr32.cpp.linker.option.mcu.1441351036" name="Microcontroller Unit" superClass="avr32.cpp.linker.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.libs.357630882" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="newlib_addons-at32ucr2-speed_opt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1766302960" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.assembler.exe.release.1716843860" name="32-bit AVR/GNU Assembler" superClass="avr32.managedbuild.tool.gnu.assembler.exe.release">
|
||||
<option id="avr32.both.asm.option.debugging.level.1012502787" name="Debug Level" superClass="avr32.both.asm.option.debugging.level" value="avr32.both.asm.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="avr32.both.asm.option.mcu.1121971446" name="Microcontroller Unit" superClass="avr32.both.asm.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="gnu.both.asm.option.include.paths.1772545555" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="avr32.managedbuild.tool.gnu.preprocessor.exe.release.1758206047" name="32-bit AVR/GNU Preprocessing Assembler" superClass="avr32.managedbuild.tool.gnu.preprocessor.exe.release">
|
||||
<option id="avr32.both.preprocessor.option.debugging.level.1064888815" name="Debug Level" superClass="avr32.both.preprocessor.option.debugging.level" value="avr32.both.preprocessor.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="avr32.both.preprocessor.option.mcu.1280537649" name="Microcontroller Unit" superClass="avr32.both.preprocessor.option.mcu" value="-mpart=uc3a1512" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.flags.1754897169" name="Assembler flags" superClass="avr32.both.preprocessor.option.flags" value="-Wa,-g" valueType="string"/>
|
||||
<option id="avr32.both.preprocessor.option.paths.213343763" name="Include paths (-I)" superClass="avr32.both.preprocessor.option.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/TC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/SERVICES/DELAY"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/USART"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/SPI"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/RTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/PM"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/EIC"/>
|
||||
<listOptionValue builtIn="false" value="../src/CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/CPU/CYCLE_COUNTER"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/INCLUDE"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS/PREPROCESSOR"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/UTILS"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/DRIVERS/INTC"/>
|
||||
<listOptionValue builtIn="false" value="../src/SOFTWARE_FRAMEWORK/BOARDS"/>
|
||||
</option>
|
||||
<inputType id="avr32.managedbuild.tool.gnu.preprocessor.input.1134352373" superClass="avr32.managedbuild.tool.gnu.preprocessor.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX"/>
|
||||
<entry excluding="spb.h|httpd.h|httpd.c|platform_spi.h|clocks.c|clocks.h|nor_flash.h|nor_flash.c|wl_util.h|wl_util.c|startup.h|startup.c|ttcp.h|ttcp.c|fsdata.c|hdwireless_gif.h|http_server_gui.h|http_server_gui.c|SOFTWARE_FRAMEWORK/COMPONENTS/TOUCH|SOFTWARE_FRAMEWORK/DRIVERS/ADC|SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/wl_fw.h|gui.c|SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC|SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY|SOFTWARE_FRAMEWORK/COMPONENTS/DISPLAY/ET024006DHU|gui_getstring.c|SOFTWARE_FRAMEWORK/BOARDS/EVK1105" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428.53366445;avr32.managedbuild.config.gnu.exe.release.1761605428.53366445.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1297103917;avr32.managedbuild.tool.gnu.c.compiler.input.1475497800">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200;avr32.managedbuild.config.gnu.exe.debug.1622245200.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1012366065;avr32.managedbuild.tool.gnu.c.compiler.input.253539519">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753;avr32.managedbuild.config.gnu.exe.debug.1622245200.609577753.;avr32.managedbuild.tool.gnu.c.compiler.exe.debug.1323919988;avr32.managedbuild.tool.gnu.c.compiler.input.253409817">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="avr32.managedbuild.config.gnu.exe.release.1761605428;avr32.managedbuild.config.gnu.exe.release.1761605428.;avr32.managedbuild.tool.gnu.c.compiler.exe.release.1267623154;avr32.managedbuild.tool.gnu.c.compiler.input.233400464">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC"/>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32ManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32StandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="com.atmel.avr32.debug.AVR32LinuxStandardMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-mpart=${part} -E -P -v -dD ${plugin_state_location}/${specs_file}" command="avr32-linux-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="wifiHD.avr32.managedbuild.target.gnu.exe_2.0.1.351102936" name="32-bit AVR/GNU Executable" projectType="avr32.managedbuild.target.gnu.exe_2.0.1"/>
|
||||
</storageModule>
|
||||
</cproject>
|
77
libraries/WiFi/extras/wifiHD/.project
Normal file
77
libraries/WiFi/extras/wifiHD/.project
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>wifiHD</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/wifiHD/Debug}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.atmel.avr32.core.nature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>UC3 Software Framework</name>
|
||||
<type>2</type>
|
||||
<locationURI>framework:/com.atmel.avr32.sf.uc3</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
BIN
libraries/WiFi/extras/wifiHD/Release/wifiHD.elf
Normal file
BIN
libraries/WiFi/extras/wifiHD/Release/wifiHD.elf
Normal file
Binary file not shown.
16358
libraries/WiFi/extras/wifiHD/Release/wifiHD.hex
Normal file
16358
libraries/WiFi/extras/wifiHD/Release/wifiHD.hex
Normal file
File diff suppressed because it is too large
Load Diff
170
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_access.h
Normal file
170
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_access.h
Normal file
@ -0,0 +1,170 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Memory access control configuration file.
|
||||
*
|
||||
* This file contains the possible external configuration of the memory access
|
||||
* control.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CONF_ACCESS_H_
|
||||
#define _CONF_ACCESS_H_
|
||||
|
||||
#include "compiler.h"
|
||||
#include "board.h"
|
||||
|
||||
|
||||
/*! \name Activation of Logical Unit Numbers
|
||||
*/
|
||||
//! @{
|
||||
#define LUN_0 DISABLE //!< On-Chip Virtual Memory.
|
||||
#define LUN_1 ENABLE //!< AT45DBX Data Flash.
|
||||
#define LUN_2 DISABLE //!< SD/MMC Card over SPI.
|
||||
#define LUN_3 DISABLE
|
||||
#define LUN_4 DISABLE
|
||||
#define LUN_5 DISABLE
|
||||
#define LUN_6 DISABLE
|
||||
#define LUN_7 DISABLE
|
||||
#define LUN_USB DISABLE //!< Host Mass-Storage Memory.
|
||||
//! @}
|
||||
|
||||
/*! \name LUN 0 Definitions
|
||||
*/
|
||||
//! @{
|
||||
#define VIRTUAL_MEM LUN_0
|
||||
#define LUN_ID_VIRTUAL_MEM LUN_ID_0
|
||||
#define LUN_0_INCLUDE "virtual_mem.h"
|
||||
#define Lun_0_test_unit_ready virtual_test_unit_ready
|
||||
#define Lun_0_read_capacity virtual_read_capacity
|
||||
#define Lun_0_wr_protect virtual_wr_protect
|
||||
#define Lun_0_removal virtual_removal
|
||||
#define Lun_0_usb_read_10 virtual_usb_read_10
|
||||
#define Lun_0_usb_write_10 virtual_usb_write_10
|
||||
#define Lun_0_mem_2_ram virtual_mem_2_ram
|
||||
#define Lun_0_ram_2_mem virtual_ram_2_mem
|
||||
#define LUN_0_NAME "\"On-Chip Virtual Memory\""
|
||||
//! @}
|
||||
|
||||
/*! \name LUN 1 Definitions
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_MEM LUN_1
|
||||
#define LUN_ID_AT45DBX_MEM LUN_ID_1
|
||||
#define LUN_1_INCLUDE "at45dbx_mem.h"
|
||||
#define Lun_1_test_unit_ready at45dbx_test_unit_ready
|
||||
#define Lun_1_read_capacity at45dbx_read_capacity
|
||||
#define Lun_1_wr_protect at45dbx_wr_protect
|
||||
#define Lun_1_removal at45dbx_removal
|
||||
#define Lun_1_usb_read_10 at45dbx_usb_read_10
|
||||
#define Lun_1_usb_write_10 at45dbx_usb_write_10
|
||||
#define Lun_1_mem_2_ram at45dbx_df_2_ram
|
||||
#define Lun_1_ram_2_mem at45dbx_ram_2_df
|
||||
#define LUN_1_NAME "\"AT45DBX Data Flash\""
|
||||
//! @}
|
||||
|
||||
/*! \name LUN 2 Definitions
|
||||
*/
|
||||
//! @{
|
||||
#define SD_MMC_SPI_MEM LUN_2
|
||||
#define LUN_ID_SD_MMC_SPI_MEM LUN_ID_2
|
||||
#define LUN_2_INCLUDE "sd_mmc_spi_mem.h"
|
||||
#define Lun_2_test_unit_ready sd_mmc_spi_test_unit_ready
|
||||
#define Lun_2_read_capacity sd_mmc_spi_read_capacity
|
||||
#define Lun_2_wr_protect sd_mmc_spi_wr_protect
|
||||
#define Lun_2_removal sd_mmc_spi_removal
|
||||
#define Lun_2_usb_read_10 sd_mmc_spi_usb_read_10
|
||||
#define Lun_2_usb_write_10 sd_mmc_spi_usb_write_10
|
||||
#define Lun_2_mem_2_ram sd_mmc_spi_mem_2_ram
|
||||
#define Lun_2_ram_2_mem sd_mmc_spi_ram_2_mem
|
||||
#define LUN_2_NAME "\"SD/MMC Card over SPI\""
|
||||
//! @}
|
||||
|
||||
/*! \name USB LUNs Definitions
|
||||
*/
|
||||
//! @{
|
||||
#define MEM_USB LUN_USB
|
||||
#define LUN_ID_MEM_USB LUN_ID_USB
|
||||
#define LUN_USB_INCLUDE "host_mem.h"
|
||||
#define Lun_usb_test_unit_ready(lun) host_test_unit_ready(lun)
|
||||
#define Lun_usb_read_capacity(lun, nb_sect) host_read_capacity(lun, nb_sect)
|
||||
#define Lun_usb_read_sector_size(lun) host_read_sector_size(lun)
|
||||
#define Lun_usb_wr_protect(lun) host_wr_protect(lun)
|
||||
#define Lun_usb_removal() host_removal()
|
||||
#define Lun_usb_mem_2_ram(addr, ram) host_read_10_ram(addr, ram)
|
||||
#define Lun_usb_ram_2_mem(addr, ram) host_write_10_ram(addr, ram)
|
||||
#define LUN_USB_NAME "\"Host Mass-Storage Memory\""
|
||||
//! @}
|
||||
|
||||
/*! \name Actions Associated with Memory Accesses
|
||||
*
|
||||
* Write here the action to associate with each memory access.
|
||||
*
|
||||
* \warning Be careful not to waste time in order not to disturb the functions.
|
||||
*/
|
||||
//! @{
|
||||
#define memory_start_read_action(nb_sectors)
|
||||
#define memory_stop_read_action()
|
||||
#define memory_start_write_action(nb_sectors)
|
||||
#define memory_stop_write_action()
|
||||
//! @}
|
||||
|
||||
/*! \name Activation of Interface Features
|
||||
*/
|
||||
//! @{
|
||||
#define ACCESS_USB DISABLED //!< MEM <-> USB interface.
|
||||
#define ACCESS_MEM_TO_RAM ENABLED //!< MEM <-> RAM interface.
|
||||
#define ACCESS_STREAM ENABLED //!< Streaming MEM <-> MEM interface. //mlf
|
||||
#define ACCESS_STREAM_RECORD DISABLED //!< Streaming MEM <-> MEM interface in record mode.
|
||||
#define ACCESS_MEM_TO_MEM DISABLED //!< MEM <-> MEM interface.
|
||||
#define ACCESS_CODEC DISABLED //!< Codec interface.
|
||||
//! @}
|
||||
|
||||
/*! \name Specific Options for Access Control
|
||||
*/
|
||||
//! @{
|
||||
#define GLOBAL_WR_PROTECT DISABLED //!< Management of a global write protection.
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // _CONF_ACCESS_H_
|
83
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_at45dbx.h
Normal file
83
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_at45dbx.h
Normal file
@ -0,0 +1,83 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AT45DBX configuration file.
|
||||
*
|
||||
* This file contains the possible external configuration of the AT45DBX.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an SPI module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CONF_AT45DBX_H_
|
||||
#define _CONF_AT45DBX_H_
|
||||
|
||||
|
||||
#include "conf_access.h"
|
||||
|
||||
#if AT45DBX_MEM == DISABLE
|
||||
#error conf_at45dbx.h is #included although AT45DBX_MEM is disabled
|
||||
#endif
|
||||
|
||||
|
||||
#include "at45dbx.h"
|
||||
|
||||
|
||||
//_____ D E F I N I T I O N S ______________________________________________
|
||||
|
||||
//! Size of AT45DBX data flash memories to manage.
|
||||
#define AT45DBX_MEM_SIZE AT45DBX_1MB
|
||||
|
||||
//! Number of AT45DBX components to manage.
|
||||
#define AT45DBX_MEM_CNT 1
|
||||
|
||||
//! First chip select used by AT45DBX components on the SPI module instance.
|
||||
//! AT45DBX_SPI_NPCS0_PIN always corresponds to this first NPCS, whatever it is.
|
||||
#define AT45DBX_SPI_FIRST_NPCS AT45DBX_SPI_NPCS
|
||||
|
||||
//! SPI master speed in Hz.
|
||||
#define AT45DBX_SPI_MASTER_SPEED 12000000
|
||||
|
||||
//! Number of bits in each SPI transfer.
|
||||
#define AT45DBX_SPI_BITS 8
|
||||
|
||||
|
||||
#endif // _CONF_AT45DBX_H_
|
108
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_ebi.h
Normal file
108
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_ebi.h
Normal file
@ -0,0 +1,108 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief CONF_EBI EBI/SMC driver for AVR32 UC3.
|
||||
*
|
||||
* \note The values defined in this file are device-specific. See the device
|
||||
* datasheet for further information.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an SMC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CONF_EBI_H_
|
||||
#define _CONF_EBI_H_
|
||||
|
||||
#include "compiler.h"
|
||||
#include "board.h"
|
||||
|
||||
#if (ET024006DHU_SMC_USE_NCS == 0)
|
||||
#define SMC_USE_NCS0
|
||||
#define SMC_COMPONENT_CS0 ET024006DHU_SMC_COMPONENT_CS
|
||||
#else
|
||||
|
||||
#if (ET024006DHU_SMC_USE_NCS == 2)
|
||||
#define SMC_USE_NCS2
|
||||
#define SMC_COMPONENT_CS2 ET024006DHU_SMC_COMPONENT_CS
|
||||
|
||||
#else
|
||||
#error This board is not supported
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define EBI_DATA_0 ET024006DHU_EBI_DATA_0
|
||||
#define EBI_DATA_1 ET024006DHU_EBI_DATA_1
|
||||
#define EBI_DATA_2 ET024006DHU_EBI_DATA_2
|
||||
#define EBI_DATA_3 ET024006DHU_EBI_DATA_3
|
||||
#define EBI_DATA_4 ET024006DHU_EBI_DATA_4
|
||||
#define EBI_DATA_5 ET024006DHU_EBI_DATA_5
|
||||
#define EBI_DATA_6 ET024006DHU_EBI_DATA_6
|
||||
#define EBI_DATA_7 ET024006DHU_EBI_DATA_7
|
||||
#define EBI_DATA_8 ET024006DHU_EBI_DATA_8
|
||||
#define EBI_DATA_9 ET024006DHU_EBI_DATA_9
|
||||
#define EBI_DATA_10 ET024006DHU_EBI_DATA_10
|
||||
#define EBI_DATA_11 ET024006DHU_EBI_DATA_11
|
||||
#define EBI_DATA_12 ET024006DHU_EBI_DATA_12
|
||||
#define EBI_DATA_13 ET024006DHU_EBI_DATA_13
|
||||
#define EBI_DATA_14 ET024006DHU_EBI_DATA_14
|
||||
#define EBI_DATA_15 ET024006DHU_EBI_DATA_15
|
||||
|
||||
#if BOARD==EVK1105
|
||||
#ifdef EVK1105_REV3
|
||||
#define EBI_ADDR_19 AVR32_EBI_ADDR_19
|
||||
#define EBI_NCS_2 ET024006DHU_EBI_NCS
|
||||
#else
|
||||
#define EBI_ADDR_21 ET024006DHU_EBI_ADDR_21
|
||||
#define EBI_NCS_0 ET024006DHU_EBI_NCS
|
||||
#endif
|
||||
#elif BOARD == UC3C_EK
|
||||
#define EBI_ADDR_22 AVR32_EBI_ADDR_22
|
||||
#define EBI_NCS_0 ET024006DHU_EBI_NCS
|
||||
#elif BOARD == EVK1104
|
||||
#define EBI_ADDR_21 ET024006DHU_EBI_ADDR_21
|
||||
#define EBI_NCS_0 ET024006DHU_EBI_NCS
|
||||
#endif
|
||||
|
||||
|
||||
#define EBI_NWE0 ET024006DHU_EBI_NWE
|
||||
#define EBI_NRD ET024006DHU_EBI_NRD
|
||||
|
||||
#endif // _CONF_EBI_H_
|
73
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_sd_mmc_spi.h
Normal file
73
libraries/WiFi/extras/wifiHD/src/CONFIG/conf_sd_mmc_spi.h
Normal file
@ -0,0 +1,73 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief SD/MMC configuration file.
|
||||
*
|
||||
* This file contains the possible external configuration of the SD/MMC.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an SPI module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CONF_SD_MMC_SPI_H_
|
||||
#define _CONF_SD_MMC_SPI_H_
|
||||
|
||||
|
||||
#include "conf_access.h"
|
||||
|
||||
#if SD_MMC_SPI_MEM == DISABLE
|
||||
#error conf_sd_mmc_spi.h is #included although SD_MMC_SPI_MEM is disabled
|
||||
#endif
|
||||
|
||||
|
||||
#include "sd_mmc_spi.h"
|
||||
|
||||
|
||||
//_____ D E F I N I T I O N S ______________________________________________
|
||||
|
||||
//! SPI master speed in Hz.
|
||||
#define SD_MMC_SPI_MASTER_SPEED 12000000
|
||||
|
||||
//! Number of bits in each SPI transfer.
|
||||
#define SD_MMC_SPI_BITS 8
|
||||
|
||||
|
||||
#endif // _CONF_SD_MMC_SPI_H_
|
@ -0,0 +1,74 @@
|
||||
/* This file is part of the ATMEL AVR32-SoftwareFramework-AT32UC3A-1.4.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AVR32 UC3 ISP trampoline.
|
||||
*
|
||||
* In order to be able to program a project with both BatchISP and JTAGICE mkII
|
||||
* without having to take the general-purpose fuses into consideration, add this
|
||||
* file to the project and change the program entry point to _trampoline.
|
||||
*
|
||||
* The pre-programmed ISP will be erased if JTAGICE mkII is used.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32UC devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of ATMEL may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
|
||||
* SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include "conf_isp.h"
|
||||
|
||||
|
||||
//! @{
|
||||
//! \verbatim
|
||||
|
||||
|
||||
// This must be linked @ 0x80000000 if it is to be run upon reset.
|
||||
.section .reset, "ax", @progbits
|
||||
|
||||
|
||||
.global _trampoline
|
||||
.type _trampoline, @function
|
||||
_trampoline:
|
||||
// Jump to program start.
|
||||
rjmp program_start
|
||||
|
||||
.org PROGRAM_START_OFFSET
|
||||
program_start:
|
||||
// Jump to the C runtime startup routine.
|
||||
lda.w pc, _stext
|
||||
|
||||
|
||||
//! \endverbatim
|
||||
//! @}
|
@ -0,0 +1,237 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AT32UC3A EVK1100 board header file.
|
||||
*
|
||||
* This file contains definitions and services related to the features of the
|
||||
* EVK1100 board rev. B and C.
|
||||
*
|
||||
* To use this board, define BOARD=EVK1100.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 AT32UC3A devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ARDUINO_H_
|
||||
#define _ARDUINO_H_
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
|
||||
# include "led.h"
|
||||
#endif // __AVR32_ABI_COMPILER__
|
||||
|
||||
|
||||
/*! \name Oscillator Definitions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
// RCOsc has no custom calibration by default. Set the following definition to
|
||||
// the appropriate value if a custom RCOsc calibration has been applied to your
|
||||
// part.
|
||||
//#define FRCOSC AVR32_PM_RCOSC_FREQUENCY //!< RCOsc frequency: Hz.
|
||||
|
||||
#define FOSC32 32768 //!< Osc32 frequency: Hz.
|
||||
#define OSC32_STARTUP AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC //!< Osc32 startup time: RCOsc periods.
|
||||
|
||||
#define FOSC0 12000000 //!< Osc0 frequency: Hz.
|
||||
#define OSC0_STARTUP AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC //!< Osc0 startup time: RCOsc periods.
|
||||
|
||||
// Osc1 crystal is not mounted by default. Set the following definitions to the
|
||||
// appropriate values if a custom Osc1 crystal is mounted on your board.
|
||||
//#define FOSC1 12000000 //!< Osc1 frequency: Hz.
|
||||
//#define OSC1_STARTUP AVR32_PM_OSCCTRL1_STARTUP_2048_RCOSC //!< Osc1 startup time: RCOsc periods.
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
//! Number of LEDs.
|
||||
#define LED_COUNT 0
|
||||
|
||||
/*! \name GPIO Connections of LEDs
|
||||
*/
|
||||
//! @{
|
||||
#define LED0_GPIO AVR32_PIN_PB19
|
||||
#define LED1_GPIO AVR32_PIN_PB20
|
||||
#define LED2_GPIO AVR32_PIN_PB21
|
||||
#define DEB_PIN_GPIO AVR32_PIN_PA20
|
||||
#define DEB2_PIN_GPIO AVR32_PIN_PB00
|
||||
//! @}
|
||||
|
||||
/*! \name PWM Channels of LEDs
|
||||
*/
|
||||
//! @{
|
||||
#define LED0_PWM 0
|
||||
#define LED1_PWM 1
|
||||
#define LED2_PWM 2
|
||||
//! @}
|
||||
|
||||
/*! \name PWM Functions of LEDs
|
||||
*/
|
||||
//! @{
|
||||
#define LED0_PWM_FUNCTION AVR32_PWM_0_FUNCTION
|
||||
#define LED1_PWM_FUNCTION AVR32_PWM_1_FUNCTION
|
||||
#define LED2_PWM_FUNCTION AVR32_PWM_2_FUNCTION
|
||||
//! @}
|
||||
|
||||
/*! \name Color Identifiers of LEDs to Use with LED Functions
|
||||
*/
|
||||
//! @{
|
||||
#define LED_MONO0_GREEN LED0
|
||||
#define LED_MONO1_RED LED1
|
||||
#define LED_MONO2_BLU LED2
|
||||
//! @}
|
||||
|
||||
#if 0
|
||||
/*! \name SPI Connections of the DIP204 LCD
|
||||
*/
|
||||
//! @{
|
||||
#define DIP204_SPI (&AVR32_SPI1)
|
||||
#define DIP204_SPI_NPCS 2
|
||||
#define DIP204_SPI_SCK_PIN AVR32_SPI1_SCK_0_0_PIN
|
||||
#define DIP204_SPI_SCK_FUNCTION AVR32_SPI1_SCK_0_0_FUNCTION
|
||||
#define DIP204_SPI_MISO_PIN AVR32_SPI1_MISO_0_0_PIN
|
||||
#define DIP204_SPI_MISO_FUNCTION AVR32_SPI1_MISO_0_0_FUNCTION
|
||||
#define DIP204_SPI_MOSI_PIN AVR32_SPI1_MOSI_0_0_PIN
|
||||
#define DIP204_SPI_MOSI_FUNCTION AVR32_SPI1_MOSI_0_0_FUNCTION
|
||||
#define DIP204_SPI_NPCS_PIN AVR32_SPI1_NPCS_2_0_PIN
|
||||
#define DIP204_SPI_NPCS_FUNCTION AVR32_SPI1_NPCS_2_0_FUNCTION
|
||||
//! @}
|
||||
|
||||
/*! \name GPIO and PWM Connections of the DIP204 LCD Backlight
|
||||
*/
|
||||
//! @{
|
||||
#define DIP204_BACKLIGHT_PIN AVR32_PIN_PB18
|
||||
#define DIP204_PWM_CHANNEL 6
|
||||
#define DIP204_PWM_PIN AVR32_PWM_6_PIN
|
||||
#define DIP204_PWM_FUNCTION AVR32_PWM_6_FUNCTION
|
||||
//! @}
|
||||
#endif
|
||||
|
||||
/*! \name SPI Connections of the AT45DBX Data Flash Memory
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_SPI (&AVR32_SPI1)
|
||||
#define AT45DBX_SPI_NPCS 2
|
||||
#define AT45DBX_SPI_SCK_PIN AVR32_SPI1_SCK_0_0_PIN
|
||||
#define AT45DBX_SPI_SCK_FUNCTION AVR32_SPI1_SCK_0_0_FUNCTION
|
||||
#define AT45DBX_SPI_MISO_PIN AVR32_SPI1_MISO_0_0_PIN
|
||||
#define AT45DBX_SPI_MISO_FUNCTION AVR32_SPI1_MISO_0_0_FUNCTION
|
||||
#define AT45DBX_SPI_MOSI_PIN AVR32_SPI1_MOSI_0_0_PIN
|
||||
#define AT45DBX_SPI_MOSI_FUNCTION AVR32_SPI1_MOSI_0_0_FUNCTION
|
||||
#define AT45DBX_SPI_NPCS2_PIN AVR32_SPI1_NPCS_2_0_PIN
|
||||
#define AT45DBX_SPI_NPCS2_FUNCTION AVR32_SPI1_NPCS_2_0_FUNCTION
|
||||
#define AT45DBX_CHIP_RESET AVR32_PIN_PA02
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name GPIO and SPI Connections of the SD/MMC Connector
|
||||
*/
|
||||
//! @{
|
||||
//#define SD_MMC_CARD_DETECT_PIN AVR32_PIN_PA02
|
||||
//#define SD_MMC_WRITE_PROTECT_PIN AVR32_PIN_PA07
|
||||
#define SD_MMC_SPI (&AVR32_SPI1)
|
||||
#define SD_MMC_SPI_NPCS 1
|
||||
#define SD_MMC_SPI_SCK_PIN AVR32_SPI1_SCK_0_0_PIN
|
||||
#define SD_MMC_SPI_SCK_FUNCTION AVR32_SPI1_SCK_0_0_FUNCTION
|
||||
#define SD_MMC_SPI_MISO_PIN AVR32_SPI1_MISO_0_0_PIN
|
||||
#define SD_MMC_SPI_MISO_FUNCTION AVR32_SPI1_MISO_0_0_FUNCTION
|
||||
#define SD_MMC_SPI_MOSI_PIN AVR32_SPI1_MOSI_0_0_PIN
|
||||
#define SD_MMC_SPI_MOSI_FUNCTION AVR32_SPI1_MOSI_0_0_FUNCTION
|
||||
#define SD_MMC_SPI_NPCS_PIN AVR32_SPI1_NPCS_1_0_PIN
|
||||
#define SD_MMC_SPI_NPCS_FUNCTION AVR32_SPI1_NPCS_1_0_FUNCTION
|
||||
//! @}
|
||||
|
||||
/* Timer Counter to generate clock for WiFi chip*/
|
||||
# define WIFI_TC (&AVR32_TC)
|
||||
# define WIFI_TC_CHANNEL_ID 0
|
||||
# define WIFI_TC_CHANNEL_PIN AVR32_TC_A0_0_0_PIN
|
||||
# define WIFI_TC_CHANNEL_FUNCTION AVR32_TC_A0_0_0_FUNCTION
|
||||
// Note that TC_A0_0_0 pin is pin 6 (PB23) on AT32UC3A1512 QFP100.
|
||||
|
||||
/* Pin related to WiFi chip communication */
|
||||
#ifndef USE_POLL
|
||||
#define USE_POLL
|
||||
#endif
|
||||
#define SPI_CS 0
|
||||
#define AVR32_SPI AVR32_SPI1
|
||||
#define GPIO_IRQ_PIN AVR32_PIN_PA03
|
||||
#define GPIO_IRQ AVR32_GPIO_IRQ_7
|
||||
#define GPIO_W_RESET_PIN AVR32_PIN_PA07
|
||||
#define GPIO_W_SHUTDOWN_PIN AVR32_PIN_PA09
|
||||
|
||||
/* Pin related to shield communication */
|
||||
#define ARDUINO_HANDSHAKE_PIN AVR32_PIN_PA25
|
||||
#define ARDUINO_EXTINT_PIN AVR32_PIN_PA04 //not used
|
||||
|
||||
#define AVR32_PDCA_PID_TX AVR32_PDCA_PID_SPI1_TX
|
||||
#define AVR32_PDCA_PID_RX AVR32_PDCA_PID_SPI1_RX
|
||||
|
||||
|
||||
#if 0
|
||||
/*! \name TWI Connections of the Spare TWI Connector
|
||||
*/
|
||||
//! @{
|
||||
#define SPARE_TWI (&AVR32_TWI)
|
||||
#define SPARE_TWI_SCL_PIN AVR32_TWI_SCL_0_0_PIN
|
||||
#define SPARE_TWI_SCL_FUNCTION AVR32_TWI_SCL_0_0_FUNCTION
|
||||
#define SPARE_TWI_SDA_PIN AVR32_TWI_SDA_0_0_PIN
|
||||
#define SPARE_TWI_SDA_FUNCTION AVR32_TWI_SDA_0_0_FUNCTION
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name SPI Connections of the Spare SPI Connector
|
||||
*/
|
||||
//! @{
|
||||
#define SPARE_SPI (&AVR32_SPI0)
|
||||
#define SPARE_SPI_NPCS 0
|
||||
#define SPARE_SPI_SCK_PIN AVR32_SPI0_SCK_0_0_PIN
|
||||
#define SPARE_SPI_SCK_FUNCTION AVR32_SPI0_SCK_0_0_FUNCTION
|
||||
#define SPARE_SPI_MISO_PIN AVR32_SPI0_MISO_0_0_PIN
|
||||
#define SPARE_SPI_MISO_FUNCTION AVR32_SPI0_MISO_0_0_FUNCTION
|
||||
#define SPARE_SPI_MOSI_PIN AVR32_SPI0_MOSI_0_0_PIN
|
||||
#define SPARE_SPI_MOSI_FUNCTION AVR32_SPI0_MOSI_0_0_FUNCTION
|
||||
#define SPARE_SPI_NPCS_PIN AVR32_SPI0_NPCS_0_0_PIN
|
||||
#define SPARE_SPI_NPCS_FUNCTION AVR32_SPI0_NPCS_0_0_FUNCTION
|
||||
//! @}
|
||||
#endif
|
||||
|
||||
#endif // _ARDUINO_H_
|
@ -0,0 +1,346 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AT32UC3A EVK1100 board LEDs support package.
|
||||
*
|
||||
* This file contains definitions and services related to the LED features of
|
||||
* the EVK1100 board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 AT32UC3A devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include "preprocessor.h"
|
||||
#include "compiler.h"
|
||||
#include "arduino.h"
|
||||
#include "led.h"
|
||||
|
||||
|
||||
//! Structure describing LED hardware connections.
|
||||
typedef const struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
U32 PORT; //!< LED GPIO port.
|
||||
U32 PIN_MASK; //!< Bit-mask of LED pin in GPIO port.
|
||||
} GPIO; //!< LED GPIO descriptor.
|
||||
struct
|
||||
{
|
||||
S32 CHANNEL; //!< LED PWM channel (< 0 if N/A).
|
||||
S32 FUNCTION; //!< LED pin PWM function (< 0 if N/A).
|
||||
} PWM; //!< LED PWM descriptor.
|
||||
} tLED_DESCRIPTOR;
|
||||
|
||||
|
||||
//! Hardware descriptors of all LEDs.
|
||||
static tLED_DESCRIPTOR LED_DESCRIPTOR[LED_COUNT] =
|
||||
{
|
||||
#define INSERT_LED_DESCRIPTOR(LED_NO, unused) \
|
||||
{ \
|
||||
{LED##LED_NO##_GPIO / 32, 1 << (LED##LED_NO##_GPIO % 32)},\
|
||||
{LED##LED_NO##_PWM, LED##LED_NO##_PWM_FUNCTION } \
|
||||
},
|
||||
MREPEAT(LED_COUNT, INSERT_LED_DESCRIPTOR, ~)
|
||||
#undef INSERT_LED_DESCRIPTOR
|
||||
};
|
||||
|
||||
|
||||
//! Saved state of all LEDs.
|
||||
static volatile U32 LED_State = (1 << LED_COUNT) - 1;
|
||||
|
||||
|
||||
U32 LED_Read_Display(void)
|
||||
{
|
||||
return LED_State;
|
||||
}
|
||||
|
||||
|
||||
void LED_Display(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
LED_State = leds;
|
||||
|
||||
// For all LEDs...
|
||||
for (led_descriptor = &LED_DESCRIPTOR[0];
|
||||
led_descriptor < LED_DESCRIPTOR + LED_COUNT;
|
||||
led_descriptor++)
|
||||
{
|
||||
// Set the LED to the requested state.
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
if (leds & 1)
|
||||
{
|
||||
led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
U32 LED_Read_Display_Mask(U32 mask)
|
||||
{
|
||||
return Rd_bits(LED_State, mask);
|
||||
}
|
||||
|
||||
|
||||
void LED_Display_Mask(U32 mask, U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
mask &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Wr_bits(LED_State, mask, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (mask)
|
||||
{
|
||||
// Select the next specified LED and set it to the requested state.
|
||||
led_shift = 1 + ctz(mask);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
leds >>= led_shift - 1;
|
||||
if (leds & 1)
|
||||
{
|
||||
led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= 1;
|
||||
mask >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bool LED_Test(U32 leds)
|
||||
{
|
||||
return Tst_bits(LED_State, leds);
|
||||
}
|
||||
|
||||
|
||||
void LED_Off(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Clr_bits(LED_State, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (leds)
|
||||
{
|
||||
// Select the next specified LED and turn it off.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LED_On(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Set_bits(LED_State, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (leds)
|
||||
{
|
||||
// Select the next specified LED and turn it on.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LED_Toggle(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Tgl_bits(LED_State, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (leds)
|
||||
{
|
||||
// Select the next specified LED and toggle it.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
led_gpio_port->ovrt = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
U32 LED_Read_Display_Field(U32 field)
|
||||
{
|
||||
return Rd_bitfield(LED_State, field);
|
||||
}
|
||||
|
||||
|
||||
void LED_Display_Field(U32 field, U32 leds)
|
||||
{
|
||||
// Move the bit-field to the appropriate position for the bit-mask.
|
||||
LED_Display_Mask(field, leds << ctz(field));
|
||||
}
|
||||
|
||||
|
||||
U8 LED_Get_Intensity(U32 led)
|
||||
{
|
||||
tLED_DESCRIPTOR *led_descriptor;
|
||||
|
||||
// Check that the argument value is valid.
|
||||
led = ctz(led);
|
||||
led_descriptor = &LED_DESCRIPTOR[led];
|
||||
if (led >= LED_COUNT || led_descriptor->PWM.CHANNEL < 0) return 0;
|
||||
|
||||
// Return the duty cycle value if the LED PWM channel is enabled, else 0.
|
||||
return (AVR32_PWM.sr & (1 << led_descriptor->PWM.CHANNEL)) ?
|
||||
AVR32_PWM.channel[led_descriptor->PWM.CHANNEL].cdty : 0;
|
||||
}
|
||||
|
||||
|
||||
void LED_Set_Intensity(U32 leds, U8 intensity)
|
||||
{
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_pwm_channel_t *led_pwm_channel;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// For each specified LED...
|
||||
for (leds &= (1 << LED_COUNT) - 1; leds; leds >>= led_shift)
|
||||
{
|
||||
// Select the next specified LED and check that it has a PWM channel.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
if (led_descriptor->PWM.CHANNEL < 0) continue;
|
||||
|
||||
// Initialize or update the LED PWM channel.
|
||||
led_pwm_channel = &AVR32_PWM.channel[led_descriptor->PWM.CHANNEL];
|
||||
if (!(AVR32_PWM.sr & (1 << led_descriptor->PWM.CHANNEL)))
|
||||
{
|
||||
led_pwm_channel->cmr = (AVR32_PWM_CPRE_MCK << AVR32_PWM_CPRE_OFFSET) &
|
||||
~(AVR32_PWM_CALG_MASK |
|
||||
AVR32_PWM_CPOL_MASK |
|
||||
AVR32_PWM_CPD_MASK);
|
||||
led_pwm_channel->cprd = 0x000000FF;
|
||||
led_pwm_channel->cdty = intensity;
|
||||
AVR32_PWM.ena = 1 << led_descriptor->PWM.CHANNEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
AVR32_PWM.isr;
|
||||
while (!(AVR32_PWM.isr & (1 << led_descriptor->PWM.CHANNEL)));
|
||||
led_pwm_channel->cupd = intensity;
|
||||
}
|
||||
|
||||
// Switch the LED pin to its PWM function.
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
if (led_descriptor->PWM.FUNCTION & 0x1)
|
||||
{
|
||||
led_gpio_port->pmr0s = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->pmr0c = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
if (led_descriptor->PWM.FUNCTION & 0x2)
|
||||
{
|
||||
led_gpio_port->pmr1s = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->pmr1c = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
led_gpio_port->gperc = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AT32UC3A EVK1100 board LEDs support package.
|
||||
*
|
||||
* This file contains definitions and services related to the LED features of
|
||||
* the EVK1100 board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 AT32UC3A devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LED_H_
|
||||
#define _LED_H_
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
|
||||
/*! \name Identifiers of LEDs to Use with LED Functions
|
||||
*/
|
||||
//! @{
|
||||
#define LED0 0x01
|
||||
#define LED1 0x02
|
||||
#define LED2 0x04
|
||||
#define LED3 0x08
|
||||
#define LED4 0x10
|
||||
#define LED5 0x20
|
||||
#define LED6 0x40
|
||||
#define LED7 0x80
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \brief Gets the last state of all LEDs set through the LED API.
|
||||
*
|
||||
* \return State of all LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U32 LED_Read_Display(void);
|
||||
|
||||
/*! \brief Sets the state of all LEDs.
|
||||
*
|
||||
* \param leds New state of all LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The pins of all LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Display(U32 leds);
|
||||
|
||||
/*! \brief Gets the last state of the specified LEDs set through the LED API.
|
||||
*
|
||||
* \param mask LEDs of which to get the state (1 bit per LED).
|
||||
*
|
||||
* \return State of the specified LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U32 LED_Read_Display_Mask(U32 mask);
|
||||
|
||||
/*! \brief Sets the state of the specified LEDs.
|
||||
*
|
||||
* \param mask LEDs of which to set the state (1 bit per LED).
|
||||
*
|
||||
* \param leds New state of the specified LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Display_Mask(U32 mask, U32 leds);
|
||||
|
||||
/*! \brief Tests the last state of the specified LEDs set through the LED API.
|
||||
*
|
||||
* \param leds LEDs of which to test the state (1 bit per LED).
|
||||
*
|
||||
* \return \c TRUE if at least one of the specified LEDs has a state on, else
|
||||
* \c FALSE.
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern Bool LED_Test(U32 leds);
|
||||
|
||||
/*! \brief Turns off the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs to turn off (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Off(U32 leds);
|
||||
|
||||
/*! \brief Turns on the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs to turn on (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_On(U32 leds);
|
||||
|
||||
/*! \brief Toggles the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs to toggle (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Toggle(U32 leds);
|
||||
|
||||
/*! \brief Gets as a bit-field the last state of the specified LEDs set through
|
||||
* the LED API.
|
||||
*
|
||||
* \param field LEDs of which to get the state (1 bit per LED).
|
||||
*
|
||||
* \return State of the specified LEDs (1 bit per LED, beginning with the first
|
||||
* specified LED).
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U32 LED_Read_Display_Field(U32 field);
|
||||
|
||||
/*! \brief Sets as a bit-field the state of the specified LEDs.
|
||||
*
|
||||
* \param field LEDs of which to set the state (1 bit per LED).
|
||||
* \param leds New state of the specified LEDs (1 bit per LED, beginning with
|
||||
* the first specified LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Display_Field(U32 field, U32 leds);
|
||||
|
||||
/*! \brief Gets the intensity of the specified LED.
|
||||
*
|
||||
* \param led LED of which to get the intensity (1 bit per LED; only the least
|
||||
* significant set bit is used).
|
||||
*
|
||||
* \return Intensity of the specified LED (0x00 to 0xFF).
|
||||
*
|
||||
* \warning The PWM channel of the specified LED is supposed to be used only by
|
||||
* this module.
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U8 LED_Get_Intensity(U32 led);
|
||||
|
||||
/*! \brief Sets the intensity of the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs of which to set the intensity (1 bit per LED).
|
||||
* \param intensity New intensity of the specified LEDs (0x00 to 0xFF).
|
||||
*
|
||||
* \warning The PWM channels of the specified LEDs are supposed to be used only
|
||||
* by this module.
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to PWM output mode.
|
||||
*/
|
||||
extern void LED_Set_Intensity(U32 leds, U8 intensity);
|
||||
|
||||
|
||||
#endif // _LED_H_
|
@ -0,0 +1,433 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AT32UC3A EVK1105 board header file.
|
||||
*
|
||||
* This file contains definitions and services related to the features of the
|
||||
* EVK1105 board rev. B.
|
||||
*
|
||||
* To use this board, define BOARD=EVK1105.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 AT32UC3A devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _EVK1105_H_
|
||||
#define _EVK1105_H_
|
||||
|
||||
#ifdef EVK1105_REV3
|
||||
# include "evk1105_rev3.h"
|
||||
#else
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
|
||||
# include "led.h"
|
||||
#endif // __AVR32_ABI_COMPILER__
|
||||
|
||||
|
||||
/*! \name Oscillator Definitions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
// RCOsc has no custom calibration by default. Set the following definition to
|
||||
// the appropriate value if a custom RCOsc calibration has been applied to your
|
||||
// part.
|
||||
//#define FRCOSC AVR32_PM_RCOSC_FREQUENCY //!< RCOsc frequency: Hz.
|
||||
|
||||
#define FOSC32 32768 //!< Osc32 frequency: Hz.
|
||||
#define OSC32_STARTUP AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC //!< Osc32 startup time: RCOsc periods.
|
||||
|
||||
#define FOSC0 12000000 //!< Osc0 frequency: Hz.
|
||||
#define OSC0_STARTUP AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC //!< Osc0 startup time: RCOsc periods.
|
||||
|
||||
#define FOSC1 11289600 //!< Osc1 frequency: Hz
|
||||
#define OSC1_STARTUP AVR32_PM_OSCCTRL1_STARTUP_2048_RCOSC //!< Osc1 startup time: RCOsc periods.
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name SDRAM Definitions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
//! Part header file of used SDRAM(s).
|
||||
#define SDRAM_PART_HDR "MT48LC16M16A2TG7E/mt48lc16m16a2tg7e.h"
|
||||
|
||||
//! Data bus width to use the SDRAM(s) with (16 or 32 bits; always 16 bits on
|
||||
//! UC3).
|
||||
#define SDRAM_DBW 16
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name USB Definitions
|
||||
*/
|
||||
//! @{
|
||||
//! Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x.
|
||||
//! To be selected according to the AVR32_USBB_USB_ID_x_x_PIN and
|
||||
//! AVR32_USBB_USB_ID_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.
|
||||
#define AVR32_USBB_USB_ID_0_2_PIN 21
|
||||
#define AVR32_USBB_USB_ID_0_2_FUNCTION 2
|
||||
#define USB_ID AVR32_USBB_USB_ID_0_2
|
||||
|
||||
//! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.
|
||||
//! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and
|
||||
//! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.
|
||||
# define USB_VBOF AVR32_USBB_USB_VBOF_0_1
|
||||
|
||||
|
||||
//! Active level of the USB_VBOF output pin.
|
||||
# define USB_VBOF_ACTIVE_LEVEL LOW
|
||||
|
||||
//! USB overcurrent detection pin.
|
||||
# define USB_OVERCURRENT_DETECT_PIN AVR32_PIN_PX15
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
//! GPIO connection of the MAC PHY PWR_DOWN/INT signal.
|
||||
# define MACB_INTERRUPT_PIN AVR32_PIN_PA26
|
||||
|
||||
|
||||
|
||||
//! Number of LEDs.
|
||||
#define LED_COUNT 4
|
||||
|
||||
/*! \name GPIO Connections of LEDs
|
||||
*/
|
||||
//! @{
|
||||
# define LED0_GPIO AVR32_PIN_PB27
|
||||
# define LED1_GPIO AVR32_PIN_PB28
|
||||
# define LED2_GPIO AVR32_PIN_PA05
|
||||
# define LED3_GPIO AVR32_PIN_PA06
|
||||
//! @}
|
||||
|
||||
/*! \name Color Identifiers of LEDs to Use with LED Functions
|
||||
*/
|
||||
//! @{
|
||||
#define LED_MONO0_GREEN LED0
|
||||
#define LED_MONO1_GREEN LED1
|
||||
#define LED_MONO2_GREEN LED2
|
||||
#define LED_MONO3_GREEN LED3
|
||||
//! @}
|
||||
|
||||
/*! \name PWM Channels of LEDs
|
||||
*/
|
||||
//! @{
|
||||
#define LED0_PWM 4
|
||||
#define LED1_PWM 5
|
||||
#define LED2_PWM (-1)
|
||||
#define LED3_PWM (-1)
|
||||
//! @}
|
||||
|
||||
/*! \name PWM Functions of LEDs
|
||||
*/
|
||||
//! @{
|
||||
/* TODO: Implement PWM functionality */
|
||||
#define LED0_PWM_FUNCTION (-1)//AVR32_PWM_0_FUNCTION
|
||||
#define LED1_PWM_FUNCTION (-1)//AVR32_PWM_1_FUNCTION
|
||||
#define LED2_PWM_FUNCTION (-1)
|
||||
#define LED3_PWM_FUNCTION (-1)
|
||||
//! @}
|
||||
|
||||
//! External interrupt connection of touch sensor.
|
||||
#define QT1081_EIC_EXTINT_PIN AVR32_EIC_EXTINT_1_PIN
|
||||
#define QT1081_EIC_EXTINT_FUNCTION AVR32_EIC_EXTINT_1_FUNCTION
|
||||
#define QT1081_EIC_EXTINT_IRQ AVR32_EIC_IRQ_1
|
||||
#define QT1081_EIC_EXTINT_INT AVR32_EIC_INT1
|
||||
/*! \name Touch sensor low power mode select
|
||||
*/
|
||||
#define QT1081_LP_MODE AVR32_PIN_PB29
|
||||
|
||||
/*! \name GPIO Connections of touch buttons
|
||||
*/
|
||||
//! @{
|
||||
#define QT1081_TOUCH_SENSOR_0 AVR32_PIN_PB22
|
||||
#define QT1081_TOUCH_SENSOR_0_PRESSED 1
|
||||
#define QT1081_TOUCH_SENSOR_1 AVR32_PIN_PB23
|
||||
#define QT1081_TOUCH_SENSOR_1_PRESSED 1
|
||||
#define QT1081_TOUCH_SENSOR_2 AVR32_PIN_PB24
|
||||
#define QT1081_TOUCH_SENSOR_2_PRESSED 1
|
||||
#define QT1081_TOUCH_SENSOR_3 AVR32_PIN_PB25
|
||||
#define QT1081_TOUCH_SENSOR_3_PRESSED 1
|
||||
#define QT1081_TOUCH_SENSOR_4 AVR32_PIN_PB26
|
||||
#define QT1081_TOUCH_SENSOR_4_PRESSED 1
|
||||
|
||||
#define QT1081_TOUCH_SENSOR_ENTER QT1081_TOUCH_SENSOR_4
|
||||
#define QT1081_TOUCH_SENSOR_ENTER_PRESSED QT1081_TOUCH_SENSOR_4_PRESSED
|
||||
#define QT1081_TOUCH_SENSOR_LEFT QT1081_TOUCH_SENSOR_3
|
||||
#define QT1081_TOUCH_SENSOR_LEFT_PRESSED QT1081_TOUCH_SENSOR_3_PRESSED
|
||||
#define QT1081_TOUCH_SENSOR_RIGHT QT1081_TOUCH_SENSOR_2
|
||||
#define QT1081_TOUCH_SENSOR_RIGHT_PRESSED QT1081_TOUCH_SENSOR_2_PRESSED
|
||||
#define QT1081_TOUCH_SENSOR_UP QT1081_TOUCH_SENSOR_0
|
||||
#define QT1081_TOUCH_SENSOR_UP_PRESSED QT1081_TOUCH_SENSOR_0_PRESSED
|
||||
#define QT1081_TOUCH_SENSOR_DOWN QT1081_TOUCH_SENSOR_1
|
||||
#define QT1081_TOUCH_SENSOR_DOWN_PRESSED QT1081_TOUCH_SENSOR_1_PRESSED
|
||||
//! @}
|
||||
|
||||
/*! \name SPI Connections of the AT45DBX Data Flash Memory
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_SPI (&AVR32_SPI0)
|
||||
#define AT45DBX_SPI_NPCS 0
|
||||
#define AT45DBX_SPI_SCK_PIN AVR32_SPI0_SCK_0_0_PIN
|
||||
#define AT45DBX_SPI_SCK_FUNCTION AVR32_SPI0_SCK_0_0_FUNCTION
|
||||
#define AT45DBX_SPI_MISO_PIN AVR32_SPI0_MISO_0_0_PIN
|
||||
#define AT45DBX_SPI_MISO_FUNCTION AVR32_SPI0_MISO_0_0_FUNCTION
|
||||
#define AT45DBX_SPI_MOSI_PIN AVR32_SPI0_MOSI_0_0_PIN
|
||||
#define AT45DBX_SPI_MOSI_FUNCTION AVR32_SPI0_MOSI_0_0_FUNCTION
|
||||
#define AT45DBX_SPI_NPCS0_PIN AVR32_SPI0_NPCS_0_0_PIN
|
||||
#define AT45DBX_SPI_NPCS0_FUNCTION AVR32_SPI0_NPCS_0_0_FUNCTION
|
||||
//! @}
|
||||
|
||||
/*! \name GPIO and SPI Connections of the SD/MMC Connector
|
||||
*/
|
||||
//! @{
|
||||
#define SD_MMC_CARD_DETECT_PIN AVR32_PIN_PA02
|
||||
#define SD_MMC_WRITE_PROTECT_PIN AVR32_PIN_PA18
|
||||
#define SD_MMC_SPI (&AVR32_SPI0)
|
||||
#define SD_MMC_SPI_NPCS 1
|
||||
#define SD_MMC_SPI_SCK_PIN AVR32_SPI0_SCK_0_0_PIN
|
||||
#define SD_MMC_SPI_SCK_FUNCTION AVR32_SPI0_SCK_0_0_FUNCTION
|
||||
#define SD_MMC_SPI_MISO_PIN AVR32_SPI0_MISO_0_0_PIN
|
||||
#define SD_MMC_SPI_MISO_FUNCTION AVR32_SPI0_MISO_0_0_FUNCTION
|
||||
#define SD_MMC_SPI_MOSI_PIN AVR32_SPI0_MOSI_0_0_PIN
|
||||
#define SD_MMC_SPI_MOSI_FUNCTION AVR32_SPI0_MOSI_0_0_FUNCTION
|
||||
#define SD_MMC_SPI_NPCS_PIN AVR32_SPI0_NPCS_1_0_PIN
|
||||
#define SD_MMC_SPI_NPCS_FUNCTION AVR32_SPI0_NPCS_1_0_FUNCTION
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name TWI expansion
|
||||
*/
|
||||
//! @{
|
||||
#define EXPANSION_TWI (&AVR32_TWI)
|
||||
#define EXPANSION_RESET AVR32_PIN_PX16
|
||||
#define EXPANSION_TWI_SCL_PIN AVR32_TWI_SCL_0_0_PIN
|
||||
#define EXPANSION_TWI_SCL_FUNCTION AVR32_TWI_SCL_0_0_FUNCTION
|
||||
#define EXPANSION_TWI_SDA_PIN AVR32_TWI_SDA_0_0_PIN
|
||||
#define EXPANSION_TWI_SDA_FUNCTION AVR32_TWI_SDA_0_0_FUNCTION
|
||||
//! @}
|
||||
|
||||
/*! \name Wireless expansion
|
||||
*/
|
||||
|
||||
#define WEXPANSION_EXTINT_PIN AVR32_EIC_EXTINT_8_PIN
|
||||
#define WEXPANSION_EXTINT_FUNCTION AVR32_EIC_EXTINT_8_FUNCTION
|
||||
#define WEXPANSION_GPIO1 AVR32_PIN_PB30
|
||||
#define WEXPANSION_GPIO2 AVR32_PIN_PB31
|
||||
|
||||
#define WEXPANSION_SPI (&AVR32_SPI0)
|
||||
#define WEXPANSION_SPI_NPCS 2
|
||||
#define WEXPANSION_SPI_SCK_PIN AVR32_SPI0_SCK_0_0_PIN
|
||||
#define WEXPANSION_SPI_SCK_FUNCTION AVR32_SPI0_SCK_0_0_FUNCTION
|
||||
#define WEXPANSION_SPI_MISO_PIN AVR32_SPI0_MISO_0_0_PIN
|
||||
#define WEXPANSION_SPI_MISO_FUNCTION AVR32_SPI0_MISO_0_0_FUNCTION
|
||||
#define WEXPANSION_SPI_MOSI_PIN AVR32_SPI0_MOSI_0_0_PIN
|
||||
#define WEXPANSION_SPI_MOSI_FUNCTION AVR32_SPI0_MOSI_0_0_FUNCTION
|
||||
#define WEXPANSION_SPI_NPCS_PIN AVR32_SPI0_NPCS_2_0_PIN
|
||||
#define WEXPANSION_SPI_NPCS_FUNCTION AVR32_SPI0_NPCS_2_0_FUNCTION
|
||||
|
||||
//! @}
|
||||
|
||||
/*! \name ET024006DHU TFT display
|
||||
*/
|
||||
//! @{
|
||||
|
||||
#define ET024006DHU_TE_PIN AVR32_PIN_PX19
|
||||
#define ET024006DHU_RESET_PIN AVR32_PIN_PX22
|
||||
#define ET024006DHU_BL_PIN AVR32_PWM_6_PIN
|
||||
#define ET024006DHU_BL_FUNCTION AVR32_PWM_6_FUNCTION
|
||||
#define ET024006DHU_DNC_PIN AVR32_EBI_ADDR_21_1_PIN
|
||||
#define ET024006DHU_DNC_FUNCTION AVR32_EBI_ADDR_21_1_FUNCTION
|
||||
#define ET024006DHU_EBI_NCS_PIN AVR32_EBI_NCS_0_1_PIN
|
||||
#define ET024006DHU_EBI_NCS_FUNCTION AVR32_EBI_NCS_0_1_FUNCTION
|
||||
|
||||
//! @}
|
||||
/*! \name Optional SPI connection to the TFT
|
||||
*/
|
||||
//! @{
|
||||
|
||||
#define ET024006DHU_SPI (&AVR32_SPI0)
|
||||
#define ET024006DHU_SPI_NPCS 3
|
||||
#define ET024006DHU_SPI_SCK_PIN AVR32_SPI0_SCK_0_0_PIN
|
||||
#define ET024006DHU_SPI_SCK_FUNCTION AVR32_SPI0_SCK_0_0_FUNCTION
|
||||
#define ET024006DHU_SPI_MISO_PIN AVR32_SPI0_MISO_0_0_PIN
|
||||
#define ET024006DHU_SPI_MISO_FUNCTION AVR32_SPI0_MISO_0_0_FUNCTION
|
||||
#define ET024006DHU_SPI_MOSI_PIN AVR32_SPI0_MOSI_0_0_PIN
|
||||
#define ET024006DHU_SPI_MOSI_FUNCTION AVR32_SPI0_MOSI_0_0_FUNCTION
|
||||
#define ET024006DHU_SPI_NPCS_PIN AVR32_SPI1_NPCS_3_0_PIN
|
||||
#define ET024006DHU_SPI_NPCS_FUNCTION AVR32_SPI1_NPCS_3_0_FUNCTION
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Audio amplifier connection to the DAC
|
||||
*/
|
||||
//! @{
|
||||
|
||||
#define TPA6130_ABDAC (&AVR32_ABDAC)
|
||||
|
||||
#define TPA6130_DATA0_PIN AVR32_ABDAC_DATA_0_1_PIN
|
||||
#define TPA6130_DATA0_FUNCTION AVR32_ABDAC_DATA_0_1_FUNCTION
|
||||
#define TPA6130_DATAN0_PIN AVR32_ABDAC_DATAN_0_1_PIN
|
||||
#define TPA6130_DATAN0_FUNCTION AVR32_ABDAC_DATAN_0_1_FUNCTION
|
||||
#define TPA6130_DATA1_PIN AVR32_ABDAC_DATA_1_1_PIN
|
||||
#define TPA6130_DATA1_FUNCTION AVR32_ABDAC_DATA_1_1_FUNCTION
|
||||
#define TPA6130_DATAN1_PIN AVR32_ABDAC_DATAN_1_1_PIN
|
||||
#define TPA6130_DATAN1_FUNCTION AVR32_ABDAC_DATAN_1_1_FUNCTION
|
||||
|
||||
#define TPA6130_ABDAC_PDCA_PID AVR32_PDCA_PID_ABDAC_TX
|
||||
#define TPA6130_ABDAC_PDCA_CHANNEL 0
|
||||
#define TPA6130_ABDAC_PDCA_IRQ AVR32_PDCA_IRQ_0
|
||||
#define TPA6130_ABDAC_PDCA_INT_LEVEL AVR32_INTC_INT3
|
||||
|
||||
#define TPA6130_TWI (&AVR32_TWI)
|
||||
#define TPA6130_TWI_SCL_PIN AVR32_TWI_SCL_0_0_PIN
|
||||
#define TPA6130_TWI_SCL_FUNCTION AVR32_TWI_SCL_0_0_FUNCTION
|
||||
#define TPA6130_TWI_SDA_PIN AVR32_TWI_SDA_0_0_PIN
|
||||
#define TPA6130_TWI_SDA_FUNCTION AVR32_TWI_SDA_0_0_FUNCTION
|
||||
|
||||
//! }@
|
||||
/*! \name TI TLV320AIC23B sound chip
|
||||
*/
|
||||
//! @{
|
||||
#define TLV320_SSC (&AVR32_SSC)
|
||||
#define TLV320_SSC_TX_CLOCK_PIN AVR32_SSC_TX_CLOCK_0_PIN
|
||||
#define TLV320_SSC_TX_CLOCK_FUNCTION AVR32_SSC_TX_CLOCK_0_FUNCTION
|
||||
#define TLV320_SSC_TX_DATA_PIN AVR32_SSC_TX_DATA_0_PIN
|
||||
#define TLV320_SSC_TX_DATA_FUNCTION AVR32_SSC_TX_DATA_0_FUNCTION
|
||||
#define TLV320_SSC_TX_FRAME_SYNC_PIN AVR32_SSC_TX_FRAME_SYNC_0_PIN
|
||||
#define TLV320_SSC_TX_FRAME_SYNC_FUNCTION AVR32_SSC_TX_FRAME_SYNC_0_FUNCTION
|
||||
|
||||
#define TLV320_TWI (&AVR32_TWI)
|
||||
#define TLV320_TWI_SCL_PIN AVR32_TWI_SCL_0_0_PIN
|
||||
#define TLV320_TWI_SCL_FUNCTION AVR32_TWI_SCL_0_0_FUNCTION
|
||||
#define TLV320_TWI_SDA_PIN AVR32_TWI_SDA_0_0_PIN
|
||||
#define TLV320_TWI_SDA_FUNCTION AVR32_TWI_SDA_0_0_FUNCTION
|
||||
|
||||
#define TLV320_PM_GCLK_PIN AVR32_PM_GCLK_0_0_PIN
|
||||
#define TLV320_PM_GCLK_FUNCTION AVR32_PM_GCLK_0_0_FUNCTION
|
||||
//! @}
|
||||
|
||||
////! \name SPI: Apple Authentication Chip Hardware Connections
|
||||
////! @{
|
||||
#define IPOD_AUTH_CHIP_SPI (&AVR32_SPI0)
|
||||
#define IPOD_AUTH_CHIP_SPI_IRQ AVR32_SPI0_IRQ
|
||||
#define IPOD_AUTH_CHIP_SPI_NPCS 2
|
||||
#define IPOD_AUTH_CHIP_SPI_SCK_PIN AVR32_SPI0_SCK_0_0_PIN
|
||||
#define IPOD_AUTH_CHIP_SPI_SCK_FUNCTION AVR32_SPI0_SCK_0_0_FUNCTION
|
||||
#define IPOD_AUTH_CHIP_SPI_MISO_PIN AVR32_SPI0_MISO_0_0_PIN
|
||||
#define IPOD_AUTH_CHIP_SPI_MISO_FUNCTION AVR32_SPI0_MISO_0_0_FUNCTION
|
||||
#define IPOD_AUTH_CHIP_SPI_MOSI_PIN AVR32_SPI0_MOSI_0_0_PIN
|
||||
#define IPOD_AUTH_CHIP_SPI_MOSI_FUNCTION AVR32_SPI0_MOSI_0_0_FUNCTION
|
||||
#define IPOD_AUTH_CHIP_SPI_NPCS_PIN AVR32_SPI0_NPCS_2_0_PIN
|
||||
#define IPOD_AUTH_CHIP_SPI_NPCS_FUNCTION AVR32_SPI0_NPCS_2_0_FUNCTION
|
||||
#define IPOD_AUTH_CHIP_SPI_N_RESET_PIN AVR32_PIN_PB30
|
||||
#define IPOD_AUTH_CHIP_SPI_CP_READY_PIN AVR32_PIN_PB31
|
||||
//! }@
|
||||
|
||||
/*! \name Connections of the iPOD Authentication Coprocessor
|
||||
*/
|
||||
//! @{
|
||||
|
||||
#define IPOD_AUTH_CHIP_TWI (&AVR32_TWI)
|
||||
#define IPOD_AUTH_CHIP_TWI_SCL_PIN AVR32_TWI_SCL_0_0_PIN
|
||||
#define IPOD_AUTH_CHIP_TWI_SCL_FUNCTION AVR32_TWI_SCL_0_0_FUNCTION
|
||||
#define IPOD_AUTH_CHIP_TWI_SDA_PIN AVR32_TWI_SDA_0_0_PIN
|
||||
#define IPOD_AUTH_CHIP_TWI_SDA_FUNCTION AVR32_TWI_SDA_0_0_FUNCTION
|
||||
#define IPOD_AUTH_CHIP_TWI_N_RESET_PIN AVR32_PIN_PX16
|
||||
|
||||
//! @}
|
||||
|
||||
/*! \name USART connection to the UC3B board controller
|
||||
*/
|
||||
//! @{
|
||||
|
||||
#define USART0_RXD_PIN AVR32_USART0_RXD_0_0_PIN
|
||||
#define USART0_RXD_FUNCTION AVR32_USART0_RXD_0_0_FUNCTION
|
||||
#define USART0_TXD_PIN AVR32_USART0_TXD_0_0_PIN
|
||||
#define USART0_TXD_FUNCTION AVR32_USART0_TXD_0_0_FUNCTION
|
||||
#define USART0_RTS_PIN AVR32_USART0_RTS_0_0_PIN
|
||||
#define USART0_RTS_FUNCTION AVR32_USART0_RTS_0_0_FUNCTION
|
||||
#define USART0_CTS_PIN AVR32_USART0_CTS_0_0_PIN
|
||||
#define USART0_CTS_FUNCTION AVR32_USART0_CTS_0_0_FUNCTION
|
||||
|
||||
//! @}
|
||||
|
||||
#define ADC_VEXT_PIN AVR32_ADC_AD_7_PIN
|
||||
#define ADC_VEXT_FUNCTION AVR32_ADC_AD_7_FUNCTION
|
||||
|
||||
/*! \name LCD Connections of the ET024006DHU display
|
||||
*/
|
||||
//! @{
|
||||
#define ET024006DHU_SMC_USE_NCS 0
|
||||
#define ET024006DHU_SMC_COMPONENT_CS "smc_et024006dhu.h"
|
||||
|
||||
#define ET024006DHU_EBI_DATA_0 AVR32_EBI_DATA_0
|
||||
#define ET024006DHU_EBI_DATA_1 AVR32_EBI_DATA_1
|
||||
#define ET024006DHU_EBI_DATA_2 AVR32_EBI_DATA_2
|
||||
#define ET024006DHU_EBI_DATA_3 AVR32_EBI_DATA_3
|
||||
#define ET024006DHU_EBI_DATA_4 AVR32_EBI_DATA_4
|
||||
#define ET024006DHU_EBI_DATA_5 AVR32_EBI_DATA_5
|
||||
#define ET024006DHU_EBI_DATA_6 AVR32_EBI_DATA_6
|
||||
#define ET024006DHU_EBI_DATA_7 AVR32_EBI_DATA_7
|
||||
#define ET024006DHU_EBI_DATA_8 AVR32_EBI_DATA_8
|
||||
#define ET024006DHU_EBI_DATA_9 AVR32_EBI_DATA_9
|
||||
#define ET024006DHU_EBI_DATA_10 AVR32_EBI_DATA_10
|
||||
#define ET024006DHU_EBI_DATA_11 AVR32_EBI_DATA_11
|
||||
#define ET024006DHU_EBI_DATA_12 AVR32_EBI_DATA_12
|
||||
#define ET024006DHU_EBI_DATA_13 AVR32_EBI_DATA_13
|
||||
#define ET024006DHU_EBI_DATA_14 AVR32_EBI_DATA_14
|
||||
#define ET024006DHU_EBI_DATA_15 AVR32_EBI_DATA_15
|
||||
|
||||
#define ET024006DHU_EBI_ADDR_21 AVR32_EBI_ADDR_21_1
|
||||
|
||||
#define ET024006DHU_EBI_NWE AVR32_EBI_NWE0_0
|
||||
#define ET024006DHU_EBI_NRD AVR32_EBI_NRD_0
|
||||
#define ET024006DHU_EBI_NCS AVR32_EBI_NCS_0_1
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // !EVK1105_REVA
|
||||
|
||||
#endif // _EVK1105_H_
|
@ -0,0 +1,346 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AT32UC3A EVK1105 board LEDs support package.
|
||||
*
|
||||
* This file contains definitions and services related to the LED features of
|
||||
* the EVK1105 board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 AT32UC3A devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include "preprocessor.h"
|
||||
#include "compiler.h"
|
||||
#include "evk1105.h"
|
||||
#include "led.h"
|
||||
|
||||
|
||||
//! Structure describing LED hardware connections.
|
||||
typedef const struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
U32 PORT; //!< LED GPIO port.
|
||||
U32 PIN_MASK; //!< Bit-mask of LED pin in GPIO port.
|
||||
} GPIO; //!< LED GPIO descriptor.
|
||||
struct
|
||||
{
|
||||
S32 CHANNEL; //!< LED PWM channel (< 0 if N/A).
|
||||
S32 FUNCTION; //!< LED pin PWM function (< 0 if N/A).
|
||||
} PWM; //!< LED PWM descriptor.
|
||||
} tLED_DESCRIPTOR;
|
||||
|
||||
|
||||
//! Hardware descriptors of all LEDs.
|
||||
static tLED_DESCRIPTOR LED_DESCRIPTOR[LED_COUNT] =
|
||||
{
|
||||
#define INSERT_LED_DESCRIPTOR(LED_NO, unused) \
|
||||
{ \
|
||||
{LED##LED_NO##_GPIO / 32, 1 << (LED##LED_NO##_GPIO % 32)},\
|
||||
{LED##LED_NO##_PWM, LED##LED_NO##_PWM_FUNCTION } \
|
||||
},
|
||||
MREPEAT(LED_COUNT, INSERT_LED_DESCRIPTOR, ~)
|
||||
#undef INSERT_LED_DESCRIPTOR
|
||||
};
|
||||
|
||||
|
||||
//! Saved state of all LEDs.
|
||||
static volatile U32 LED_State = (1 << LED_COUNT) - 1;
|
||||
|
||||
|
||||
U32 LED_Read_Display(void)
|
||||
{
|
||||
return LED_State;
|
||||
}
|
||||
|
||||
|
||||
void LED_Display(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
LED_State = leds;
|
||||
|
||||
// For all LEDs...
|
||||
for (led_descriptor = &LED_DESCRIPTOR[0];
|
||||
led_descriptor < LED_DESCRIPTOR + LED_COUNT;
|
||||
led_descriptor++)
|
||||
{
|
||||
// Set the LED to the requested state.
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
if (leds & 1)
|
||||
{
|
||||
led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
U32 LED_Read_Display_Mask(U32 mask)
|
||||
{
|
||||
return Rd_bits(LED_State, mask);
|
||||
}
|
||||
|
||||
|
||||
void LED_Display_Mask(U32 mask, U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
mask &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Wr_bits(LED_State, mask, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (mask)
|
||||
{
|
||||
// Select the next specified LED and set it to the requested state.
|
||||
led_shift = 1 + ctz(mask);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
leds >>= led_shift - 1;
|
||||
if (leds & 1)
|
||||
{
|
||||
led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= 1;
|
||||
mask >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bool LED_Test(U32 leds)
|
||||
{
|
||||
return Tst_bits(LED_State, leds);
|
||||
}
|
||||
|
||||
|
||||
void LED_Off(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Clr_bits(LED_State, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (leds)
|
||||
{
|
||||
// Select the next specified LED and turn it off.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LED_On(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Set_bits(LED_State, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (leds)
|
||||
{
|
||||
// Select the next specified LED and turn it on.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LED_Toggle(U32 leds)
|
||||
{
|
||||
// Use the LED descriptors to get the connections of a given LED to the MCU.
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// Make sure only existing LEDs are specified.
|
||||
leds &= (1 << LED_COUNT) - 1;
|
||||
|
||||
// Update the saved state of all LEDs with the requested changes.
|
||||
Tgl_bits(LED_State, leds);
|
||||
|
||||
// While there are specified LEDs left to manage...
|
||||
while (leds)
|
||||
{
|
||||
// Select the next specified LED and toggle it.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
led_gpio_port->ovrt = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
|
||||
led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
|
||||
leds >>= led_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
U32 LED_Read_Display_Field(U32 field)
|
||||
{
|
||||
return Rd_bitfield(LED_State, field);
|
||||
}
|
||||
|
||||
|
||||
void LED_Display_Field(U32 field, U32 leds)
|
||||
{
|
||||
// Move the bit-field to the appropriate position for the bit-mask.
|
||||
LED_Display_Mask(field, leds << ctz(field));
|
||||
}
|
||||
|
||||
|
||||
U8 LED_Get_Intensity(U32 led)
|
||||
{
|
||||
tLED_DESCRIPTOR *led_descriptor;
|
||||
|
||||
// Check that the argument value is valid.
|
||||
led = ctz(led);
|
||||
led_descriptor = &LED_DESCRIPTOR[led];
|
||||
if (led >= LED_COUNT || led_descriptor->PWM.CHANNEL < 0) return 0;
|
||||
|
||||
// Return the duty cycle value if the LED PWM channel is enabled, else 0.
|
||||
return (AVR32_PWM.sr & (1 << led_descriptor->PWM.CHANNEL)) ?
|
||||
AVR32_PWM.channel[led_descriptor->PWM.CHANNEL].cdty : 0;
|
||||
}
|
||||
|
||||
|
||||
void LED_Set_Intensity(U32 leds, U8 intensity)
|
||||
{
|
||||
tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
|
||||
volatile avr32_pwm_channel_t *led_pwm_channel;
|
||||
volatile avr32_gpio_port_t *led_gpio_port;
|
||||
U8 led_shift;
|
||||
|
||||
// For each specified LED...
|
||||
for (leds &= (1 << LED_COUNT) - 1; leds; leds >>= led_shift)
|
||||
{
|
||||
// Select the next specified LED and check that it has a PWM channel.
|
||||
led_shift = 1 + ctz(leds);
|
||||
led_descriptor += led_shift;
|
||||
if (led_descriptor->PWM.CHANNEL < 0) continue;
|
||||
|
||||
// Initialize or update the LED PWM channel.
|
||||
led_pwm_channel = &AVR32_PWM.channel[led_descriptor->PWM.CHANNEL];
|
||||
if (!(AVR32_PWM.sr & (1 << led_descriptor->PWM.CHANNEL)))
|
||||
{
|
||||
led_pwm_channel->cmr = (AVR32_PWM_CPRE_MCK << AVR32_PWM_CPRE_OFFSET) &
|
||||
~(AVR32_PWM_CALG_MASK |
|
||||
AVR32_PWM_CPOL_MASK |
|
||||
AVR32_PWM_CPD_MASK);
|
||||
led_pwm_channel->cprd = 0x000000FF;
|
||||
led_pwm_channel->cdty = intensity;
|
||||
AVR32_PWM.ena = 1 << led_descriptor->PWM.CHANNEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
AVR32_PWM.isr;
|
||||
while (!(AVR32_PWM.isr & (1 << led_descriptor->PWM.CHANNEL)));
|
||||
led_pwm_channel->cupd = intensity;
|
||||
}
|
||||
|
||||
// Switch the LED pin to its PWM function.
|
||||
led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
|
||||
if (led_descriptor->PWM.FUNCTION & 0x1)
|
||||
{
|
||||
led_gpio_port->pmr0s = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->pmr0c = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
if (led_descriptor->PWM.FUNCTION & 0x2)
|
||||
{
|
||||
led_gpio_port->pmr1s = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
led_gpio_port->pmr1c = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
led_gpio_port->gperc = led_descriptor->GPIO.PIN_MASK;
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief AT32UC3A EVK1105 board LEDs support package.
|
||||
*
|
||||
* This file contains definitions and services related to the LED features of
|
||||
* the EVK1105 board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 AT32UC3A devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LED_H_
|
||||
#define _LED_H_
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
|
||||
/*! \name Identifiers of LEDs to Use with LED Functions
|
||||
*/
|
||||
//! @{
|
||||
#define LED0 0x01
|
||||
#define LED1 0x02
|
||||
#define LED2 0x04
|
||||
#define LED3 0x08
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \brief Gets the last state of all LEDs set through the LED API.
|
||||
*
|
||||
* \return State of all LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U32 LED_Read_Display(void);
|
||||
|
||||
/*! \brief Sets the state of all LEDs.
|
||||
*
|
||||
* \param leds New state of all LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The pins of all LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Display(U32 leds);
|
||||
|
||||
/*! \brief Gets the last state of the specified LEDs set through the LED API.
|
||||
*
|
||||
* \param mask LEDs of which to get the state (1 bit per LED).
|
||||
*
|
||||
* \return State of the specified LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U32 LED_Read_Display_Mask(U32 mask);
|
||||
|
||||
/*! \brief Sets the state of the specified LEDs.
|
||||
*
|
||||
* \param mask LEDs of which to set the state (1 bit per LED).
|
||||
*
|
||||
* \param leds New state of the specified LEDs (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Display_Mask(U32 mask, U32 leds);
|
||||
|
||||
/*! \brief Tests the last state of the specified LEDs set through the LED API.
|
||||
*
|
||||
* \param leds LEDs of which to test the state (1 bit per LED).
|
||||
*
|
||||
* \return \c TRUE if at least one of the specified LEDs has a state on, else
|
||||
* \c FALSE.
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern Bool LED_Test(U32 leds);
|
||||
|
||||
/*! \brief Turns off the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs to turn off (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Off(U32 leds);
|
||||
|
||||
/*! \brief Turns on the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs to turn on (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_On(U32 leds);
|
||||
|
||||
/*! \brief Toggles the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs to toggle (1 bit per LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Toggle(U32 leds);
|
||||
|
||||
/*! \brief Gets as a bit-field the last state of the specified LEDs set through
|
||||
* the LED API.
|
||||
*
|
||||
* \param field LEDs of which to get the state (1 bit per LED).
|
||||
*
|
||||
* \return State of the specified LEDs (1 bit per LED, beginning with the first
|
||||
* specified LED).
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U32 LED_Read_Display_Field(U32 field);
|
||||
|
||||
/*! \brief Sets as a bit-field the state of the specified LEDs.
|
||||
*
|
||||
* \param field LEDs of which to set the state (1 bit per LED).
|
||||
* \param leds New state of the specified LEDs (1 bit per LED, beginning with
|
||||
* the first specified LED).
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to GPIO output mode.
|
||||
*/
|
||||
extern void LED_Display_Field(U32 field, U32 leds);
|
||||
|
||||
/*! \brief Gets the intensity of the specified LED.
|
||||
*
|
||||
* \param led LED of which to get the intensity (1 bit per LED; only the least
|
||||
* significant set bit is used).
|
||||
*
|
||||
* \return Intensity of the specified LED (0x00 to 0xFF).
|
||||
*
|
||||
* \warning The PWM channel of the specified LED is supposed to be used only by
|
||||
* this module.
|
||||
*
|
||||
* \note The GPIO pin configuration of all LEDs is left unchanged.
|
||||
*/
|
||||
extern U8 LED_Get_Intensity(U32 led);
|
||||
|
||||
/*! \brief Sets the intensity of the specified LEDs.
|
||||
*
|
||||
* \param leds LEDs of which to set the intensity (1 bit per LED).
|
||||
* \param intensity New intensity of the specified LEDs (0x00 to 0xFF).
|
||||
*
|
||||
* \warning The PWM channels of the specified LEDs are supposed to be used only
|
||||
* by this module.
|
||||
*
|
||||
* \note The pins of the specified LEDs are set to PWM output mode.
|
||||
*/
|
||||
extern void LED_Set_Intensity(U32 leds, U8 intensity);
|
||||
|
||||
|
||||
#endif // _LED_H_
|
@ -0,0 +1,120 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Standard board header file.
|
||||
*
|
||||
* This file includes the appropriate board header file according to the
|
||||
* defined board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#include <avr32/io.h>
|
||||
|
||||
/*! \name Base Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EVK1100 1 //!< AT32UC3A EVK1100 board.
|
||||
#define EVK1101 2 //!< AT32UC3B EVK1101 board.
|
||||
#define UC3C_EK 3 //!< AT32UC3C UC3C_EK board.
|
||||
#define EVK1104 4 //!< AT32UC3A3 EVK1104 board.
|
||||
#define EVK1105 5 //!< AT32UC3A EVK1105 board.
|
||||
#define STK1000 6 //!< AT32AP7000 STK1000 board.
|
||||
#define NGW100 7 //!< AT32AP7000 NGW100 board.
|
||||
#define STK600_RCUC3L0 8 //!< STK600 RCUC3L0 board.
|
||||
#define UC3L_EK 9 //!< AT32UC3L-EK board.
|
||||
#define USER_BOARD 99 //!< User-reserved board (if any).
|
||||
//! @}
|
||||
|
||||
/*! \name Extension Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EXT1102 1 //!< AT32UC3B EXT1102 board.
|
||||
#define MC300 2 //!< AT32UC3 MC300 board.
|
||||
#define USER_EXT_BOARD 99 //!< User-reserved extension board (if any).
|
||||
//! @}
|
||||
|
||||
#if BOARD == EVK1100
|
||||
#include "EVK1100/evk1100.h"
|
||||
#elif BOARD == EVK1101
|
||||
#include "EVK1101/evk1101.h"
|
||||
#elif BOARD == UC3C_EK
|
||||
#include "UC3C_EK/uc3c_ek.h"
|
||||
#elif BOARD == EVK1104
|
||||
#include "EVK1104/evk1104.h"
|
||||
#elif BOARD == EVK1105
|
||||
#include "EVK1105/evk1105.h"
|
||||
#elif BOARD == STK1000
|
||||
#include "STK1000/stk1000.h"
|
||||
#elif BOARD == NGW100
|
||||
#include "NGW100/ngw100.h"
|
||||
#elif BOARD == STK600_RCUC3L0
|
||||
#include "STK600/RCUC3L0/stk600_rcuc3l0.h"
|
||||
#elif BOARD == UC3L_EK
|
||||
#include "UC3L_EK/uc3l_ek.h"
|
||||
#elif BOARD == ARDUINO
|
||||
#include "ARDUINO/arduino.h"
|
||||
#else
|
||||
#error No known AVR32 board defined
|
||||
#endif
|
||||
|
||||
#if (defined EXT_BOARD)
|
||||
#if EXT_BOARD == EXT1102
|
||||
#include "EXT1102/ext1102.h"
|
||||
#elif EXT_BOARD == MC300
|
||||
#include "MC300/mc300.h"
|
||||
#elif EXT_BOARD == USER_EXT_BOARD
|
||||
// User-reserved area: #include the header file of your extension board here
|
||||
// (if any).
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef FRCOSC
|
||||
#define FRCOSC AVR32_PM_RCOSC_FREQUENCY //!< Default RCOsc frequency.
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _BOARD_H_
|
@ -0,0 +1,120 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Standard board header file.
|
||||
*
|
||||
* This file includes the appropriate board header file according to the
|
||||
* defined board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#include <avr32/io.h>
|
||||
|
||||
/*! \name Base Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EVK1100 1 //!< AT32UC3A EVK1100 board.
|
||||
#define EVK1101 2 //!< AT32UC3B EVK1101 board.
|
||||
#define UC3C_EK 3 //!< AT32UC3C UC3C_EK board.
|
||||
#define EVK1104 4 //!< AT32UC3A3 EVK1104 board.
|
||||
#define EVK1105 5 //!< AT32UC3A EVK1105 board.
|
||||
#define STK1000 6 //!< AT32AP7000 STK1000 board.
|
||||
#define NGW100 7 //!< AT32AP7000 NGW100 board.
|
||||
#define STK600_RCUC3L0 8 //!< STK600 RCUC3L0 board.
|
||||
#define UC3L_EK 9 //!< AT32UC3L-EK board.
|
||||
#define USER_BOARD 99 //!< User-reserved board (if any).
|
||||
//! @}
|
||||
|
||||
/*! \name Extension Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EXT1102 1 //!< AT32UC3B EXT1102 board.
|
||||
#define MC300 2 //!< AT32UC3 MC300 board.
|
||||
#define USER_EXT_BOARD 99 //!< User-reserved extension board (if any).
|
||||
//! @}
|
||||
|
||||
#if BOARD == EVK1100
|
||||
#include "EVK1100/evk1100.h"
|
||||
#elif BOARD == EVK1101
|
||||
#include "EVK1101/evk1101.h"
|
||||
#elif BOARD == UC3C_EK
|
||||
#include "UC3C_EK/uc3c_ek.h"
|
||||
#elif BOARD == EVK1104
|
||||
#include "EVK1104/evk1104.h"
|
||||
#elif BOARD == EVK1105
|
||||
#include "EVK1105/evk1105.h"
|
||||
#elif BOARD == STK1000
|
||||
#include "STK1000/stk1000.h"
|
||||
#elif BOARD == NGW100
|
||||
#include "NGW100/ngw100.h"
|
||||
#elif BOARD == STK600_RCUC3L0
|
||||
#include "STK600/RCUC3L0/stk600_rcuc3l0.h"
|
||||
#elif BOARD == UC3L_EK
|
||||
#include "UC3L_EK/uc3l_ek.h"
|
||||
#elif BOARD == ARDUINO
|
||||
#include "ARDUINO/arduino.h"
|
||||
#else
|
||||
#error No known AVR32 board defined
|
||||
#endif
|
||||
|
||||
#if (defined EXT_BOARD)
|
||||
#if EXT_BOARD == EXT1102
|
||||
#include "EXT1102/ext1102.h"
|
||||
#elif EXT_BOARD == MC300
|
||||
#include "MC300/mc300.h"
|
||||
#elif EXT_BOARD == USER_EXT_BOARD
|
||||
// User-reserved area: #include the header file of your extension board here
|
||||
// (if any).
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef FRCOSC
|
||||
#define FRCOSC AVR32_PM_RCOSC_FREQUENCY //!< Default RCOsc frequency.
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _BOARD_H_
|
@ -0,0 +1,653 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Management of the AT45DBX data flash controller through SPI.
|
||||
*
|
||||
* This file manages the accesses to the AT45DBX data flash components.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an SPI module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
//_____ I N C L U D E S ___________________________________________________
|
||||
|
||||
#include "conf_access.h"
|
||||
|
||||
|
||||
#if AT45DBX_MEM == ENABLE
|
||||
|
||||
#include "compiler.h"
|
||||
#include "board.h"
|
||||
#include "gpio.h"
|
||||
#include "spi.h"
|
||||
#include "conf_at45dbx.h"
|
||||
#include "at45dbx.h"
|
||||
|
||||
|
||||
#if AT45DBX_MEM_CNT > 4
|
||||
#error AT45DBX_MEM_CNT must not exceed 4
|
||||
#endif
|
||||
|
||||
|
||||
//_____ D E F I N I T I O N S ______________________________________________
|
||||
|
||||
/*! \name AT45DBX Group A Commands
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_CMDA_RD_PAGE 0xD2 //!< Main Memory Page Read (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDA_RD_ARRAY_LEG 0xE8 //!< Continuous Array Read, Legacy Command (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDA_RD_ARRAY_LF_SM 0x03 //!< Continuous Array Read, Low-Frequency Mode (Serial Mode).
|
||||
#define AT45DBX_CMDA_RD_ARRAY_AF_SM 0x0B //!< Continuous Array Read, Any-Frequency Mode (Serial Mode).
|
||||
#define AT45DBX_CMDA_RD_SECTOR_PROT_REG 0x32 //!< Read Sector Protection Register (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDA_RD_SECTOR_LKDN_REG 0x35 //!< Read Sector Lockdown Register (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDA_RD_SECURITY_REG 0x77 //!< Read Security Register (Serial/8-bit Mode).
|
||||
//! @}
|
||||
|
||||
/*! \name AT45DBX Group B Commands
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_CMDB_ER_PAGE 0x81 //!< Page Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_ER_BLOCK 0x50 //!< Block Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_ER_SECTOR 0x7C //!< Sector Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_ER_CHIP 0xC794809A //!< Chip Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_XFR_PAGE_TO_BUF1 0x53 //!< Main Memory Page to Buffer 1 Transfer (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_XFR_PAGE_TO_BUF2 0x55 //!< Main Memory Page to Buffer 2 Transfer (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_CMP_PAGE_TO_BUF1 0x60 //!< Main Memory Page to Buffer 1 Compare (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_CMP_PAGE_TO_BUF2 0x61 //!< Main Memory Page to Buffer 2 Compare (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_PR_BUF1_TO_PAGE_ER 0x83 //!< Buffer 1 to Main Memory Page Program with Built-in Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_PR_BUF2_TO_PAGE_ER 0x86 //!< Buffer 2 to Main Memory Page Program with Built-in Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_PR_BUF1_TO_PAGE 0x88 //!< Buffer 1 to Main Memory Page Program without Built-in Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_PR_BUF2_TO_PAGE 0x89 //!< Buffer 2 to Main Memory Page Program without Built-in Erase (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_PR_PAGE_TH_BUF1 0x82 //!< Main Memory Page Program through Buffer 1 (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_PR_PAGE_TH_BUF2 0x85 //!< Main Memory Page Program through Buffer 2 (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_RWR_PAGE_TH_BUF1 0x58 //!< Auto Page Rewrite through Buffer 1 (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDB_RWR_PAGE_TH_BUF2 0x59 //!< Auto Page Rewrite through Buffer 2 (Serial/8-bit Mode).
|
||||
//! @}
|
||||
|
||||
/*! \name AT45DBX Group C Commands
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_CMDC_RD_BUF1_LF_SM 0xD1 //!< Buffer 1 Read, Low-Frequency Mode (Serial Mode).
|
||||
#define AT45DBX_CMDC_RD_BUF2_LF_SM 0xD3 //!< Buffer 2 Read, Low-Frequency Mode (Serial Mode).
|
||||
#define AT45DBX_CMDC_RD_BUF1_AF_SM 0xD4 //!< Buffer 1 Read, Any-Frequency Mode (Serial Mode).
|
||||
#define AT45DBX_CMDC_RD_BUF2_AF_SM 0xD6 //!< Buffer 2 Read, Any-Frequency Mode (Serial Mode).
|
||||
#define AT45DBX_CMDC_RD_BUF1_AF_8M 0x54 //!< Buffer 1 Read, Any-Frequency Mode (8-bit Mode).
|
||||
#define AT45DBX_CMDC_RD_BUF2_AF_8M 0x56 //!< Buffer 2 Read, Any-Frequency Mode (8-bit Mode).
|
||||
#define AT45DBX_CMDC_WR_BUF1 0x84 //!< Buffer 1 Write (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDC_WR_BUF2 0x87 //!< Buffer 2 Write (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDC_RD_STATUS_REG 0xD7 //!< Status Register Read (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDC_RD_MNFCT_DEV_ID_SM 0x9F //!< Manufacturer and Device ID Read (Serial Mode).
|
||||
//! @}
|
||||
|
||||
/*! \name AT45DBX Group D Commands
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_CMDD_EN_SECTOR_PROT 0x3D2A7FA9 //!< Enable Sector Protection (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_DIS_SECTOR_PROT 0x3D2A7F9A //!< Disable Sector Protection (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_ER_SECTOR_PROT_REG 0x3D2A7FCF //!< Erase Sector Protection Register (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_PR_SECTOR_PROT_REG 0x3D2A7FFC //!< Program Sector Protection Register (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_LKDN_SECTOR 0x3D2A7F30 //!< Sector Lockdown (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_PR_SECURITY_REG 0x9B000000 //!< Program Security Register (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_PR_CONF_REG 0x3D2A80A6 //!< Program Configuration Register (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_DEEP_PWR_DN 0xB9 //!< Deep Power-down (Serial/8-bit Mode).
|
||||
#define AT45DBX_CMDD_RSM_DEEP_PWR_DN 0xAB //!< Resume from Deep Power-down (Serial/8-bit Mode).
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Bit-Masks and Values for the Status Register
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_MSK_BUSY 0x80 //!< Busy status bit-mask.
|
||||
#define AT45DBX_BUSY 0x00 //!< Busy status value (0x00 when busy, 0x80 when ready).
|
||||
#define AT45DBX_MSK_DENSITY 0x3C //!< Device density bit-mask.
|
||||
//! @}
|
||||
#if AT45DBX_MEM_SIZE == AT45DBX_1MB
|
||||
|
||||
/*! \name AT45DB081 Memories
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_DENSITY 0x24 //!< Device density value.
|
||||
#define AT45DBX_BYTE_ADDR_BITS 9 //!< Address bits for byte position within buffer.
|
||||
|
||||
//! @}
|
||||
#elif AT45DBX_MEM_SIZE == AT45DBX_2MB
|
||||
|
||||
/*! \name AT45DB161 Memories
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_DENSITY 0x2C //!< Device density value.
|
||||
#define AT45DBX_BYTE_ADDR_BITS 10 //!< Address bits for byte position within buffer.
|
||||
//! @}
|
||||
|
||||
#elif AT45DBX_MEM_SIZE == AT45DBX_4MB
|
||||
|
||||
/*! \name AT45DB321 Memories
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_DENSITY 0x34 //!< Device density value.
|
||||
#define AT45DBX_BYTE_ADDR_BITS 10 //!< Address bits for byte position within buffer.
|
||||
//! @}
|
||||
|
||||
#elif AT45DBX_MEM_SIZE == AT45DBX_8MB
|
||||
|
||||
/*! \name AT45DB642 Memories
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_DENSITY 0x3C //!< Device density value.
|
||||
#define AT45DBX_BYTE_ADDR_BITS 11 //!< Address bits for byte position within buffer.
|
||||
//! @}
|
||||
|
||||
#else
|
||||
#error AT45DBX_MEM_SIZE is not defined to a supported value
|
||||
#endif
|
||||
|
||||
//! Address bits for page selection.
|
||||
#define AT45DBX_PAGE_ADDR_BITS (AT45DBX_MEM_SIZE - AT45DBX_PAGE_BITS)
|
||||
|
||||
//! Number of bits for addresses within pages.
|
||||
#define AT45DBX_PAGE_BITS (AT45DBX_BYTE_ADDR_BITS - 1)
|
||||
|
||||
//! Page size in bytes.
|
||||
#define AT45DBX_PAGE_SIZE (1 << AT45DBX_PAGE_BITS)
|
||||
|
||||
//! Bit-mask for byte position within buffer in \ref gl_ptr_mem.
|
||||
#define AT45DBX_MSK_PTR_BYTE ((1 << AT45DBX_PAGE_BITS) - 1)
|
||||
|
||||
//! Bit-mask for page selection in \ref gl_ptr_mem.
|
||||
#define AT45DBX_MSK_PTR_PAGE (((1 << AT45DBX_PAGE_ADDR_BITS) - 1) << AT45DBX_PAGE_BITS)
|
||||
|
||||
//! Bit-mask for byte position within sector in \ref gl_ptr_mem.
|
||||
#define AT45DBX_MSK_PTR_SECTOR ((1 << AT45DBX_SECTOR_BITS) - 1)
|
||||
|
||||
|
||||
/*! \brief Sends a dummy byte through SPI.
|
||||
*/
|
||||
#define spi_write_dummy() spi_write(AT45DBX_SPI, 0xFF)
|
||||
|
||||
|
||||
//! Boolean indicating whether memory is in busy state.
|
||||
static Bool at45dbx_busy;
|
||||
|
||||
//! Memory data pointer.
|
||||
static U32 gl_ptr_mem;
|
||||
|
||||
//! Sector buffer.
|
||||
static U8 sector_buf[AT45DBX_SECTOR_SIZE];
|
||||
|
||||
|
||||
/*! \name Control Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Bool at45dbx_init(spi_options_t spiOptions, unsigned int pba_hz)
|
||||
{
|
||||
// Setup SPI registers according to spiOptions.
|
||||
for (spiOptions.reg = AT45DBX_SPI_FIRST_NPCS;
|
||||
spiOptions.reg < AT45DBX_SPI_FIRST_NPCS + AT45DBX_MEM_CNT;
|
||||
spiOptions.reg++)
|
||||
{
|
||||
if (spi_setupChipReg(AT45DBX_SPI, &spiOptions, pba_hz) != SPI_OK) return KO;
|
||||
}
|
||||
|
||||
// Memory ready.
|
||||
at45dbx_busy = FALSE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Selects or unselects a DF memory.
|
||||
*
|
||||
* \param memidx Memory ID of DF to select or unselect.
|
||||
* \param bSelect Boolean indicating whether the DF memory has to be selected.
|
||||
*/
|
||||
static void at45dbx_chipselect_df(U8 memidx, Bool bSelect)
|
||||
{
|
||||
if (bSelect)
|
||||
{
|
||||
// Select SPI chip.
|
||||
spi_selectChip(AT45DBX_SPI, AT45DBX_SPI_FIRST_NPCS + memidx);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unselect SPI chip.
|
||||
spi_unselectChip(AT45DBX_SPI, AT45DBX_SPI_FIRST_NPCS + memidx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_mem_check(void)
|
||||
{
|
||||
U8 df;
|
||||
U16 status = 0;
|
||||
|
||||
// DF memory check.
|
||||
for (df = 0; df < AT45DBX_MEM_CNT; df++)
|
||||
{
|
||||
// Select the DF memory to check.
|
||||
at45dbx_chipselect_df(df, TRUE);
|
||||
|
||||
// Send the Status Register Read command.
|
||||
spi_write(AT45DBX_SPI, AT45DBX_CMDC_RD_STATUS_REG);
|
||||
|
||||
// Send a dummy byte to read the status register.
|
||||
spi_write_dummy();
|
||||
spi_read(AT45DBX_SPI, &status);
|
||||
|
||||
// Unselect the checked DF memory.
|
||||
at45dbx_chipselect_df(df, FALSE);
|
||||
|
||||
// Unexpected device density value.
|
||||
if ((status & AT45DBX_MSK_DENSITY) < AT45DBX_DENSITY) return KO;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Waits until the DF is ready.
|
||||
*/
|
||||
static void at45dbx_wait_ready(void)
|
||||
{
|
||||
U16 status;
|
||||
|
||||
// Select the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, TRUE);
|
||||
|
||||
// Send the Status Register Read command.
|
||||
spi_write(AT45DBX_SPI, AT45DBX_CMDC_RD_STATUS_REG);
|
||||
|
||||
// Read the status register until the DF is ready.
|
||||
do
|
||||
{
|
||||
// Send a dummy byte to read the status register.
|
||||
spi_write_dummy();
|
||||
spi_read(AT45DBX_SPI, &status);
|
||||
} while ((status & AT45DBX_MSK_BUSY) == AT45DBX_BUSY);
|
||||
|
||||
// Unselect the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_read_open(U32 sector)
|
||||
{
|
||||
U32 addr;
|
||||
|
||||
// Set the global memory pointer to a byte address.
|
||||
gl_ptr_mem = sector << AT45DBX_SECTOR_BITS; // gl_ptr_mem = sector * AT45DBX_SECTOR_SIZE.
|
||||
|
||||
// If the DF memory is busy, wait until it's ready.
|
||||
if (at45dbx_busy) at45dbx_wait_ready();
|
||||
at45dbx_busy = FALSE;
|
||||
|
||||
// Select the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, TRUE);
|
||||
|
||||
// Initiate a page read at a given sector.
|
||||
|
||||
// Send the Main Memory Page Read command.
|
||||
spi_write(AT45DBX_SPI, AT45DBX_CMDA_RD_PAGE);
|
||||
|
||||
// Send the three address bytes, which comprise:
|
||||
// - (24 - (AT45DBX_PAGE_ADDR_BITS + AT45DBX_BYTE_ADDR_BITS)) reserved bits;
|
||||
// - then AT45DBX_PAGE_ADDR_BITS bits specifying the page in main memory to be read;
|
||||
// - then AT45DBX_BYTE_ADDR_BITS bits specifying the starting byte address within that page.
|
||||
// NOTE: The bits of gl_ptr_mem above the AT45DBX_MEM_SIZE bits are useless for the local
|
||||
// DF addressing. They are used for DF discrimination when there are several DFs.
|
||||
addr = (Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_PAGE) << AT45DBX_BYTE_ADDR_BITS) |
|
||||
Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_BYTE);
|
||||
spi_write(AT45DBX_SPI, LSB2W(addr));
|
||||
spi_write(AT45DBX_SPI, LSB1W(addr));
|
||||
spi_write(AT45DBX_SPI, LSB0W(addr));
|
||||
|
||||
// Send 32 don't care clock cycles to initialize the read operation.
|
||||
spi_write_dummy();
|
||||
spi_write_dummy();
|
||||
spi_write_dummy();
|
||||
spi_write_dummy();
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
void at45dbx_read_close(void)
|
||||
{
|
||||
// Unselect the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
|
||||
// Memory ready.
|
||||
at45dbx_busy = FALSE;
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_write_open(U32 sector)
|
||||
{
|
||||
U32 addr;
|
||||
|
||||
// Set the global memory pointer to a byte address.
|
||||
gl_ptr_mem = sector << AT45DBX_SECTOR_BITS; // gl_ptr_mem = sector * AT45DBX_SECTOR_SIZE.
|
||||
|
||||
// If the DF memory is busy, wait until it's ready.
|
||||
if (at45dbx_busy) at45dbx_wait_ready();
|
||||
at45dbx_busy = FALSE;
|
||||
|
||||
#if AT45DBX_PAGE_SIZE > AT45DBX_SECTOR_SIZE
|
||||
// Select the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, TRUE);
|
||||
|
||||
// Transfer the content of the current page to buffer 1.
|
||||
|
||||
// Send the Main Memory Page to Buffer 1 Transfer command.
|
||||
spi_write(AT45DBX_SPI, AT45DBX_CMDB_XFR_PAGE_TO_BUF1);
|
||||
|
||||
// Send the three address bytes, which comprise:
|
||||
// - (24 - (AT45DBX_PAGE_ADDR_BITS + AT45DBX_BYTE_ADDR_BITS)) reserved bits;
|
||||
// - then AT45DBX_PAGE_ADDR_BITS bits specifying the page in main memory to be read;
|
||||
// - then AT45DBX_BYTE_ADDR_BITS don't care bits.
|
||||
// NOTE: The bits of gl_ptr_mem above the AT45DBX_MEM_SIZE bits are useless for the local
|
||||
// DF addressing. They are used for DF discrimination when there are several DFs.
|
||||
addr = Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_PAGE) << AT45DBX_BYTE_ADDR_BITS;
|
||||
spi_write(AT45DBX_SPI, LSB2W(addr));
|
||||
spi_write(AT45DBX_SPI, LSB1W(addr));
|
||||
spi_write(AT45DBX_SPI, LSB0W(addr));
|
||||
|
||||
// Unselect the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
|
||||
// Wait for end of page transfer.
|
||||
at45dbx_wait_ready();
|
||||
#endif
|
||||
|
||||
// Select the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, TRUE);
|
||||
|
||||
// Initiate a page write at a given sector.
|
||||
|
||||
// Send the Main Memory Page Program through Buffer 1 command.
|
||||
spi_write(AT45DBX_SPI, AT45DBX_CMDB_PR_PAGE_TH_BUF1);
|
||||
|
||||
// Send the three address bytes, which comprise:
|
||||
// - (24 - (AT45DBX_PAGE_ADDR_BITS + AT45DBX_BYTE_ADDR_BITS)) reserved bits;
|
||||
// - then AT45DBX_PAGE_ADDR_BITS bits specifying the page in main memory to be written;
|
||||
// - then AT45DBX_BYTE_ADDR_BITS bits specifying the starting byte address within that page.
|
||||
// NOTE: The bits of gl_ptr_mem above the AT45DBX_MEM_SIZE bits are useless for the local
|
||||
// DF addressing. They are used for DF discrimination when there are several DFs.
|
||||
addr = (Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_PAGE) << AT45DBX_BYTE_ADDR_BITS) |
|
||||
Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_BYTE);
|
||||
spi_write(AT45DBX_SPI, LSB2W(addr));
|
||||
spi_write(AT45DBX_SPI, LSB1W(addr));
|
||||
spi_write(AT45DBX_SPI, LSB0W(addr));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
void at45dbx_write_close(void)
|
||||
{
|
||||
// While end of logical sector not reached, zero-fill remaining memory bytes.
|
||||
while (Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_SECTOR))
|
||||
{
|
||||
spi_write(AT45DBX_SPI, 0x00);
|
||||
gl_ptr_mem++;
|
||||
}
|
||||
|
||||
// Unselect the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
|
||||
// Memory busy.
|
||||
at45dbx_busy = TRUE;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Single-Byte Access Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
U8 at45dbx_read_byte(void)
|
||||
{
|
||||
U16 data;
|
||||
|
||||
// Memory busy.
|
||||
if (at45dbx_busy)
|
||||
{
|
||||
// Being here, we know that we previously finished a page read.
|
||||
// => We have to access the next page.
|
||||
|
||||
// Memory ready.
|
||||
at45dbx_busy = FALSE;
|
||||
|
||||
// Eventually select the next DF and open the next page.
|
||||
// NOTE: at45dbx_read_open input parameter is a sector.
|
||||
at45dbx_read_open(gl_ptr_mem >> AT45DBX_SECTOR_BITS); // gl_ptr_mem / AT45DBX_SECTOR_SIZE.
|
||||
}
|
||||
|
||||
// Send a dummy byte to read the next data byte.
|
||||
spi_write_dummy();
|
||||
spi_read(AT45DBX_SPI, &data);
|
||||
gl_ptr_mem++;
|
||||
|
||||
// If end of page reached,
|
||||
if (!Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_BYTE))
|
||||
{
|
||||
// unselect the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
|
||||
// Memory busy.
|
||||
at45dbx_busy = TRUE;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_write_byte(U8 b)
|
||||
{
|
||||
// Memory busy.
|
||||
if (at45dbx_busy)
|
||||
{
|
||||
// Being here, we know that we previously launched a page programming.
|
||||
// => We have to access the next page.
|
||||
|
||||
// Eventually select the next DF and open the next page.
|
||||
// NOTE: at45dbx_write_open input parameter is a sector.
|
||||
at45dbx_write_open(gl_ptr_mem >> AT45DBX_SECTOR_BITS); // gl_ptr_mem / AT45DBX_SECTOR_SIZE.
|
||||
}
|
||||
|
||||
// Write the next data byte.
|
||||
spi_write(AT45DBX_SPI, b);
|
||||
gl_ptr_mem++;
|
||||
|
||||
// If end of page reached,
|
||||
if (!Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_BYTE))
|
||||
{
|
||||
// unselect the DF memory gl_ptr_mem points to in order to program the page.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
|
||||
// Memory busy.
|
||||
at45dbx_busy = TRUE;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Multiple-Sector Access Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Bool at45dbx_read_multiple_sector(U16 nb_sector)
|
||||
{
|
||||
while (nb_sector--)
|
||||
{
|
||||
// Read the next sector.
|
||||
at45dbx_read_sector_2_ram(sector_buf);
|
||||
at45dbx_read_multiple_sector_callback(sector_buf);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_write_multiple_sector(U16 nb_sector)
|
||||
{
|
||||
while (nb_sector--)
|
||||
{
|
||||
// Write the next sector.
|
||||
at45dbx_write_multiple_sector_callback(sector_buf);
|
||||
at45dbx_write_sector_from_ram(sector_buf);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Single-Sector Access Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Bool at45dbx_read_sector_2_ram(void *ram)
|
||||
{
|
||||
U8 *_ram = ram;
|
||||
U16 i;
|
||||
U16 data;
|
||||
|
||||
// Memory busy.
|
||||
if (at45dbx_busy)
|
||||
{
|
||||
// Being here, we know that we previously finished a page read.
|
||||
// => We have to access the next page.
|
||||
|
||||
// Memory ready.
|
||||
at45dbx_busy = FALSE;
|
||||
|
||||
// Eventually select the next DF and open the next page.
|
||||
// NOTE: at45dbx_read_open input parameter is a sector.
|
||||
at45dbx_read_open(gl_ptr_mem >> AT45DBX_SECTOR_BITS); // gl_ptr_mem / AT45DBX_SECTOR_SIZE.
|
||||
}
|
||||
|
||||
// Read the next sector.
|
||||
for (i = AT45DBX_SECTOR_SIZE; i; i--)
|
||||
{
|
||||
// Send a dummy byte to read the next data byte.
|
||||
spi_write_dummy();
|
||||
spi_read(AT45DBX_SPI, &data);
|
||||
*_ram++ = data;
|
||||
}
|
||||
|
||||
// Update the memory pointer.
|
||||
gl_ptr_mem += AT45DBX_SECTOR_SIZE;
|
||||
|
||||
#if AT45DBX_PAGE_SIZE > AT45DBX_SECTOR_SIZE
|
||||
// If end of page reached,
|
||||
if (!Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_BYTE))
|
||||
#endif
|
||||
{
|
||||
// unselect the DF memory gl_ptr_mem points to.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
|
||||
// Memory busy.
|
||||
at45dbx_busy = TRUE;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_write_sector_from_ram(const void *ram)
|
||||
{
|
||||
const U8 *_ram = ram;
|
||||
U16 i;
|
||||
|
||||
// Memory busy.
|
||||
if (at45dbx_busy)
|
||||
{
|
||||
// Being here, we know that we previously launched a page programming.
|
||||
// => We have to access the next page.
|
||||
|
||||
// Eventually select the next DF and open the next page.
|
||||
// NOTE: at45dbx_write_open input parameter is a sector.
|
||||
at45dbx_write_open(gl_ptr_mem >> AT45DBX_SECTOR_BITS); // gl_ptr_mem / AT45DBX_SECTOR_SIZE.
|
||||
}
|
||||
|
||||
// Write the next sector.
|
||||
for (i = AT45DBX_SECTOR_SIZE; i; i--)
|
||||
{
|
||||
// Write the next data byte.
|
||||
spi_write(AT45DBX_SPI, *_ram++);
|
||||
}
|
||||
|
||||
// Update the memory pointer.
|
||||
gl_ptr_mem += AT45DBX_SECTOR_SIZE;
|
||||
|
||||
#if AT45DBX_PAGE_SIZE > AT45DBX_SECTOR_SIZE
|
||||
// If end of page reached,
|
||||
if (!Rd_bitfield(gl_ptr_mem, AT45DBX_MSK_PTR_BYTE))
|
||||
#endif
|
||||
{
|
||||
// unselect the DF memory gl_ptr_mem points to in order to program the page.
|
||||
at45dbx_chipselect_df(gl_ptr_mem >> AT45DBX_MEM_SIZE, FALSE);
|
||||
|
||||
// Memory busy.
|
||||
at45dbx_busy = TRUE;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // AT45DBX_MEM == ENABLE
|
@ -0,0 +1,270 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Management of the AT45DBX data flash controller through SPI.
|
||||
*
|
||||
* This file manages the accesses to the AT45DBX data flash components.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an SPI module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AT45DBX_H_
|
||||
#define _AT45DBX_H_
|
||||
|
||||
|
||||
#include "conf_access.h"
|
||||
|
||||
#if AT45DBX_MEM == DISABLE
|
||||
#error at45dbx.h is #included although AT45DBX_MEM is disabled
|
||||
#endif
|
||||
|
||||
|
||||
#include "spi.h"
|
||||
|
||||
|
||||
//_____ D E F I N I T I O N S ______________________________________________
|
||||
|
||||
/*! \name Available AT45DBX Sizes
|
||||
*
|
||||
* Number of address bits of available AT45DBX data flash memories.
|
||||
*
|
||||
* \note Only memories with page sizes of at least 512 bytes (sector size) are
|
||||
* supported.
|
||||
*/
|
||||
//! @{
|
||||
#define AT45DBX_1MB 20
|
||||
#define AT45DBX_2MB 21
|
||||
#define AT45DBX_4MB 22
|
||||
#define AT45DBX_8MB 23
|
||||
//! @}
|
||||
|
||||
// AT45DBX_1MB
|
||||
#define AT45DBX_SECTOR_BITS 8 //! Number of bits for addresses within sectors.
|
||||
// AT45DBX_2MB AT45DBX_4MB AT45DBX_8MB
|
||||
//#define AT45DBX_SECTOR_BITS 9 //! Number of bits for addresses within sectors.
|
||||
|
||||
//! Sector size in bytes.
|
||||
#define AT45DBX_SECTOR_SIZE (1 << AT45DBX_SECTOR_BITS)
|
||||
|
||||
|
||||
//_____ D E C L A R A T I O N S ____________________________________________
|
||||
|
||||
/*! \name Control Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Initializes the data flash controller and the SPI channel by which
|
||||
* the DF is controlled.
|
||||
*
|
||||
* \param spiOptions Initialization options of the DF SPI channel.
|
||||
* \param pba_hz SPI module input clock frequency (PBA clock, Hz).
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*/
|
||||
extern Bool at45dbx_init(spi_options_t spiOptions, unsigned int pba_hz);
|
||||
|
||||
/*! \brief Performs a memory check on all DFs.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*/
|
||||
extern Bool at45dbx_mem_check(void);
|
||||
|
||||
/*! \brief Opens a DF memory in read mode at a given sector.
|
||||
*
|
||||
* \param sector Start sector.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*
|
||||
* \note Sector may be page-unaligned (depending on the DF page size).
|
||||
*/
|
||||
extern Bool at45dbx_read_open(U32 sector);
|
||||
|
||||
/*! \brief Unselects the current DF memory.
|
||||
*/
|
||||
extern void at45dbx_read_close(void);
|
||||
|
||||
/*! \brief This function opens a DF memory in write mode at a given sector.
|
||||
*
|
||||
* \param sector Start sector.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*
|
||||
* \note Sector may be page-unaligned (depending on the DF page size).
|
||||
*
|
||||
* \note If \ref AT45DBX_PAGE_SIZE > \ref AT45DBX_SECTOR_SIZE, page content is
|
||||
* first loaded in buffer to then be partially updated by write byte or
|
||||
* write sector functions.
|
||||
*/
|
||||
extern Bool at45dbx_write_open(U32 sector);
|
||||
|
||||
/*! \brief Fills the end of the current logical sector and launches page programming.
|
||||
*/
|
||||
extern void at45dbx_write_close(void);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Single-Byte Access Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Performs a single byte read from DF memory.
|
||||
*
|
||||
* \return The read byte.
|
||||
*
|
||||
* \note First call must be preceded by a call to the \ref at45dbx_read_open
|
||||
* function.
|
||||
*/
|
||||
extern U8 at45dbx_read_byte(void);
|
||||
|
||||
/*! \brief Performs a single byte write to DF memory.
|
||||
*
|
||||
* \param b The byte to write.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*
|
||||
* \note First call must be preceded by a call to the \ref at45dbx_write_open
|
||||
* function.
|
||||
*/
|
||||
extern Bool at45dbx_write_byte(U8 b);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Multiple-Sector Access Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Reads \a nb_sector sectors from DF memory.
|
||||
*
|
||||
* Data flow is: DF -> callback.
|
||||
*
|
||||
* \param nb_sector Number of contiguous sectors to read.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*
|
||||
* \note First call must be preceded by a call to the \ref at45dbx_read_open
|
||||
* function.
|
||||
*
|
||||
* \note As \ref AT45DBX_PAGE_SIZE is always a multiple of
|
||||
* \ref AT45DBX_SECTOR_SIZE, there is no need to check page end for each
|
||||
* byte.
|
||||
*/
|
||||
extern Bool at45dbx_read_multiple_sector(U16 nb_sector);
|
||||
|
||||
/*! \brief Callback function invoked after each sector read during
|
||||
* \ref at45dbx_read_multiple_sector.
|
||||
*
|
||||
* \param psector Pointer to read sector.
|
||||
*/
|
||||
extern void at45dbx_read_multiple_sector_callback(const void *psector);
|
||||
|
||||
/*! \brief Writes \a nb_sector sectors to DF memory.
|
||||
*
|
||||
* Data flow is: callback -> DF.
|
||||
*
|
||||
* \param nb_sector Number of contiguous sectors to write.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*
|
||||
* \note First call must be preceded by a call to the \ref at45dbx_write_open
|
||||
* function.
|
||||
*
|
||||
* \note As \ref AT45DBX_PAGE_SIZE is always a multiple of
|
||||
* \ref AT45DBX_SECTOR_SIZE, there is no need to check page end for each
|
||||
* byte.
|
||||
*/
|
||||
extern Bool at45dbx_write_multiple_sector(U16 nb_sector);
|
||||
|
||||
/*! \brief Callback function invoked before each sector write during
|
||||
* \ref at45dbx_write_multiple_sector.
|
||||
*
|
||||
* \param psector Pointer to sector to write.
|
||||
*/
|
||||
extern void at45dbx_write_multiple_sector_callback(void *psector);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Single-Sector Access Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Reads 1 DF sector to a RAM buffer.
|
||||
*
|
||||
* Data flow is: DF -> RAM.
|
||||
*
|
||||
* \param ram Pointer to RAM buffer.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*
|
||||
* \note First call must be preceded by a call to the \ref at45dbx_read_open
|
||||
* function.
|
||||
*/
|
||||
extern Bool at45dbx_read_sector_2_ram(void *ram);
|
||||
|
||||
/*! \brief Writes 1 DF sector from a RAM buffer.
|
||||
*
|
||||
* Data flow is: RAM -> DF.
|
||||
*
|
||||
* \param ram Pointer to RAM buffer.
|
||||
*
|
||||
* \retval OK Success.
|
||||
* \retval KO Failure.
|
||||
*
|
||||
* \note First call must be preceded by a call to the \ref at45dbx_write_open
|
||||
* function.
|
||||
*/
|
||||
extern Bool at45dbx_write_sector_from_ram(const void *ram);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // _AT45DBX_H_
|
@ -0,0 +1,234 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief CTRL_ACCESS interface for the AT45DBX data flash controller.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an SPI module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
//_____ I N C L U D E S ___________________________________________________
|
||||
|
||||
#include "conf_access.h"
|
||||
|
||||
|
||||
#if AT45DBX_MEM == ENABLE
|
||||
|
||||
#include "conf_at45dbx.h"
|
||||
#include "at45dbx.h"
|
||||
#include "at45dbx_mem.h"
|
||||
|
||||
|
||||
//_____ D E F I N I T I O N S ______________________________________________
|
||||
|
||||
//! Whether to detect write accesses to the memory.
|
||||
#define AT45DBX_MEM_TEST_CHANGE_STATE ENABLED
|
||||
|
||||
|
||||
#if (ACCESS_USB == ENABLED || ACCESS_MEM_TO_RAM == ENABLED) && AT45DBX_MEM_TEST_CHANGE_STATE == ENABLED
|
||||
|
||||
//! Memory data modified flag.
|
||||
static volatile Bool s_b_data_modify = FALSE;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*! \name Control Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Ctrl_status at45dbx_test_unit_ready(void)
|
||||
{
|
||||
return (at45dbx_mem_check() == OK) ? CTRL_GOOD : CTRL_NO_PRESENT;
|
||||
}
|
||||
|
||||
|
||||
Ctrl_status at45dbx_read_capacity(U32 *u32_nb_sector)
|
||||
{
|
||||
*u32_nb_sector = (AT45DBX_MEM_CNT << (AT45DBX_MEM_SIZE - AT45DBX_SECTOR_BITS)) - 1;
|
||||
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_wr_protect(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Bool at45dbx_removal(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#if ACCESS_USB == ENABLED
|
||||
|
||||
#include "usb_drv.h"
|
||||
#include "scsi_decoder.h"
|
||||
|
||||
|
||||
/*! \name MEM <-> USB Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Ctrl_status at45dbx_usb_read_10(U32 addr, U16 nb_sector)
|
||||
{
|
||||
if (addr + nb_sector > AT45DBX_MEM_CNT << (AT45DBX_MEM_SIZE - AT45DBX_SECTOR_BITS)) return CTRL_FAIL;
|
||||
|
||||
at45dbx_read_open(addr);
|
||||
at45dbx_read_multiple_sector(nb_sector);
|
||||
at45dbx_read_close();
|
||||
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
|
||||
void at45dbx_read_multiple_sector_callback(const void *psector)
|
||||
{
|
||||
U16 data_to_transfer = AT45DBX_SECTOR_SIZE;
|
||||
|
||||
// Transfer read sector to the USB interface.
|
||||
while (data_to_transfer)
|
||||
{
|
||||
while (!Is_usb_in_ready(g_scsi_ep_ms_in))
|
||||
{
|
||||
if(!Is_usb_endpoint_enabled(g_scsi_ep_ms_in))
|
||||
return; // USB Reset
|
||||
}
|
||||
|
||||
Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_in);
|
||||
data_to_transfer = usb_write_ep_txpacket(g_scsi_ep_ms_in, psector,
|
||||
data_to_transfer, &psector);
|
||||
Usb_ack_in_ready_send(g_scsi_ep_ms_in);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ctrl_status at45dbx_usb_write_10(U32 addr, U16 nb_sector)
|
||||
{
|
||||
if (addr + nb_sector > AT45DBX_MEM_CNT << (AT45DBX_MEM_SIZE - AT45DBX_SECTOR_BITS)) return CTRL_FAIL;
|
||||
|
||||
#if AT45DBX_MEM_TEST_CHANGE_STATE == ENABLED
|
||||
if (nb_sector) s_b_data_modify = TRUE;
|
||||
#endif
|
||||
|
||||
at45dbx_write_open(addr);
|
||||
at45dbx_write_multiple_sector(nb_sector);
|
||||
at45dbx_write_close();
|
||||
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
|
||||
void at45dbx_write_multiple_sector_callback(void *psector)
|
||||
{
|
||||
U16 data_to_transfer = AT45DBX_SECTOR_SIZE;
|
||||
|
||||
// Transfer sector to write from the USB interface.
|
||||
while (data_to_transfer)
|
||||
{
|
||||
while (!Is_usb_out_received(g_scsi_ep_ms_out))
|
||||
{
|
||||
if(!Is_usb_endpoint_enabled(g_scsi_ep_ms_out))
|
||||
return; // USB Reset
|
||||
}
|
||||
|
||||
Usb_reset_endpoint_fifo_access(g_scsi_ep_ms_out);
|
||||
data_to_transfer = usb_read_ep_rxpacket(g_scsi_ep_ms_out, psector,
|
||||
data_to_transfer, &psector);
|
||||
Usb_ack_out_received_free(g_scsi_ep_ms_out);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
#endif // ACCESS_USB == ENABLED
|
||||
|
||||
|
||||
#if ACCESS_MEM_TO_RAM == ENABLED
|
||||
|
||||
/*! \name MEM <-> RAM Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Ctrl_status at45dbx_df_2_ram(U32 addr, void *ram)
|
||||
{
|
||||
if (addr + 1 > AT45DBX_MEM_CNT << (AT45DBX_MEM_SIZE - AT45DBX_SECTOR_BITS)) return CTRL_FAIL;
|
||||
|
||||
at45dbx_read_open(addr);
|
||||
at45dbx_read_sector_2_ram(ram);
|
||||
at45dbx_read_close();
|
||||
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
|
||||
Ctrl_status at45dbx_ram_2_df(U32 addr, const void *ram)
|
||||
{
|
||||
if (addr + 1 > AT45DBX_MEM_CNT << (AT45DBX_MEM_SIZE - AT45DBX_SECTOR_BITS)) return CTRL_FAIL;
|
||||
|
||||
#if AT45DBX_MEM_TEST_CHANGE_STATE == ENABLED
|
||||
s_b_data_modify = TRUE;
|
||||
#endif
|
||||
|
||||
at45dbx_write_open(addr);
|
||||
at45dbx_write_sector_from_ram(ram);
|
||||
at45dbx_write_close();
|
||||
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
#endif // ACCESS_MEM_TO_RAM == ENABLED
|
||||
|
||||
|
||||
#endif // AT45DBX_MEM == ENABLE
|
@ -0,0 +1,164 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief CTRL_ACCESS interface for the AT45DBX data flash controller.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an SPI module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AT45DBX_MEM_H_
|
||||
#define _AT45DBX_MEM_H_
|
||||
|
||||
|
||||
#include "conf_access.h"
|
||||
|
||||
#if AT45DBX_MEM == DISABLE
|
||||
#error at45dbx_mem.h is #included although AT45DBX_MEM is disabled
|
||||
#endif
|
||||
|
||||
|
||||
#include "ctrl_access.h"
|
||||
|
||||
|
||||
//_____ D E C L A R A T I O N S ____________________________________________
|
||||
|
||||
/*! \name Control Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Tests the memory state and initializes the memory if required.
|
||||
*
|
||||
* The TEST UNIT READY SCSI primary command allows an application client to poll
|
||||
* a LUN until it is ready without having to allocate memory for returned data.
|
||||
*
|
||||
* This command may be used to check the media status of LUNs with removable
|
||||
* media.
|
||||
*
|
||||
* \return Status.
|
||||
*/
|
||||
extern Ctrl_status at45dbx_test_unit_ready(void);
|
||||
|
||||
/*! \brief Returns the address of the last valid sector in the memory.
|
||||
*
|
||||
* \param u32_nb_sector Pointer to the address of the last valid sector.
|
||||
*
|
||||
* \return Status.
|
||||
*/
|
||||
extern Ctrl_status at45dbx_read_capacity(U32 *u32_nb_sector);
|
||||
|
||||
/*! \brief Returns the write-protection state of the memory.
|
||||
*
|
||||
* \return \c TRUE if the memory is write-protected, else \c FALSE.
|
||||
*
|
||||
* \note Only used by removable memories with hardware-specific write
|
||||
* protection.
|
||||
*/
|
||||
extern Bool at45dbx_wr_protect(void);
|
||||
|
||||
/*! \brief Tells whether the memory is removable.
|
||||
*
|
||||
* \return \c TRUE if the memory is removable, else \c FALSE.
|
||||
*/
|
||||
extern Bool at45dbx_removal(void);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#if ACCESS_USB == ENABLED
|
||||
|
||||
/*! \name MEM <-> USB Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Tranfers data from the memory to USB.
|
||||
*
|
||||
* \param addr Address of first memory sector to read.
|
||||
* \param nb_sector Number of sectors to transfer.
|
||||
*
|
||||
* \return Status.
|
||||
*/
|
||||
extern Ctrl_status at45dbx_usb_read_10(U32 addr, U16 nb_sector);
|
||||
|
||||
/*! \brief Tranfers data from USB to the memory.
|
||||
*
|
||||
* \param addr Address of first memory sector to write.
|
||||
* \param nb_sector Number of sectors to transfer.
|
||||
*
|
||||
* \return Status.
|
||||
*/
|
||||
extern Ctrl_status at45dbx_usb_write_10(U32 addr, U16 nb_sector);
|
||||
|
||||
//! @}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if ACCESS_MEM_TO_RAM == ENABLED
|
||||
|
||||
/*! \name MEM <-> RAM Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Copies 1 data sector from the memory to RAM.
|
||||
*
|
||||
* \param addr Address of first memory sector to read.
|
||||
* \param ram Pointer to RAM buffer to write.
|
||||
*
|
||||
* \return Status.
|
||||
*/
|
||||
extern Ctrl_status at45dbx_df_2_ram(U32 addr, void *ram);
|
||||
|
||||
/*! \brief Copies 1 data sector from RAM to the memory.
|
||||
*
|
||||
* \param addr Address of first memory sector to write.
|
||||
* \param ram Pointer to RAM buffer to read.
|
||||
*
|
||||
* \return Status.
|
||||
*/
|
||||
extern Ctrl_status at45dbx_ram_2_df(U32 addr, const void *ram);
|
||||
|
||||
//! @}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _AT45DBX_MEM_H_
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
Revision: 2491
|
@ -0,0 +1,1687 @@
|
||||
/*
|
||||
* Programming interface for wl_api.
|
||||
* Copyright (C) 2010 HD Wireless AB
|
||||
*
|
||||
* You should have received a copy of the license along with this library.
|
||||
*/
|
||||
|
||||
/*! \file wl_api.h *************************************************************
|
||||
*
|
||||
* \brief Basic WiFi API
|
||||
*
|
||||
* This file provides the wl_api interface.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices:
|
||||
* \li SPB104 + EVK1100
|
||||
* \li SPB104 + EVK1101
|
||||
* \li SPB104 + EVK1104
|
||||
* \li SPB104 + EVK1105 (SPI)
|
||||
* \li SPB104 + EVK1105 (SPI + irq)
|
||||
* \li SPB105 + EVK1105 (SPI)
|
||||
* - AppNote:
|
||||
*
|
||||
* \author H&D Wireless AB: \n
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* \section intro Introduction
|
||||
* This is the documentation for the generic WiFi Driver API \a wl_api.
|
||||
*
|
||||
* \section files Main Files
|
||||
* - wl_api.h : WiFi driver interface.
|
||||
* - lib_ucr*_hd_wifi_standalone_v*.*.a - Driver library.
|
||||
*
|
||||
*/
|
||||
/** \mainpage wl_api Reference Manual
|
||||
|
||||
\image html images/wl_api_block_diagram_small.png "wl_api Architecture"
|
||||
|
||||
(o)WL API © is a programming interface for WiFi (802.11). It aims
|
||||
to be a complete interface for embedded applications wanting to use
|
||||
wireless as a communications interface. (o)WL API © is shortened
|
||||
"wl_api" in this document.
|
||||
|
||||
wl_api has been designed to meet the following goals :
|
||||
\li Simple : The API is as simple as is practicable
|
||||
to make it easy to use.
|
||||
\li Minimal size : The API is usable on very resource constrained
|
||||
platforms.
|
||||
\li Portable : The API is deployable on any platform with a standards
|
||||
compliant C compiler.
|
||||
\li OS independent : The API is deployable on systems using a real time
|
||||
operating system as well as with applications running on the
|
||||
"bare metal" of a hardware platform (that is without an operating system).
|
||||
|
||||
As a consequence of these design goals wl_api does not allow very fine
|
||||
grained control of most parameters relating to 802.11 networks. That
|
||||
would increase the flexibility of the API while also increasing
|
||||
complexity and code size. When the underlying WiFi hardware can
|
||||
support a richer feature set the extra features can be offered as a
|
||||
add-on library if required.
|
||||
|
||||
The wl_api is implemented by two libraries. The core library is
|
||||
compiled for a hardware platform and is independent of operating
|
||||
system or IP stack. The core library contains all WiFi
|
||||
functionality. The core library is supported by a suite of transport
|
||||
libraries. The transport libraries implements the hardware
|
||||
communication layer and are specific to the type of hardware interface
|
||||
used to connect the host platform to the WiFi hardware. For example,
|
||||
there are transport libraries for SPI and for SDIO. Only the core
|
||||
library has a public interface (wl_api.h) but applications will need
|
||||
to link with both the core library and a transport library matching
|
||||
the hardware configuration.
|
||||
|
||||
\section wl_api_princ Operation Principles
|
||||
|
||||
There are three important properties of wl_api to keep in mind when
|
||||
programming with it.
|
||||
|
||||
The first is that wl_api is \b asynchronous. For instance, when the
|
||||
\a wl_connect() function is called to attempt connection with an access
|
||||
point it will trigger a sequence of packets being exchanged with the
|
||||
access point after which, if everything is okay, a connection has been
|
||||
established. The \a wl_connect() call is asynchronous (or non-blocking)
|
||||
which means that you don't know if the connection attempt has
|
||||
succeeded after the call returns. You only know if the sequence was
|
||||
successfully started or not. To find out if, and when, the connection
|
||||
attempt was successful you must register an event handler using the
|
||||
function \a wl_register_event_cb(). This is true of a number of API calls
|
||||
(which is indicated in their documentation).
|
||||
|
||||
The second important property is that wl_api is \b polled. wl_api
|
||||
never executes "by itself", since it would then have to support
|
||||
interrupts, timers, locks and other operating system dependent
|
||||
features. Instead all asynchronous processes proceed when wl_api is
|
||||
polled by calling the \a wl_tick() function. When \a wl_tick() is called
|
||||
wl_api reacts to any received management frames, expires any internal timers and
|
||||
performs any other tasks necessary for forward progress. After
|
||||
\a wl_tick() returns nothing will happen unless it or some other wl_api
|
||||
function is called again. Also, to send and receive data, the \a wl_process_rx()
|
||||
and \a wl_process_tx() must be invoked upon reception and transmission of data.
|
||||
|
||||
The third important property is that wl_api is \b not \b thread \b safe.
|
||||
All wl_api calls must execute in the same context since the
|
||||
library has no knowledge of the locking mechanisms available (if any).
|
||||
|
||||
\section wl_api_code_examples A note on the code examples
|
||||
|
||||
The code examples illustrate how to call the different wl_api functions.
|
||||
They do not constitute a complete program. Functions with the prefix "app_"
|
||||
in the code examples are application specific calls that illustrate a
|
||||
particular action. These functions are not part of the API and will have
|
||||
to be implemented if needed. For a complete working code example see
|
||||
one of the H&D Wireless software reference designs, such as the WiFi HTTP
|
||||
server demo code in the Atmel Software Framework.
|
||||
|
||||
The API is structured into these functional groups:
|
||||
|
||||
\li \ref wl_api
|
||||
\li \ref wl_wifi
|
||||
\li \ref wl_data
|
||||
\li \ref wl_transport
|
||||
\li \ref wl_custom
|
||||
|
||||
Also documented here is the transport layers for SPI and SDIO.
|
||||
There interfaces are only necessary when porting the library to
|
||||
a new hardware platform.
|
||||
|
||||
\li \ref wl_spi
|
||||
\li \ref wl_sdio
|
||||
|
||||
* \section contactinfo Contact Information
|
||||
* For further information, visit
|
||||
* <A href="http://www.hd-wireless.se/">H&D Wireless</A>.\n
|
||||
* Support and FAQ: http://www.atmel.com/
|
||||
*/
|
||||
|
||||
#ifndef WL_API_H
|
||||
#define WL_API_H
|
||||
|
||||
#define WL_API_RELEASE_NAME "v2.7.0"
|
||||
|
||||
/*! Maximum size of a SSID */
|
||||
#define WL_SSID_MAX_LENGTH 32
|
||||
/*! Size of a MAC-address or BSSID */
|
||||
#define WL_MAC_ADDR_LENGTH 6
|
||||
/*! Maximum length of a passphrase */
|
||||
#define WL_MAX_PASS_LEN 64
|
||||
/*! Indicates that there is no SNR information */
|
||||
#define WL_SNR_UNKNOWN -128
|
||||
|
||||
#define SPB104 104
|
||||
#define SPB105 105
|
||||
|
||||
/*! \ingroup wl_api
|
||||
* API Error codes */
|
||||
typedef enum {
|
||||
WL_FAILURE = -1,
|
||||
WL_SUCCESS = 1,
|
||||
WL_NOEFFECT,
|
||||
WL_OOM,
|
||||
WL_INVALID_LENGTH,
|
||||
WL_NOT_SUPPORTED,
|
||||
WL_ABSORBED,
|
||||
WL_RESOURCES,
|
||||
WL_BUSY,
|
||||
WL_RETRY, /*!< Retry the operation later. The driver is busy
|
||||
resolving an operation that conflicts with the
|
||||
request. */
|
||||
WL_INVALID_ARGS,
|
||||
WL_AVAIL,
|
||||
WL_CARD_FAILURE, /*!< Could not detect SPB device */
|
||||
WL_FIRMWARE_INVALID, /*!< Invalid firmware data */
|
||||
|
||||
} wl_err_t;
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
* Event identifiers */
|
||||
enum wl_event_id_t {
|
||||
WL_EVENT_MEDIA_CONNECTED = 0,
|
||||
WL_EVENT_CONN_FAILURE,
|
||||
WL_EVENT_MEDIA_DISCONNECTED,
|
||||
WL_EVENT_SCAN_COMPLETE,
|
||||
WL_EVENT_FAILURE,
|
||||
MAX_WL_EVENT
|
||||
};
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
* Authentication modes */
|
||||
enum wl_auth_mode {
|
||||
AUTH_MODE_INVALID,
|
||||
AUTH_MODE_AUTO,
|
||||
AUTH_MODE_OPEN_SYSTEM,
|
||||
AUTH_MODE_SHARED_KEY,
|
||||
AUTH_MODE_WPA,
|
||||
AUTH_MODE_WPA2,
|
||||
AUTH_MODE_WPA_PSK,
|
||||
AUTH_MODE_WPA2_PSK
|
||||
};
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
* Encryption modes */
|
||||
enum wl_enc_type { /* Values map to 802.11 encryption suites... */
|
||||
ENC_TYPE_WEP = 5,
|
||||
ENC_TYPE_TKIP = 2,
|
||||
ENC_TYPE_CCMP = 4,
|
||||
/* ... except these two, 7 and 8 are reserved in 802.11-2007 */
|
||||
ENC_TYPE_NONE = 7,
|
||||
ENC_TYPE_AUTO = 8
|
||||
};
|
||||
|
||||
enum wl_host_attention_mode {
|
||||
WL_HOST_ATTENTION_SDIO = 0x1, /*!< For SDIO or polled SPI */
|
||||
WL_HOST_ATTENTION_SPI = 0x5a /*!< For SPI with interrupt line */
|
||||
};
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
* Event descriptor
|
||||
*/
|
||||
struct wl_event_t {
|
||||
enum wl_event_id_t id; /**< Event identifier. */
|
||||
|
||||
};
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
* Infrastructure (ESS) or Ad-hoc (IBSS) connection modes.
|
||||
*/
|
||||
enum wl_conn_type_t {
|
||||
WL_CONN_TYPE_INFRA, /*!< For infrastructure mode (default) */
|
||||
WL_CONN_TYPE_ADHOC /*!< For ad-hoc mode */
|
||||
};
|
||||
|
||||
/* Note:
|
||||
* If your environment does not have stdint.h you will have to
|
||||
* define the fixed-width integer types specified in that file
|
||||
* yourself, make sure that those definitions are included
|
||||
* before any inclusions of wl_api.h, and build with the macro
|
||||
* WITHOUT_STDINT defined. In this case the wl_api library
|
||||
* must have been built with the same integer type definitions.
|
||||
*/
|
||||
|
||||
#ifndef WITHOUT_STDINT
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
/* Note:
|
||||
* If your environment does not have stdio.h you will have to define
|
||||
* the size_t type yourself, make sure that that definition is
|
||||
* included before any inclusions of wl_api.h, and build with the
|
||||
* macro WITHOUT_STDIO defined. In this case the wl_api library must
|
||||
* have been built with the same size_t type definition.
|
||||
*/
|
||||
#ifndef WITHOUT_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
*
|
||||
* \brief SSID representation.
|
||||
*
|
||||
* The SSID is a binary string and cannot be treated as a
|
||||
* C-string safely. An empty SSID is represented by a
|
||||
* SSID struct with the len field set to 0.
|
||||
*/
|
||||
struct wl_ssid_t
|
||||
{
|
||||
char ssid[WL_SSID_MAX_LENGTH]; /**< Octet array containing the SSID data. */
|
||||
uint8_t len; /**< Length of valid data in ssid member.
|
||||
* Cannot be longer than WL_SSID_MAX_LENGTH. */
|
||||
};
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
*
|
||||
* MAC-address/BSSID representation
|
||||
*
|
||||
* A broadcast BSSID is one with all octets set to 0xFF.
|
||||
*/
|
||||
struct wl_mac_addr_t
|
||||
{
|
||||
uint8_t octet[WL_MAC_ADDR_LENGTH]; /**< Octet array containing the MAC address
|
||||
* data. This array is always WL_MAC_ADDR_LENGTH bytes.
|
||||
*/
|
||||
};
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
*
|
||||
* Network representation
|
||||
*
|
||||
*/
|
||||
struct wl_network_t
|
||||
{
|
||||
struct wl_ssid_t ssid; /**< The SSID of the network. */
|
||||
struct wl_mac_addr_t bssid; /**< The BSSID of the network. */
|
||||
uint8_t channel; /**< The wlan channel which the network uses */
|
||||
uint32_t beacon_period; /**< Beacon period for the network */
|
||||
uint16_t dtim_period; /**< DTIM period for the network */
|
||||
int32_t rssi; /**< Received Signal Strength in dBm (measured on beacons) */
|
||||
int32_t snr; /**< Received Signal to noise ratio in dBm (measured on beacons) */
|
||||
uint8_t enc_type; /**< The encryption type used in the network. */
|
||||
|
||||
enum wl_conn_type_t net_type; /**< Type of network (Infrastructure or Ad-Hoc */
|
||||
size_t ie_len; /**< Always 0 unless wl_api has been built with WL_CONFIG_WPA_SUPPLICANT */
|
||||
|
||||
uint8_t ie[0]; /**< Not used unless wl_api has been built with WL_CONFIG_WPA_SUPPLICANT */
|
||||
};
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
* Network list representation. Array of pointers to wl_network_t entries.
|
||||
*
|
||||
*/
|
||||
struct wl_network_list_t
|
||||
{
|
||||
struct wl_network_t **net; /**< The list of pointers to networks */
|
||||
size_t cnt; /**< Number of networks */
|
||||
};
|
||||
|
||||
#define WL_RATE_1MBIT 2
|
||||
#define WL_RATE_2MBIT 4
|
||||
#define WL_RATE_5_5MBIT 11
|
||||
#define WL_RATE_6MBIT 12
|
||||
#define WL_RATE_9MBIT 18
|
||||
#define WL_RATE_11MBIT 22
|
||||
#define WL_RATE_12MBIT 24
|
||||
#define WL_RATE_18MBIT 36
|
||||
#define WL_RATE_22MBIT 44
|
||||
#define WL_RATE_24MBIT 48
|
||||
#define WL_RATE_33MBIT 66
|
||||
#define WL_RATE_36MBIT 72
|
||||
#define WL_RATE_48MBIT 96
|
||||
#define WL_RATE_54MBIT 108
|
||||
#define WL_RATE_NUM_RATES 14
|
||||
#define WL_RATE_INVALID WL_RATE_NUM_RATES
|
||||
|
||||
/*! \ingroup wl_wifi
|
||||
*
|
||||
* Rate representation
|
||||
*
|
||||
*/
|
||||
typedef uint8_t wl_rate_t;
|
||||
|
||||
/** \defgroup wl_api Library support functions
|
||||
*
|
||||
* These functions manage the library in general. They concern initalizing
|
||||
* the library, downloading firmware to the WiFi chip and handling events
|
||||
* from the library.
|
||||
|
||||
For this example we assume that the application is running stand-alone
|
||||
without an operating system.
|
||||
|
||||
Before the library can do anything it needs to start up the WiFi
|
||||
hardware by downloading a firmware image. The firmware image is
|
||||
relatively big (around 144kB) and is therefore not included in the library
|
||||
it is only needed once. It is up to the application to decide where to
|
||||
store the firmware image and how to read it into the wl_api library.
|
||||
|
||||
Step one is to write a function of the type \a ::wl_fw_read_cb_t
|
||||
that wl_api will call to retrive the firmware image. Assuming that you
|
||||
have some spare RAM (or whatever memory type is used for read only
|
||||
data, such as FLASH memory) on your platform you can simply include
|
||||
the firmware image from the \a wl_fw.h header file and write a
|
||||
firmware read function like this
|
||||
|
||||
\code
|
||||
static size_t fw_read_cb(void* ctx,
|
||||
uint8_t** buf,
|
||||
size_t offset,
|
||||
size_t len)
|
||||
{
|
||||
if ( NULL == buf ) {
|
||||
return 0;
|
||||
}
|
||||
*buf = ((uint8_t*) fw_buf) + offset;
|
||||
if ( len > ( fw_len - offset ) ) {
|
||||
return fw_len - offset;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
\endcode
|
||||
|
||||
If the firmware image is stored in ROM this function may have to read
|
||||
it back block by block instead.
|
||||
|
||||
First, firmware must be downloaded to the device
|
||||
|
||||
\code
|
||||
if ( wl_transport_init(fw_read_cb, NULL, &mode) != WL_SUCCESS ) {
|
||||
app_error("Firmware download failed");
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
The wl_api library is then initialized like this
|
||||
|
||||
\code
|
||||
if ( wl_init(NULL, init_complete_cb, mode) != WL_SUCCESS ) {
|
||||
app_error("Init failed");
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
The library startup process will now require \a wl_poll() to be called
|
||||
a number of times before it can complete. In addition, if the
|
||||
application needs to know when the startup process has completed so
|
||||
that it can, for example, start up an IP stack it will have to supply
|
||||
a valid callback function of the type \a ::wl_init_complete_cb_t as a parameter
|
||||
to the \a wl_init() call and start polling the wl_api library.
|
||||
|
||||
The init complete callback will only be executed during a call to \a wl_poll()
|
||||
or another wl_api function. This simplifies the implementation since no
|
||||
internal locking is required and the wl_api library becomes OS-independent.
|
||||
|
||||
\code
|
||||
static void init_complete_cb(void* ctx) {
|
||||
init_ip_stack();
|
||||
}
|
||||
\endcode
|
||||
|
||||
Registering the event callback is straightforward :
|
||||
|
||||
\code
|
||||
if (wl_register_event_cb(event_cb, NULL) != WL_SUCCESS) {
|
||||
app_error("Failed to register event handler");
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Similar to \a wl_poll(), there is also a \a wl_tick() function that takes a
|
||||
free running "tick" counter with millisecond resolution as an argument so
|
||||
that it can trigger internal timers when necessary. Assuming that such a tick
|
||||
counter is provided by the macro GET_MS_TICK() the wl_api execution loop becomes
|
||||
|
||||
\code
|
||||
while (TRUE) {
|
||||
wl_tick(GET_MS_TICK());
|
||||
wl_poll();
|
||||
}
|
||||
\endcode
|
||||
|
||||
In a stand-alone application this loop would usually be the main application
|
||||
loop and include application specific calls as well.
|
||||
|
||||
After some number of main loop iterations the init_complete_cb will be
|
||||
invoked and the application can initialize its IP stack.
|
||||
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*! \brief WiFi event callback.
|
||||
*
|
||||
* This function receives WiFi events that the application
|
||||
* wants notification of. This function is supplied by the user
|
||||
* of the API.
|
||||
*
|
||||
* @param event Struct describing the type of event and, for some
|
||||
* events, additional information regarding the
|
||||
* status of the event. See wl_event_t for additional
|
||||
* information.
|
||||
* @param ctx A context handle. This handle is passed
|
||||
* untouched to the callback and has the same value
|
||||
* as the context registered with the callback in
|
||||
* wl_register_event_cb().
|
||||
*/
|
||||
typedef void (*wl_event_cb_t) (struct wl_event_t event, void* ctx);
|
||||
|
||||
|
||||
/*! \brief Initialization complete callback function.
|
||||
*
|
||||
* Invoked when WiFi initialization is complete.
|
||||
*
|
||||
* @param ctx Opaque context pointer as provided to \a wl_init() that will be
|
||||
* passed back to the callback.
|
||||
*/
|
||||
typedef void (wl_init_complete_cb_t)(void* ctx);
|
||||
|
||||
|
||||
/*! \brief Register an event handler.
|
||||
*
|
||||
* Register an event handler with the driver. This
|
||||
* event handler will be called whenever a event
|
||||
* listed in #wl_event_id_t occurs.
|
||||
* See #wl_event_cb_t and #wl_event_id_t for more details.
|
||||
*
|
||||
* @param cb Event callback function to register.
|
||||
* @param ctx Opaque context pointer that will be
|
||||
* passed to the callback when it is
|
||||
* invoked. This parameter is never
|
||||
* accessed by the API.
|
||||
* @return WL_SUCCESS
|
||||
*/
|
||||
wl_err_t wl_register_event_cb(wl_event_cb_t cb, void* ctx);
|
||||
|
||||
/*! \brief Initialize the wl_api library.
|
||||
*
|
||||
* Note that \a wl_poll() must be called for this function to progress
|
||||
* towards complete init
|
||||
*
|
||||
* The startup process will proceed asynchronously and will inkove
|
||||
* init_complete_cb when completed. The callback will not be invoked if any
|
||||
* error occurs during initialization.
|
||||
*
|
||||
* This function should be called after firmware has been downloaded to the
|
||||
* device.
|
||||
*
|
||||
* @param ctx Opaque context pointer that will be passed to the callback
|
||||
* when invoked. This parameter is never accessed by the API.
|
||||
* @param init_complete_cb callback function to invoke when initialization is
|
||||
* complete.
|
||||
* @param mode Indicates the host attention mode used by the device. If
|
||||
* \a wl_transport_init() was used to download the firmware image to the
|
||||
* device, the proper mode can be obtained from the mode parameter of
|
||||
* that function.
|
||||
*
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE
|
||||
*/
|
||||
wl_err_t wl_init(void* ctx, wl_init_complete_cb_t init_complete_cb,
|
||||
enum wl_host_attention_mode mode);
|
||||
|
||||
|
||||
/*! \brief Shutdown the wl_api library and free resources.
|
||||
*
|
||||
* \a wl_init() must be invoked to startup the library
|
||||
* again.
|
||||
*
|
||||
* @return
|
||||
* - WL_SUCCESS on success
|
||||
* - WL_FAILURE
|
||||
*
|
||||
*/
|
||||
wl_err_t wl_shutdown(void);
|
||||
|
||||
|
||||
/*! \brief WiFi driver timer tick function
|
||||
*
|
||||
* Periodic timers are triggered from this function so it should be called as
|
||||
* often as possible if precision timing is required (traffic timeouts,
|
||||
* authentication timeouts etc).
|
||||
*
|
||||
* @param tick A tick count in us. This is used to expire timers
|
||||
* in the driver.
|
||||
*/
|
||||
void wl_tick(uint32_t tick);
|
||||
|
||||
/*! @} */
|
||||
|
||||
|
||||
/** \defgroup wl_wifi Connection Management
|
||||
*
|
||||
* These functions access WiFi-specific functionality such as
|
||||
* scanning, connect/disconnect, authentication and encryption,
|
||||
* and power save modes.
|
||||
*
|
||||
|
||||
\section scanning Scanning
|
||||
|
||||
To scan all channels that are available in the current regulatory
|
||||
domain
|
||||
|
||||
\code
|
||||
if ( wl_scan() != WL_SUCCESS ) {
|
||||
// May be busy scanning already, no fatal error
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Since wl_scan() only starts the scanning process the application
|
||||
should add code to the event handler to catch the "scan complete" event
|
||||
and retrieve the list of seen networks from the library
|
||||
|
||||
\code
|
||||
static void event_cb(struct wl_event_t event, void* ctx) {
|
||||
switch(event.id) {
|
||||
case WL_EVENT_SCAN_COMPLETE:
|
||||
struct wl_network_list_t *netlist;
|
||||
uint8_t netcnt;
|
||||
|
||||
wl_get_network_list(&netlist);
|
||||
netcnt = netlist->cnt;
|
||||
while (--netcnt) {
|
||||
print_network(netlist->net[netcnt]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
The function print_network() could display the network name, the SSID, in
|
||||
a user interface. It is important to keep in mind is that despite the fact
|
||||
that the SSID is usually presented as a ASCII string, it is
|
||||
in fact just a byte string and can legally contain all kinds of
|
||||
non-printable characters, including a 0-byte. This means that it is
|
||||
easy to end up with buffer overrun bugs if the SSID is ever treated
|
||||
as a normal string without precautions.
|
||||
|
||||
\code
|
||||
void print_network(struct wl_network_t* wl_network)
|
||||
{
|
||||
char ssid[WL_SSID_MAX_LENGTH + 1];
|
||||
memset(ssid, 0, sizeof(ssid));
|
||||
memcpy(ssid, wl_network->ssid.ssid, wl_network->ssid.len);
|
||||
if (app_is_printable(ssid)) {
|
||||
app_print("\"%s\" ", ssid);
|
||||
}
|
||||
else {
|
||||
app_print("<binary SSID> ");
|
||||
}
|
||||
switch (wl_network->enc_type) {
|
||||
case ENC_TYPE_WEP :
|
||||
app_print("(WEP encryption)");
|
||||
break;
|
||||
case ENC_TYPE_TKIP :
|
||||
app_print("(TKIP encryption)");
|
||||
break;
|
||||
case ENC_TYPE_CCMP :
|
||||
app_print("(CCMP encryption)");
|
||||
break;
|
||||
}
|
||||
app_print("\n");
|
||||
}
|
||||
\endcode
|
||||
|
||||
\section connecting Connecting
|
||||
|
||||
To connect to an access point (beware binary SSIDs) the connection process
|
||||
must be started
|
||||
|
||||
\code
|
||||
if ( wl_connect("My AP", strlen("My AP"))
|
||||
!= WL_SUCCESS ) {
|
||||
app_error("Connection failed.\n");
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
and the \a WL_EVENT_MEDIA_CONNECTED and \a WL_EVENT_CONN_FAILURE events should be
|
||||
caught. To detect that a connection is terminated after it has been successfully established
|
||||
(such as when the AP goes out of range) the \a WL_EVENT_MEDIA_DISCONNECTED event
|
||||
must be also be caught
|
||||
|
||||
|
||||
\code
|
||||
static void event_cb(struct wl_event_t event, void* ctx) {
|
||||
switch(event.id) {
|
||||
case WL_EVENT_SCAN_COMPLETE:
|
||||
struct wl_network_list_t *netlist;
|
||||
uint8_t netcnt;
|
||||
|
||||
wl_get_network_list(&netlist);
|
||||
netcnt = netlist->cnt;
|
||||
while (--netcnt) {
|
||||
print_network(netlist->net[netcnt]);
|
||||
}
|
||||
break;
|
||||
case WL_EVENT_CONN_FAILURE:
|
||||
app_error("Connection failed\n");
|
||||
break;
|
||||
case WL_EVENT_MEDIA_CONNECTED:
|
||||
app_print("Connected to Access Point\n");
|
||||
app_ip_interface_up();
|
||||
break;
|
||||
case WL_EVENT_MEDIA_DISCONNECTED:
|
||||
app_print("Disconnected from Access Point\n");
|
||||
app_ip_interface_down();
|
||||
break;
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
\section security Security
|
||||
|
||||
To use WEP a WEP key must be added before the connection is initiated.
|
||||
To set the 40-bit WEP key 0xDEADBEEF00 as default key for key index 0 do
|
||||
|
||||
\code
|
||||
char key[5] = { 0xDE, 0xAD, 0xBE, 0xEF, 0x00 };
|
||||
struct wl_mac_addr_t bssid;
|
||||
|
||||
// This means that the bssid is a broadcast bssid and the WEP key will be a default key instead of a key-mapping key.
|
||||
memset(&bssid.octet, 0xff, sizeof bssid.octet);
|
||||
|
||||
if ( wl_add_wep_key(0, sizeof key, key, &bssid)
|
||||
!= WL_SUCCESS ) {
|
||||
app_error("Failed to add WEP key.");
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
To use WPA/WPA2 with a Pre-shared key a passphrase must be associated
|
||||
with the network before the connection is initiated.
|
||||
|
||||
\code
|
||||
struct wl_network_t net;
|
||||
char passphrase[] = "MySecretKey";
|
||||
|
||||
memset(&net, 0, sizeof net);
|
||||
memset(net.bssid.octet, 0xFF, sizeof net.bssid.octet);
|
||||
strncpy(net.ssid.ssid, "My AP", strlen("My AP"));
|
||||
net.ssid.len = strlen("My AP");
|
||||
net.enc_type = ENC_TYPE_AUTO;
|
||||
if (wl_set_passphrase(&net,
|
||||
passphrase,
|
||||
strlen(passphrase),
|
||||
ENC_TYPE_AUTO,
|
||||
AUTH_MODE_AUTO)
|
||||
!= WL_SUCCESS) {
|
||||
app_error("Failed to add passphrase");
|
||||
}
|
||||
\endcode
|
||||
|
||||
The library supports several passphrase-network associations to be
|
||||
configured simultaneously. Be aware that the \a wl_connect() call
|
||||
can take up to 15 seconds longer than normal when using a pre-shared
|
||||
WPA/WPA2 key since the platform must calculate a temporal encryption
|
||||
key from the passphrase before the connection attempt can start.
|
||||
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/*! \brief Scan all channels.
|
||||
*
|
||||
* Starts a scan of all WiFi channels allowed in this regulatory
|
||||
* domain. The list of allowed channels (the domain) is adapted to the
|
||||
* channels announced as allowed by the first AP heard.
|
||||
*
|
||||
* The scan will proceed asynchronously and will raise a
|
||||
* WL_EVENT_SCAN_COMPLETE event when completed.
|
||||
*
|
||||
* Currently, there's a limit on the scan list size that depends on the
|
||||
* architecture (6 networks for the AVR32 UCR1 architecture 16 networks for
|
||||
* other architectures. If more network exist, the strongest networks are
|
||||
* chosen. Note that the limitation on the scan list size does not limit the
|
||||
* networks which the device can connect to. See wl_connect() for more
|
||||
* details.
|
||||
*
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wl_scan(void);
|
||||
|
||||
/*! \brief Get the list of currently known networks.
|
||||
*
|
||||
* Retrieves the list of currently known networks from
|
||||
* the driver. To ensure that this list is up-to-date
|
||||
* a wl_scan() call should be issued and this function
|
||||
* should be called upon reception of the WL_EVENT_SCAN_COMPLETE
|
||||
* event. This function can be called at other times
|
||||
* but the list of networks retrieved then might not
|
||||
* correspond to the networks actually in range.
|
||||
*
|
||||
* Note that a successful scan does not necessarily
|
||||
* find any networks.
|
||||
*
|
||||
* @param network_list Output buffer. The API call returns
|
||||
* a pointer to allocated memory containing the network list.
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wl_get_network_list(struct wl_network_list_t **network_list);
|
||||
|
||||
#ifdef WFE_6_12
|
||||
/*! \brief Start a Ad-hoc network.
|
||||
*
|
||||
* Attempt to start a Ad-hoc (IBSS) network. If a Ad-hoc network
|
||||
* is successfully started then a WL_EVENT_MEDIA_CONNECTED event
|
||||
* will be raised once the first peer station connects to the Ad-hoc
|
||||
* network (and not when the network is announced on the air).
|
||||
*
|
||||
* If a Ad-hoc network should be started with encryption
|
||||
* enabled then \a wl_set_passphrase() should be called before
|
||||
* \a wl_start_adhoc_net() to configure the security parameters.
|
||||
* The Ad-hoc network is started with the security parameters
|
||||
* (if any) that was configured for the specified \a ssid.
|
||||
*
|
||||
* @param ssid The SSID of the new network. If there's a network
|
||||
* already present with this SSID this call will fail.
|
||||
* @param channel The channel to use. Valid channels are 1-14
|
||||
* @param auth_mode The authentication mode to use. Supported
|
||||
* authentication modes for Ad-hoc networks are
|
||||
* AUTH_MODE_OPEN_SYSTEM and AUTH_MODE_SHARED_KEY.
|
||||
* Passing other modes will cause a WL_INVALID_ARGS return.
|
||||
* If AUTH_MODE_SHARED_KEY is used then a valid WEP
|
||||
* key must be set with a call to \a wl_add_wep_key()
|
||||
* and the default WEP key index must be set with a
|
||||
* call to \a wl_set_default_wep_key().
|
||||
* @return
|
||||
* - WL_SUCCESS on success.
|
||||
* - WL_INVALID_ARGS if the ssid is malformed, if
|
||||
* the channel not valid or if the authentication mode
|
||||
* is invalid.
|
||||
* - WL_RETRY if the driver is busy resolving a conflicting
|
||||
* operation. The operation should be retried after a wait
|
||||
* (at least one call to wl_poll() for polled implementations).
|
||||
* - WL_BUSY if the driver is already connected or if a network
|
||||
* with the same SSID is already known.
|
||||
*
|
||||
*/
|
||||
wl_err_t wl_start_adhoc_net(struct wl_ssid_t ssid,
|
||||
uint8_t channel,
|
||||
enum wl_auth_mode auth_mode);
|
||||
#endif
|
||||
/*! \brief Connect to a SSID.
|
||||
*
|
||||
* Attempt to connect to a given SSID. If the driver is already
|
||||
* connected to an AP with a different SSID then this call will
|
||||
* return WL_BUSY and wl_disconnect() should be called before
|
||||
* trying again.
|
||||
*
|
||||
* The connection process will proceed asynchronously and will raise a
|
||||
* WL_EVENT_MEDIA_CONNECTED event when completed, or a WL_EVENT_CONN_FAILURE
|
||||
* when failed. After a WL_EVENT_MEDIA_CONNECTED event has been raised
|
||||
* a WL_EVENT_MEDIA_DISCONNECT event will be raised if the connection is
|
||||
* terminated. Note that this can be caused by external factors and can
|
||||
* happen at any time.
|
||||
*
|
||||
* If wl_connect() is invoked with a network that is not shown in the
|
||||
* scan list, the device will probe for that specific network and connect
|
||||
* to it, if found. This is also the method to use in order to connect to
|
||||
* "hidden" networks (AP's that doesn't broadcast its SSID).
|
||||
*
|
||||
* @param ssid Pointer to the SSID string.
|
||||
* Freed by caller.
|
||||
* @param ssid_len Length of the SSID string in octets. Max value is 32.
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE if the network could not be found
|
||||
* - WL_BUSY if the driver is already connected
|
||||
* - WL_RETRY if the driver is busy resolving a conflicting operation.
|
||||
* The operation should be retried after a wait (at least one call to wl_poll()
|
||||
* for polled implementations).
|
||||
*/
|
||||
wl_err_t wl_connect(char* ssid, size_t ssid_len);
|
||||
|
||||
/*! \brief Connect to a BSSID
|
||||
*
|
||||
* Attempt to connect to a given BSSID. If the driver is already
|
||||
* connected to an AP with a different BSSID then this call will
|
||||
* return WL_BUSY and wl_disconnect() should be called before
|
||||
* trying again.
|
||||
*
|
||||
* The connection process will proceed asynchronously and will raise a
|
||||
* WL_EVENT_MEDIA_CONNECTED event when completed, or a WL_EVENT_CONN_FAILURE
|
||||
* when failed. After a WL_EVENT_MEDIA_CONNECTED event has been raised
|
||||
* a WL_EVENT_MEDIA_DISCONNECT event will be raised if the connection is
|
||||
* terminated. Note that this can be caused by external factors and can
|
||||
* happen at any time.
|
||||
*
|
||||
* If wl_connect_bssid() is invoked with a network that is not shown in the
|
||||
* scan list, the device will probe for that specific network and connect
|
||||
* to it, if found.
|
||||
*
|
||||
* @param bssid Pointer to the BSSID. Freed by caller.
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE if the network could not be found
|
||||
* - WL_BUSY if the driver is already connected
|
||||
* - WL_RETRY if the driver is busy resolving a conflicting operation.
|
||||
* The operation should be retried after a wait (at least one call to wl_poll()
|
||||
* for polled implementations).
|
||||
*/
|
||||
wl_err_t wl_connect_bssid(struct wl_mac_addr_t bssid);
|
||||
|
||||
/*! \brief Disconnect from the network
|
||||
*
|
||||
* Disconnect from any currently associated network.
|
||||
*
|
||||
* The disconnection process will proceed asynchronously and will raise a
|
||||
* WL_EVENT_MEDIA_DISCONNECTED event when completed.
|
||||
* @return
|
||||
* - WL_SUCCESS if the disconnect process was started
|
||||
* - WL_FAILURE if the driver was not connected
|
||||
* - WL_RETRY if the driver is in the process of connecting.
|
||||
* In this case the disconnect must be retried after
|
||||
* the connection attempt has completed (resulted in a
|
||||
* WL_EVENT_MEDIA_CONNECTED or a WL_EVENT_CONN_FAILURE event).
|
||||
*/
|
||||
wl_err_t wl_disconnect(void);
|
||||
|
||||
/*!
|
||||
* @brief Add a WEP encryption key to the device.
|
||||
*
|
||||
* Configure a key into the device. The key type (WEP-40, WEP-104)
|
||||
* is determined by the size of the key (5 bytes for WEP-40, 13 bytes for WEP-104).
|
||||
*
|
||||
* @param key_idx The key index to set. Valid values are 0-3.
|
||||
* @param key_len Length of key in bytes. Valid values are 5 and 13.
|
||||
* @param key Key input buffer.
|
||||
* @param bssid BSSID that the key applies to. If this is
|
||||
* the broadcast BSSID then the key is configured
|
||||
* as one of the default keys (not _the_ default key,
|
||||
* this must be set by calling set_default_wep_key()
|
||||
* after adding it). If the BSSID is a valid unicast
|
||||
* bssid then the key is configured as a key-mapping
|
||||
* key ( See 802.11-2007 8.2.1.3 ).
|
||||
* @return
|
||||
* - WL_SUCCESS on success.
|
||||
* - WL_INVALID_LENGTH if the key length is bad.
|
||||
* - WL_FAILURE on failure
|
||||
*/
|
||||
wl_err_t wl_add_wep_key(uint8_t key_idx,
|
||||
size_t key_len,
|
||||
const void *key,
|
||||
struct wl_mac_addr_t *bssid);
|
||||
|
||||
/*! @brief Set the default WEP key index.
|
||||
*
|
||||
* Select which WEP key to use for transmitted packets.
|
||||
* For this to work correctly you must have added a WEP
|
||||
* key with \a wl_add_wep_key() as a default key, using the
|
||||
* same index as the one set in this call.
|
||||
* @param key_idx Index of the key to make the default key.
|
||||
* Valid values are 0-3.
|
||||
* @return WL_SUCCESS or WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wl_set_default_wep_key(uint8_t key_idx);
|
||||
|
||||
/*! \brief Delete a WEP key.
|
||||
*
|
||||
* Deletes a WEP key from the driver.
|
||||
*
|
||||
* @param key_idx The index of the key to delete. Valid values are 0-3.
|
||||
* @param bssid BSSID that the key applies to. If this is
|
||||
* the broadcast BSSID then the key deleted is a default key.
|
||||
* If the BSSID is a valid unicast bssid then the deleted
|
||||
* key is a key-mapping key.
|
||||
* @return WL_SUCCESS or WL_FAILURE
|
||||
*/
|
||||
wl_err_t wl_delete_wep_key(uint8_t key_idx, struct wl_mac_addr_t *bssid);
|
||||
|
||||
/*! @brief Set a WPA/WPA2 passphase
|
||||
*
|
||||
* Associate a WPA/WPA2/RSN passphrase with a network.
|
||||
* The number of passphrases that can be stored can
|
||||
* vary but is always at least one. Passphrases can
|
||||
* be added until \a wl_add_wpa_passphrase() returns
|
||||
* WL_RESOURCES.
|
||||
*
|
||||
* @param net Network with which to associate the passphrase.
|
||||
* @param passphrase Passphrase. Valid characters in a passphrase
|
||||
* must lie between ASCII 32-126 (decimal).
|
||||
* @param len Length of passphrase. Valid lengths are 8-63.
|
||||
* @param enc_type Encryption type. If this is set to ENC_TYPE_AUTO
|
||||
* then the most secure supported mode will be automatically
|
||||
* selected. Normally you only need to pass something else here
|
||||
* if you need to enforce picking a certain encryption mode when
|
||||
* the network supports several modes and you don't want to use
|
||||
* the best one.
|
||||
* @param auth_mode Authentication mode. If this is set to AUTH_MODE_AUTO
|
||||
* then the most secure mode will be automatically selected.
|
||||
* Normally you only need to pass something else here if the network
|
||||
* announces support for both WPA and WPA2/RSN and the passphrases are
|
||||
* different.
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_INVALID_ARGS if the passphrase length is invalid.
|
||||
* - WL_RESOURCES if no more passphrases can be added.
|
||||
*/
|
||||
wl_err_t wl_set_passphrase(const struct wl_network_t *net,
|
||||
const char *passphrase,
|
||||
const size_t len,
|
||||
const enum wl_enc_type enc_type,
|
||||
const enum wl_auth_mode auth_mode);
|
||||
|
||||
/*! @brief Remove a WPA/WPA2 passphase
|
||||
*
|
||||
* Remove a WPA/WPA2/RSN passphrase associated with a network.
|
||||
*
|
||||
* @param net Network with which to associate the passphrase.
|
||||
* If net is NULL then all stored passphrases will be
|
||||
* cleared.
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE if no passphrase was associated with the net.
|
||||
*/
|
||||
wl_err_t wl_clear_passphrase(struct wl_network_t *net);
|
||||
|
||||
|
||||
/*! \brief Enable legacy power save mode
|
||||
*
|
||||
* Enable legacy power save mode. In legacy power save mode, the device
|
||||
* will power down when idle. When connected, the device will wake up to
|
||||
* receive beacon frames and any buffered data from the AP. The response
|
||||
* time when legacy power save is enabled might therefore be as long as the
|
||||
* AP beacon interval (mostly 100 ms). However, the throughput should not
|
||||
* be affected.
|
||||
*
|
||||
* @return WL_SUCCESS or WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wl_enable_ps(void);
|
||||
|
||||
/*! \brief Disable legacy power save mode
|
||||
*
|
||||
* @return WL_SUCCESS or WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wl_disable_ps(void);
|
||||
|
||||
/*! \brief Configure power save parameters.
|
||||
*
|
||||
* @param use_ps_poll Use PS-Poll frames to retrieve buffered data. Any changes
|
||||
* to this parameter will take effect upon next connect
|
||||
* or when power save is enabled through wl_enable_ps().
|
||||
* Note: To retrieve one buffered packet, the ps poll scheme
|
||||
* needs one ps poll packet to the AP instead of two null
|
||||
* packets in the power management bit scheme. Ps poll avoids
|
||||
* the overhead of traffic monitoring time in active mode as
|
||||
* well. But since each ps poll request can make the AP
|
||||
* release only one buffered packet, it is not the optimal
|
||||
* scheme for applications with heavy downlink traffic.
|
||||
* @param ps_traffic_timeout Timeout in [ms] to wait for more buffered data
|
||||
* from AP. This setting has no effect if
|
||||
* use_ps_poll is 1. Any changes to this parameter
|
||||
* will take effect immediately.
|
||||
* @param ps_delay Power save will de delayed ps_delay [ms] after connecting to
|
||||
* an AP.
|
||||
* @param rx_all_dtim If set to 1, then STA will wake up to listen to every
|
||||
* beacon containing DTIM (delivery traffic indication messages) when
|
||||
* connected. The actual DTIM interval is configured in the AP.
|
||||
* If the DTIM interval, as configured in the AP, is larger than
|
||||
* \a listen_interval, the STA will wakeup according to the
|
||||
* \a listen_interval parameter.
|
||||
* @param listen_interval The Listen Interval field is used to indicate to the
|
||||
* AP how often a STA in power save mode wakes to listen
|
||||
* to beacon frames. The value of this parameter is expressed in units
|
||||
* of Beacon Interval. An AP may use the Listen Interval information in
|
||||
* determining the lifetime of frames that it buffers for a STA.
|
||||
* Any changes to this parameter will take effect upon next association.
|
||||
*
|
||||
* @return WL_SUCCESS or WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wl_conf_ps(uint8_t use_ps_poll,
|
||||
uint32_t ps_traffic_timeout,
|
||||
uint32_t ps_delay,
|
||||
uint8_t rx_all_dtim,
|
||||
uint16_t listen_interval);
|
||||
|
||||
/*! \brief Get the interface MAC address.
|
||||
*
|
||||
* Return the 802.3 MAC address of the network interface.
|
||||
*
|
||||
* @param buf Output buffer. It must be at least WL_MAC_ADDR_LENGTH
|
||||
* bytes long and only the first WL_MAC_ADDR_LENGTH bytes
|
||||
* will contain valid data.
|
||||
* @return
|
||||
* - WL_FAILURE if the interface is not up.
|
||||
* - WL_SUCCESS
|
||||
*/
|
||||
wl_err_t wl_get_mac_addr(uint8_t* buf);
|
||||
|
||||
/*! \brief Return the associated network.
|
||||
*
|
||||
* Return the description of the currently associated
|
||||
* network, if any.
|
||||
*
|
||||
* @return The network description, or NULL of the driver
|
||||
* is unconnected.
|
||||
*/
|
||||
struct wl_network_t* wl_get_current_network(void);
|
||||
/*! @} */
|
||||
|
||||
/** \defgroup wl_data Data Transfer
|
||||
*
|
||||
* \brief Packet processing interface.
|
||||
*
|
||||
* Note that the examples in this group assumes that the transport library
|
||||
* functions in the \a wl_transport group are being used. For more information,
|
||||
* See the documentation for those functions in the \a wl_transport group.
|
||||
|
||||
For the IP stack integration you need to intercept received packets so
|
||||
they can be sent up the stack and to transmit packets coming down the
|
||||
stack.
|
||||
|
||||
By default the wl_api library discards all data packets. To receive
|
||||
them the application must register a rx interrupt service routine (isr)
|
||||
using the \a wl_register_rx_isr() function.
|
||||
|
||||
\code
|
||||
static void rx_isr(void* ctx) {
|
||||
rx_pending = TRUE;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Since the rx_isr() function is only called in interrupt context, it is not
|
||||
safe to perform the actual read directly from rx_isr(). If an OS is used,
|
||||
the normal case is to signal a receiver thread to invoke the ip stack
|
||||
read function to read the pending data. In a system that runs without an OS
|
||||
(as in the example), a flag is set to indicate that wl_rx() can be invoked
|
||||
from the ip stack read function next time the ip stack is polled.
|
||||
The beginning of a ip stack read function can look like this
|
||||
|
||||
\code
|
||||
static void ip_stack_rx_pkt() {
|
||||
char *pkt = malloc(MAX_PKT_SIZE);
|
||||
uint16_t len = MAX_PKT_SIZE;
|
||||
|
||||
if (p == NULL) {
|
||||
app_error("Out of memory.");
|
||||
return;
|
||||
}
|
||||
wl_rx(pkt, &len);
|
||||
if (0 == len) {
|
||||
app_error("Packet reception failed.");
|
||||
free(pkt);
|
||||
return
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
Since the ip_stack_rx_pkt() function should only be called when there is
|
||||
actually a packet ready to read you do not have to check the return value
|
||||
from \a wl_rx() since it only returns failure if there is no packet ready to
|
||||
read.
|
||||
|
||||
A packet arriving from the WiFi interface can be either a data
|
||||
packet or a message from the WiFi hardware to the WiFi driver
|
||||
(which is implemented by the wl_api library). This means that
|
||||
wl_api must process every packet to decide if it is an internal
|
||||
message or a data frame that
|
||||
should be passed up to the application. Data packets are
|
||||
prefixed with an extra header containing some administrative
|
||||
information, and may be followed by padding bytes and so
|
||||
wl_api also needs to strip the extra header and any padding
|
||||
before the packet can be safely ingested by the IP stack.
|
||||
All this happens in the function \a wl_process_rx() which \b must
|
||||
be called on every packet received by a call to \a wl_rx().
|
||||
|
||||
Continuing the ip_stack_rx_pkt() example
|
||||
|
||||
\code
|
||||
{
|
||||
char* stripped_pkt;
|
||||
size_t stripped_pkt_len;
|
||||
uint16_t vlan;
|
||||
int status;
|
||||
|
||||
status = wl_process_rx(pkt,
|
||||
len,
|
||||
&stripped_pkt,
|
||||
&stripped_pkt_len,
|
||||
&vlan);
|
||||
if (WL_ABSORBED == status) {
|
||||
// This is normal. The packet was a
|
||||
// wl_api-internal message.
|
||||
free(pkt);
|
||||
return;
|
||||
}
|
||||
app_ip_stack_input(stripped_pkt,
|
||||
stripped_pkt_len,
|
||||
vlan);
|
||||
free(pkt);
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
If \a wl_process_rx() decides that the packet was a command it processes
|
||||
it and returns \a WL_ABSORBED to signal that the packet should
|
||||
not be used by anyone else. Otherwise stripped_pkt is
|
||||
pointing to the beginning of a 802.3 Ethernet frame of length
|
||||
stripped_pkt_len. If the IP stack supports VLAN and QoS
|
||||
the extra VLAN tag should be passed to the IP stack
|
||||
together with the packet. For IP stacks without this support the VLAN tag
|
||||
contents can safely be ignored, but it must still be filled in by \a wl_process_tx().
|
||||
|
||||
To register the receive isr
|
||||
|
||||
\code
|
||||
wl_register_rx_isr(rx_isr, NULL);
|
||||
\endcode
|
||||
|
||||
Transmitting data packets happens in a similar way but does not
|
||||
require a callback/isr since the application/IP stack knows when it has
|
||||
packets to send.
|
||||
|
||||
\code
|
||||
int ip_stack_tx_pkt(char *pkt, size_t len, uint16_t vlan_tag) {
|
||||
int status;
|
||||
char wlan_hdr[WL_HEADER_SIZE];
|
||||
// The packet must have an Ethernet header
|
||||
if (len < ETHERNET_HEADER_SIZE) {
|
||||
app_error("Invalid packet length");
|
||||
return 0;
|
||||
}
|
||||
hdr_len = sizeof wlan_hdr;
|
||||
status = wl_process_tx(pkt,
|
||||
ETHERNET_HEADER_SIZE,
|
||||
len,
|
||||
wlan_hdr,
|
||||
vlan_tag,
|
||||
NULL);
|
||||
if ( WL_SUCCESS != status ) {
|
||||
app_error("Packet processing failed");
|
||||
return 0;
|
||||
}
|
||||
// Transmit the header first
|
||||
if (wl_tx(wlan_hdr, hdr_len) != WL_SUCCESS) {
|
||||
app_error("Header transmission failed");
|
||||
return 0;
|
||||
}
|
||||
// Then transmit the data packet
|
||||
if (wl_tx(pkt, len) != WL_SUCCESS) {
|
||||
app_error("Packet transmission failed");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
The final piece of the puzzle in the IP stack integration is
|
||||
the MAC address of the WiFi interface
|
||||
|
||||
\code
|
||||
char mac_addr[WL_MAC_ADDR_LENGTH];
|
||||
|
||||
wl_get_mac_addr(mac_addr);
|
||||
ip_stack_set_mac_address(mac_addr);
|
||||
\endcode
|
||||
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*! Size of the wl_api packet header */
|
||||
#ifdef WFE_6_12
|
||||
#define WL_HEADER_SIZE 16
|
||||
#else
|
||||
#define WL_HEADER_SIZE 14
|
||||
#endif
|
||||
|
||||
/*! Maximum packet size (including wl_api headers and paddings)
|
||||
*
|
||||
* Maximum packet size is obtained with the following data:
|
||||
*
|
||||
* 1500 bytes of Ethernet payload (MTU) + 14 bytes of Ethernet header +
|
||||
* WL_HEADER_SIZE of wl header. This data is then size-aligned to 16.
|
||||
*
|
||||
*/
|
||||
#define WL_MAX_PKT_LEN 1536
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Process rx packet.
|
||||
*
|
||||
* Processes a raw rx packet by unencrypting it (if necessary)
|
||||
* and stripping headers so as to output a 802.3 frame.
|
||||
*
|
||||
* wl_process_rx() will strip bytes both from the head and from the tail.
|
||||
*
|
||||
* Upon return from wl_process_rx(), the pointer at stripped_pkt will
|
||||
* point to the start of the Ethernet header, hence adjusting the offset
|
||||
* by WL_HEADER_LEN bytes. Any padding (added by the wifi device) will
|
||||
* be removed from the tail of the packet, hence making len smaller.
|
||||
*
|
||||
* The wl_api library of the device will not perform any Ethernet padding
|
||||
* removal. The padding removal performed by wl_process_rx() is only for
|
||||
* the padding used in the protocol shared by the host and the device.
|
||||
* This padding is mainly there to ensure that the host does not have to
|
||||
* deal with rx of odd-sized data buffers (which some DMA's have problems
|
||||
* to handle).
|
||||
*
|
||||
* @param pkt Input buffer (raw packet)
|
||||
* @param pkt_len Length of the input buffer (in bytes)
|
||||
* @param stripped_pkt Pointer to the packet with the
|
||||
* transport header stripped.
|
||||
* @param stripped_pkt_len Length of the stripped packet.
|
||||
* @param vlanid_prio VLAN ID and 802.1p priority value
|
||||
* using following format:
|
||||
* <PRE>
|
||||
* 1
|
||||
* 5|432109876543|210
|
||||
* -+------------+---
|
||||
* 0| VLANID |PRI
|
||||
* </PRE>
|
||||
*
|
||||
* @returns
|
||||
* - WL_FAILURE
|
||||
* - WL_ABSORBED if the packet was an internal driver command
|
||||
* and not a proper data packet. The packet should
|
||||
* be freed and the stripped_pkt will not point
|
||||
* to a valid packet.
|
||||
* - WL_SUCCESS
|
||||
*/
|
||||
wl_err_t wl_process_rx(char *pkt, size_t pkt_len, char **stripped_pkt,
|
||||
size_t *stripped_pkt_len, uint16_t *vlanid_prio);
|
||||
|
||||
/*! \brief Process tx packet.
|
||||
*
|
||||
* Prepare tx packet for transmission.
|
||||
*
|
||||
* This function is typically used only by the TCP/IP stack driver.
|
||||
*
|
||||
* Takes a Ethernet II frame header and generates a message passing header
|
||||
* for it.
|
||||
*
|
||||
* The caller should ensure that any frames injected into wl_process_tx()
|
||||
* are proper Ethernet frames. The wl_api library or the device will not
|
||||
* perform any Ethernet padding if the frames are too short.
|
||||
*
|
||||
* The Ethernet header is assumed to have the following layout :
|
||||
* <dst addr:6><src addr:6><type:2>...
|
||||
* The rest of the Ethernet header buffer (if any) is ignored.
|
||||
*
|
||||
* A note on the TX packet representation :
|
||||
* If your TX packets are simple contiguous buffers you can ignore
|
||||
* the rest of this note and pass NULL in parameter \a pkt_handle.
|
||||
* A TX packet may have a more complex structure than a RX packet
|
||||
* (which must be a contiguous, flat buffer). The IP stack may
|
||||
* for example represent a packet as a linked list of buffers where
|
||||
* the Ethernet header, the IP header and other headers, are represented
|
||||
* by separate buffers. In some cases, such as when the driver is
|
||||
* running in SoftAP mode, a TX packet has to be copied and queued
|
||||
* internally for later processing and to support this when packets
|
||||
* have a complicated structure a special data access function can
|
||||
* be registered. See \a wl_register_pkt_read_cb() for details.
|
||||
* If you use \a wl_process_tx() with non-simple packets you
|
||||
* should pass a handle to the packet in parameter \a pkt_handle
|
||||
* and register an access function with \a wl_register_pkt_read_cb().
|
||||
*
|
||||
* @param eth_hdr Input buffer (Ethernet header)
|
||||
* @param eth_hdr_len Input buffer length (must be >= 14)
|
||||
* This is usually the same as pkt_len unless e.g linked list or buffers
|
||||
* chained in other ways are being used.
|
||||
* @param pkt_len Length of the complete data packet (in bytes)
|
||||
* @param hdr Pointer to the header buffer (must be
|
||||
* allocated by the caller). The length of the buffer
|
||||
* must be at least WL_HEADER_SIZE bytes.
|
||||
* @param vlanid_prio VLAN ID and 802.1p priority value
|
||||
* using following format:
|
||||
* <PRE>
|
||||
* 1
|
||||
* 5|432109876543|210
|
||||
* -+------------+---
|
||||
* 0| VLANID |PRI
|
||||
* </PRE>
|
||||
* Ignored for legacy association (no WMM)
|
||||
* @param pkt_handle A handle to the complete packet. If this parameter
|
||||
* is NULL then \a eth_hdr is expected to point to the whole packet
|
||||
* in a single contiguous buffer (the default). If a different packet
|
||||
* representation is used this parameter should be a handle to the
|
||||
* complete packet and will be passed unmodified to the data
|
||||
* access function that was registered with \a wl_register_pkt_read_cb().
|
||||
*
|
||||
* @returns
|
||||
* - WL_FAILURE
|
||||
* - WL_RESOURCES if packet can not be processed at the moment.
|
||||
* The caller must either drop the packet or try
|
||||
* retransmit it later.
|
||||
* - WL_AVAIL if network not available
|
||||
* - WL_SUCCESS if packet is ready for transmission through wl_tx().
|
||||
*/
|
||||
wl_err_t wl_process_tx(char *eth_hdr,
|
||||
size_t eth_hdr_len,
|
||||
size_t pkt_len,
|
||||
char *hdr,
|
||||
uint16_t vlanid_prio,
|
||||
void *pkt_handle);
|
||||
|
||||
|
||||
/*! \brief Get current TX and RX rate used for data transfer
|
||||
*
|
||||
* During transmission and reception of data, the actual rate used will depend
|
||||
* on the signal quality. This function can be used to get the actual rate used
|
||||
* for the last tx and rx data.
|
||||
*
|
||||
* @param tx will hold the tx rate upon successful return.
|
||||
* @param rx will hold the rx rate upon successful return.
|
||||
*
|
||||
* @return
|
||||
* - WL_SUCCESS on success
|
||||
* - WL_FAILURE on failure.
|
||||
*/
|
||||
wl_err_t wl_get_rate(wl_rate_t *tx, wl_rate_t *rx);
|
||||
|
||||
|
||||
/*! @} */ /* End wl_data group */
|
||||
|
||||
|
||||
/** \defgroup wl_transport Transport interface
|
||||
*
|
||||
* \brief Low level transport interface.
|
||||
*
|
||||
* These functions access the low level transport driver which makes
|
||||
* the application independent of the actual physical transport
|
||||
* layer (usually SDIO or SPI).
|
||||
*
|
||||
|
||||
For applications running on an real time kernel or without an
|
||||
operating system, the provided transport library will fit right into the
|
||||
application design. However, when running on a more complex operating system
|
||||
(such as windows or linux) which has its own transport primitivies and
|
||||
components (and probably its own IP stack) it might be preferred to design a
|
||||
custom transport library for that specific environment. Therefore, these
|
||||
transport interface functions are fully optional.
|
||||
|
||||
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define WL_RX_MIN_PKT_LEN 32
|
||||
|
||||
|
||||
/*! \brief WiFi event callback.
|
||||
*
|
||||
* This function is invoked in interrupt context when there is new data
|
||||
* available from the mac. This function is supplied by the user
|
||||
* of the API.
|
||||
*
|
||||
* This function is typically used only by the TCP/IP stack driver.
|
||||
*
|
||||
* @param ctx A context handle. This handle is passed
|
||||
* untouched to the callback and has the same value
|
||||
* as the context registered with the callback in
|
||||
* wl_register_event_cb().
|
||||
*/
|
||||
typedef void (*wl_rx_isr_t) (void* ctx);
|
||||
|
||||
|
||||
/*! \brief Firmware access function.
|
||||
*
|
||||
* Reads the WiFi firmware image. This function is supplied by
|
||||
* the user of this API since storage for the firmware image is
|
||||
* managed by the application.
|
||||
*
|
||||
* This function should read the specified number of bytes of the
|
||||
* firmware image starting at the specified \a offset. The number of
|
||||
* bytes to read is given in \a len. Upon return, \a buf should point
|
||||
* to a buffer which holds the read data and the number of valid bytes
|
||||
* in \a buf is returned from the call.
|
||||
*
|
||||
* This function will be called repeatedly until the complete firmware
|
||||
* image has been read.
|
||||
*
|
||||
* This function may be called again at any time while the driver is
|
||||
* running to download further pieces of the WiFi firmware image as
|
||||
* needed by the runtime requirements. This will normally only happen
|
||||
* when the driver switches between networks of different kinds such
|
||||
* as from WEP to WPA, or from ESS to IBSS for example.
|
||||
*
|
||||
* For convenience, any time a firmware chunk has been completely
|
||||
* downloaded this function will be called once with the \a buf
|
||||
* parameter set to NULL to indicate that no more data is needed right
|
||||
* now and that any dynamically allocated buffers which holds firmware
|
||||
* data can be freed without much performance impact.
|
||||
*
|
||||
* @param ctx Opaque context pointer as provided to \a wl_init() that will be
|
||||
* passed back to the callback.
|
||||
* @param buf Should be assigned the address of the buffer holding the read
|
||||
* data upon return. This parameter can be NULL which indicates
|
||||
* that there are no further immediately pending accesses.
|
||||
* @param offset Offset in bytes from the start of the firmware image.
|
||||
* Data should be copied into buf starting at \a offset.
|
||||
* @param len The number of bytes to copy into \a buf.
|
||||
* @return The number of bytes copied into buf. This may be smaller than
|
||||
* \len if the implementation of the function so requires.
|
||||
*/
|
||||
typedef size_t (wl_fw_read_cb_t)(void *ctx,
|
||||
const uint8_t **buf,
|
||||
size_t offset,
|
||||
size_t len);
|
||||
|
||||
|
||||
/*! \brief Initialize the transport interface and download the WiFi firmware
|
||||
* image to the device.
|
||||
*
|
||||
* This operation will proceed synchronously until the firmware is completely
|
||||
* downloaded. wl_init() should be called after this function has returned to
|
||||
* perform device initialization.
|
||||
*
|
||||
* @param fw_read_cb callback function to invoke during firmware download.
|
||||
* @param ctx Opaque context pointer that will be passed to the callbacks
|
||||
* when they are invoked. This parameter is never
|
||||
* accessed by the API.
|
||||
* @param mode will hold the host attention mode used by the transport layer.
|
||||
* This parameter can be passed directly to \a wl_init().
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* - WL_CARD_FAILURE if the wl hardware device is not available
|
||||
* - WL_FIRMWARE_INVALID if the firmware obtained through fw_read_cb is
|
||||
* invalid.
|
||||
* - WL_OOM if the necessary memory could not be allocated.
|
||||
*/
|
||||
wl_err_t wl_transport_init(wl_fw_read_cb_t *fw_read_cb,
|
||||
void *ctx,
|
||||
enum wl_host_attention_mode *mode);
|
||||
|
||||
/*! \brief WiFi driver forward progress function
|
||||
*
|
||||
* This function must be called in polled environments to
|
||||
* ensure forward progress. The call can be made as often as possible from
|
||||
* the main application loop. However, the call will not have any effect unless
|
||||
* there is an interrupt pending from the hardware.
|
||||
*
|
||||
* In interrupt mode, wl_poll() must be called if no interrupt
|
||||
* handler is registered through wl_register_rx_isr(). When an interrupt
|
||||
* handler is registered, it is no longer necessary to invoke wl_poll().
|
||||
*
|
||||
* Note that this function should not be invoked from interrupt context.
|
||||
*
|
||||
*/
|
||||
void wl_poll(void);
|
||||
|
||||
|
||||
/*! \brief Register RX callback
|
||||
*
|
||||
* Register function to be called by the low level transport driver
|
||||
* when a new packet is available or when there is a state change in the
|
||||
* data path. When invoked, any pending data can be fetched by calling wl_rx().
|
||||
*
|
||||
* This function is typically used only by the TCP/IP stack driver.
|
||||
* Note, the registered function is called in interrupt context.
|
||||
*
|
||||
* @param isr rx interrup handler.
|
||||
* @param ctx Opaque context pointer that is passed unmodified to the
|
||||
* rx_cb callback when it is invoked.
|
||||
*
|
||||
* @return WL_SUCCESS
|
||||
*/
|
||||
wl_err_t wl_register_rx_isr(wl_rx_isr_t isr, void* ctx);
|
||||
|
||||
|
||||
/*! \brief Read pending packet
|
||||
*
|
||||
* Read a pending packet from the low level transport driver.
|
||||
* The read packet must be passed to the wl_process_rx() function
|
||||
* for proper driver operation.
|
||||
*
|
||||
* @param buf Buffer to read the packet into. This buffer must be
|
||||
* at least WL_MAX_PKT_LEN bytes long.
|
||||
* @param len Length of buf in bytes. Contains the length of the
|
||||
* read packet in bytes on output.
|
||||
* @return
|
||||
* - WL_FAILURE if no RX packet is pending.
|
||||
* - WL_SUCCESS
|
||||
*/
|
||||
wl_err_t wl_rx(uint8_t* buf, uint16_t* len);
|
||||
|
||||
/*! \brief Send processed tx packet
|
||||
*
|
||||
* Send a packet to the low level transport driver.
|
||||
* This packet has to have been successfully processed by the
|
||||
* wl_process_tx() function.
|
||||
*
|
||||
* @param buf Buffer to send.
|
||||
* @param len Length of buf in bytes.
|
||||
*
|
||||
* @return
|
||||
* - WL_FAILURE if the interface is not ready to send.
|
||||
* - WL_SUCCESS if the packet was successfully transmitted.
|
||||
*/
|
||||
wl_err_t wl_tx(const uint8_t* buf, uint16_t len);
|
||||
|
||||
|
||||
/*! \brief Configure data alignment
|
||||
*
|
||||
* This function can be used if the host SDIO/SPI controller has certain
|
||||
* requirements on the data transfer sizes that can be used on the SDIO/SPI bus.
|
||||
*
|
||||
* If the txsize parameter is non-zero, additional padding data should be added
|
||||
* when performing the low level transfer of data buffer of sizes that are not
|
||||
* a multiple of the size_align parameter. See \ref wl_sdio and \ref wl_spi for
|
||||
* more information.
|
||||
*
|
||||
* @param txsize will configure the size alignment for tx data.
|
||||
*
|
||||
*/
|
||||
void wl_conf_alignment(uint8_t txsize);
|
||||
|
||||
|
||||
/*! @} */ /* End wl_transport group */
|
||||
|
||||
|
||||
/** \defgroup wl_custom Custom environment support
|
||||
*
|
||||
* \brief Support for custom environments
|
||||
*
|
||||
* These functions should only be used in cases where the transport library is
|
||||
* not used at all. This usually applies to operating systems and environments
|
||||
* where there already exists a transport layer framework, e.g. linux or
|
||||
* windows.
|
||||
*
|
||||
*
|
||||
|
||||
Note that the \a wl_poll() function is part of the transport library. Therefore,
|
||||
it should not be used in custom environments. Therefore, it is necessary to
|
||||
implement a custom polling or interrupt based scheme to ensure that any
|
||||
incoming packets are processed by the core.
|
||||
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*! \brief Wakeup callback function.
|
||||
*
|
||||
* Invoked when the WiFi device should wake up from power save mode.
|
||||
* This function should send the proper commands to the device.
|
||||
*
|
||||
* Note that this type should only be used in custom environments, where
|
||||
* the transport library is not used.
|
||||
*
|
||||
* @param ctx Opaque context pointer as provided to \a wl_register_wakeup_cb()
|
||||
* that will be passed back to the callback.
|
||||
* @param wakeup indicates whether wakeup should be set or cleared in the
|
||||
* device.
|
||||
*/
|
||||
typedef void (wl_wakeup_cb_t)(void* ctx, uint8_t wakeup);
|
||||
|
||||
/*! \brief Register wakeup callback function.
|
||||
*
|
||||
* Register a function that will be invoked when the WiFi device should wake
|
||||
* up from power save mode.
|
||||
*
|
||||
* Note that this function should only be used in custom environments, where
|
||||
* the transport library is not used.
|
||||
*
|
||||
* @param wakeup_cb Will be invoked when the device should wakeup from sleep
|
||||
* mode.
|
||||
* @param ctx Opaque context pointer that will be passed back to the callback.
|
||||
*/
|
||||
void wl_register_wakeup_cb(wl_wakeup_cb_t *wakeup_cb, void *ctx);
|
||||
|
||||
|
||||
/*! \brief Management tx callback function.
|
||||
*
|
||||
* Invoked when the a management message should be transmitted to the
|
||||
* WiFi device. This function should ensure that the message is passed through
|
||||
* to the device and should never fail.
|
||||
*
|
||||
* Note that this type should only be used in custom environments, where
|
||||
* the transport library is not used.
|
||||
*
|
||||
* @param ctx Opaque context pointer as provided to \a wl_register_mgmt_tx_cb()
|
||||
* that will be passed back to the callback.
|
||||
* @param buf Points to the buffer which holds the management data,
|
||||
* @param len Size of the buffer.
|
||||
*/
|
||||
typedef void (wl_mgmt_tx_cb_t)(void *ctx, const uint8_t *buf, uint16_t len);
|
||||
|
||||
|
||||
/*! \brief Register management tx callback function
|
||||
*
|
||||
* Register a function that will be invoked when a management message should
|
||||
* be transmitted to the device.
|
||||
*
|
||||
* Note that this function should only be used in custom environments, where
|
||||
* the transport library is not used.
|
||||
*
|
||||
* IMPORTANT : In a custom environment without a transport library \a
|
||||
* wl_register_mgmt_tx_cb() \b must have been called
|
||||
* before \a wl_fw_download() is called since \a
|
||||
* wl_fw_download() depends on the \a mgmt_tx_cb() to send
|
||||
* the firmware data to the WiFi chip.
|
||||
*
|
||||
* @param mgmt_tx_cb The callback function to invoke.
|
||||
* @param ctx Opaque context pointer that will be passed back to the callback.
|
||||
*/
|
||||
void wl_register_mgmt_tx_cb(wl_mgmt_tx_cb_t *mgmt_tx_cb, void *ctx);
|
||||
|
||||
|
||||
|
||||
/*! \brief Download the WiFi firmware image to the device.
|
||||
*
|
||||
* This operation will proceed synchronously until the firmware is completely
|
||||
* downloaded. wl_init() should be called after this function has returned to
|
||||
* perform device initialization. This function depends on \a
|
||||
* wl_register_mgmt_tx_cb(). See that function for details.
|
||||
*
|
||||
* @param ctx Opaque context pointer that will be passed to the callbacks
|
||||
* when they are invoked. This parameter is never
|
||||
* accessed by the API.
|
||||
* @param fw_read_cb callback function to invoke during firmware download.
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* - WL_CARD_FAILURE if the wl hardware device is not available
|
||||
* - WL_FIRMWARE_INVALID if the firmware obtained through fw_read_cb is
|
||||
* invalid.
|
||||
* - WL_OOM if the necessary memory could not be allocated.
|
||||
*/
|
||||
wl_err_t wl_fw_download(wl_fw_read_cb_t *fw_read_cb, void *ctx);
|
||||
|
||||
|
||||
|
||||
/*! @} */ /* End wl_custom group */
|
||||
|
||||
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
||||
#ifndef WL_OS_H
|
||||
#define WL_OS_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void *owl_os_alloc(size_t size);
|
||||
void *owl_os_realloc(void *ptr, size_t size);
|
||||
void owl_os_free(void *p);
|
||||
void *owl_os_memcpy(void *dst, const void *src, size_t n);
|
||||
void *owl_os_memset(void *s, int c, size_t n);
|
||||
void *owl_os_memmove(void *dst, const void *src, size_t n);
|
||||
size_t owl_os_strlen(char *s);
|
||||
char *owl_os_strncpy(char *dst, const char *src, size_t n);
|
||||
int owl_os_strncmp(const char *s1, const char *s2, size_t n);
|
||||
int owl_os_strcmp(const char *s1, const char *s2);
|
||||
char *owl_os_strcpy(char *dst, const char *src);
|
||||
char *owl_os_strdup(const char *s);
|
||||
char *owl_os_strndup(const char *s, size_t n);
|
||||
int owl_os_memcmp(const void *s1, const void *s2, size_t n);
|
||||
long int owl_os_strtol(const char *nptr, char **endptr, int base);
|
||||
char *owl_os_strchr(const char *s, int c);
|
||||
char *owl_os_strrchr(const char *s, int c);
|
||||
int owl_os_strcasecmp(const char *s1, const char *s2);
|
||||
char *owl_os_strstr(const char *haystack, const char *needle);
|
||||
|
||||
int owl_os_snprintf(char *str, size_t size, const char *format, ...)
|
||||
__attribute__((format(printf, 3, 4)));
|
||||
|
||||
int owl_os_vprintf(const char *format, va_list arg); /* debug only */
|
||||
int owl_os_printf(const char *format, ...) /* debug only */
|
||||
__attribute__((format(printf, 1, 2)));
|
||||
|
||||
#endif /* WL_OS_H */
|
||||
|
@ -0,0 +1,172 @@
|
||||
/*!
|
||||
* \file wl_sdio.h
|
||||
* \brief SDIO interface for wl_api.
|
||||
* Copyright (C) 2010 HD Wireless AB
|
||||
*
|
||||
* You should have received a copy of the license along with this library.
|
||||
*/
|
||||
|
||||
#ifndef WL_SDIO_H
|
||||
#define WL_SDIO_H
|
||||
|
||||
/** \defgroup wl_sdio SDIO Interface
|
||||
*
|
||||
* These functions implement the interface that the wl_api library
|
||||
* needs to work with a SDIO transport layer.
|
||||
*
|
||||
* The functions prototyped here must be implemented when porting the
|
||||
* wl_api library to a new platform with a different SDIO configuration
|
||||
*
|
||||
* On platforms supported by H&D Wireless these functions are
|
||||
* implemented in the file avr32_sdio.c
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Maximum transfer size. This will set an upper limit on the len parameter
|
||||
* passed to owl_sdio_tx() and owl_sdio_rx().
|
||||
*
|
||||
*/
|
||||
#define MAX_BLOCK_LEN 512
|
||||
|
||||
|
||||
/**
|
||||
* This flag might be set when owl_sdio_cmd() is called in case the cmd will
|
||||
* be followed by a data transfer. If the flag is set, the transfer direction is
|
||||
* from the device to the host (read). Otherwise, the transfer direction is
|
||||
* from the host to the device (write).
|
||||
*
|
||||
*/
|
||||
#define CMD_FLAG_TO_HOST (1 << 0)
|
||||
|
||||
|
||||
/**
|
||||
* Indicates that the sdio driver needs to be polled in order to make
|
||||
* forward progress, i.e. it does not support interrupts
|
||||
*
|
||||
* The actual polling will result in owl_sdio_cmd() being called to
|
||||
* request status information from the device.
|
||||
*
|
||||
* To activate polling, this flag should be set in owl_sdio_init().
|
||||
*/
|
||||
#define SDIO_FLAG_POLL (1 << 0)
|
||||
|
||||
/**
|
||||
* Indicates that the sdio driver only supports 1-bit mode.
|
||||
*
|
||||
* To set 1-bit mode, this flag should be set in owl_sdio_init().
|
||||
*/
|
||||
#define SDIO_FLAG_1BIT_MODE (1 << 1)
|
||||
|
||||
/**
|
||||
* This function will be invoked when wlan initialization should be performed,
|
||||
* this happens when the wl_fw_download() function in the transport group of
|
||||
* wl_api is invoked.
|
||||
*
|
||||
* The wifi device supports sdio high speed mode and clock frequencies up to
|
||||
* 50 MHz.
|
||||
*
|
||||
* The function is responsible for doing any necessary sdio initialization such
|
||||
* as allocating gpio's, setting up the mci master, one time allocations of
|
||||
* dma buffers etc.
|
||||
*
|
||||
* @param flags is an out parameter that should hold any sdio flags upon return.
|
||||
* The avaible flags are prefixed with SDIO_FLAG_
|
||||
*
|
||||
*
|
||||
*/
|
||||
void owl_sdio_init(uint8_t *flags);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function will be invoked when an sdio cmd should be sent to the
|
||||
* device.
|
||||
*
|
||||
* @param idx is the sdio command number
|
||||
* @param arg is the sdio command argument
|
||||
* @param flags specifies other options, such as any transfer direction.
|
||||
* @param rsp should hold the command response upon return. If null, the
|
||||
* response can be ignored.
|
||||
* @param data holds a pointer to any data that might follow the command. This
|
||||
* allows the sdio driver to setup dma transfers while waiting for the
|
||||
* command response. NULL if no data transfer will follow. Note that
|
||||
* the same data pointer will be passed to owl_sdio_tx(), which should
|
||||
* start the actual transfer.
|
||||
* @param len is the length of the data buffer.
|
||||
*
|
||||
*/
|
||||
void owl_sdio_cmd(uint8_t idx, uint32_t arg, uint8_t flags, uint32_t *rsp,
|
||||
const uint8_t *data, uint16_t len);
|
||||
|
||||
|
||||
/**
|
||||
* This function will be invoked when data should be transmitted to the device.
|
||||
*
|
||||
* If wl_fw_downlad() was called with the size_align parameter set to non-zero,
|
||||
* the pad parameter should be used. If the pad parameter is not 0, additional
|
||||
* data must be transmitted after the data buffer has be sent. Depending on
|
||||
* how the data buffer was first allocated (probably by an TCP/IP stack), it
|
||||
* might be safe or unsafe to continue reading beyond the data buffer to
|
||||
* transmit the additional padding bytes.
|
||||
*
|
||||
* @param data holds a pointer to the data to transmit, the pointer is the
|
||||
* same as the one passed to wl_tx().
|
||||
* @param len is the number of bytes that should be transmitted, including
|
||||
* padding.
|
||||
* @param pad is the number of padding bytes to send.
|
||||
*
|
||||
*/
|
||||
void owl_sdio_tx(const uint8_t *data, uint16_t len, uint8_t pad);
|
||||
|
||||
|
||||
/**
|
||||
* This function will be invoked when data should be received from the device.
|
||||
*
|
||||
* @param data should hold the read data upon return.
|
||||
* @param len is the number of bytes to read.
|
||||
*
|
||||
*/
|
||||
void owl_sdio_rx(uint8_t *data, uint16_t len);
|
||||
|
||||
|
||||
/**
|
||||
* Invoked when sdio rx interrupts from the device should be enabled or
|
||||
* disabled.
|
||||
*
|
||||
* If SDIO_FLAG_POLL was set in wl_spi_init(), then this function can be
|
||||
* left empty.
|
||||
*
|
||||
* @param enable specifies if interrupts should be enabled or disabled.
|
||||
*
|
||||
*/
|
||||
void owl_sdio_irq(uint8_t enable);
|
||||
|
||||
|
||||
/**
|
||||
* Delay executiom for the specified number of ms. This function will be called
|
||||
* with delays in the 10-20 ms range during fw download and startup of the
|
||||
* Wi-Fi device. This function can be implemented with a simple for-loop if
|
||||
* desired (beware of optimization). The timing does not have to be accurate as
|
||||
* long as the actual delay becomes at least the specified number of ms.
|
||||
*
|
||||
* @param ms is the minimal amount of time to wait [ms].
|
||||
*
|
||||
*/
|
||||
void owl_sdio_mdelay(uint32_t ms);
|
||||
|
||||
|
||||
/**
|
||||
* This function should be called whenever an interrupt is detected. It can
|
||||
* be called from an interrupt context.
|
||||
*
|
||||
* If SDIO_FLAG_POLL was set in owl_sdio_init(), then wl_sdio_irq()
|
||||
* should never be called.
|
||||
*
|
||||
*/
|
||||
extern void wl_sdio_irq(void);
|
||||
|
||||
/*! @} */
|
||||
|
||||
#endif
|
@ -0,0 +1,185 @@
|
||||
/*!
|
||||
* \file wl_spi.h
|
||||
* \brief SPI interface for wl_api.
|
||||
* Copyright (C) 2010 HD Wireless AB
|
||||
*
|
||||
* You should have received a copy of the license along with this library.
|
||||
*/
|
||||
|
||||
#ifndef WL_SPI_H
|
||||
#define WL_SPI_H
|
||||
|
||||
#ifndef WITHOUT_STDINT
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
/** \defgroup wl_spi SPI Interface
|
||||
*
|
||||
* These functions implement the interface that the wl_api library
|
||||
* needs to work with a SPI transport layer.
|
||||
*
|
||||
* The functions prototyped here must be implemented when porting the
|
||||
* wl_api library to a new platform with a different SPI configuration
|
||||
*
|
||||
* On platforms supported by H&D Wireless these functions are
|
||||
* implemented in the file avr32_spi.c
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Maximum transfer size. This will set an upper limit on the len parameter
|
||||
* passed to owl_spi_txrx().
|
||||
*
|
||||
*
|
||||
*/
|
||||
#define MAX_BLOCK_LEN 512
|
||||
|
||||
|
||||
/**
|
||||
* Indicates that the spi driver needs to be polled in order to make
|
||||
* forward progress, i.e. it does not support interrupts through SD pin 8.
|
||||
*
|
||||
* The actual polling will result in owl_spi_txrx() being call to
|
||||
* request status information from the device.
|
||||
*
|
||||
* To activate polling, this flag should be set in owl_spi_init().
|
||||
*
|
||||
* See wl_poll() and wl_register_rx_isr() for more information regarding
|
||||
* polled and interrupt modes.
|
||||
*
|
||||
*/
|
||||
#define SPI_FLAG_POLL (1 << 0)
|
||||
|
||||
|
||||
/**
|
||||
* This function will be invoked when wlan device initialization should be
|
||||
* performed, this happens when the wl_fw_download() function in the transport
|
||||
* group of wl_api is invoked.
|
||||
*
|
||||
* The wifi device requires spi mode 3, i.e. clock polarity high and sample
|
||||
* on second phase. This corresponds to CPOL=1, CPHA=1. Maximum frequency on
|
||||
* spi clock is 30 MHz.
|
||||
*
|
||||
* The function is also responsible for doing any necessary spi initialization
|
||||
* such as allocating gpio's, setting up the SPI master, one time allocations of
|
||||
* dma buffers etc.
|
||||
*
|
||||
*
|
||||
* If the SPB105 device is used, two signals; POWER (pin 10 on SPB105) and
|
||||
* SHUTDOWN (pin 4 on SPB105) might be connected to gpio's on the host.
|
||||
* The GPIO_POWER_PIN is the main power supply to the device. The
|
||||
* GPIO_SHUTDOWN_PIN (active low) should be defined as an input.
|
||||
*
|
||||
* After GPIO_POWER_PIN is pulled high by the host, the device will pull the
|
||||
* GPIO_SHUTDOWN_PIN high once the device is properly powered.
|
||||
*
|
||||
* However, if pin 4 (GPIO_SHUTDOWN_PIN) is not connected to the host, a delay
|
||||
* of up to 250 ms must be added after GPIO_POWER_PIN is pulled high to ensure
|
||||
* that startup is completed. The actual time is usually much shorter, therefore
|
||||
* one might try to reduce the delay for a particualar hardware design.
|
||||
*
|
||||
* On SPB104, the GPIO_POWER_PIN will be connected to VCC and GPIO_SHUTDOWN_PIN
|
||||
* will be unconnected; hence we have to make sure that we have enough delay
|
||||
* after powering on the host. Since the device power-on usually happens at the
|
||||
* same time as the host power-on, the startup time of the host can be
|
||||
* subtracted from any delay put into owl_spi_init().
|
||||
*
|
||||
* @param flags is an out parameter that should hold any spi flags upon return.
|
||||
* The avaible flags are prefixed with SPI_FLAG_
|
||||
*
|
||||
* @return 0 on success
|
||||
* -1 if any error occurs
|
||||
*
|
||||
*/
|
||||
int owl_spi_init(uint8_t *flags);
|
||||
|
||||
|
||||
/**
|
||||
* Invoked when a spi transfer should be performed.
|
||||
*
|
||||
* All buffers that are allocated by the wl library will have a size that is
|
||||
* aligned to 4. If size-unaligned data is passed to this function, it is
|
||||
* always allocated by the ip stack. If 4-byte size alignment (e.g. for DMA)
|
||||
* is required, 1-3 extra padding bytes can be transmitted after the in buffer.
|
||||
* These bytes must be 0xff.
|
||||
*
|
||||
* Since size-unaligned data always comes from the ip stack, the out ptr is
|
||||
* always NULL for such data.
|
||||
*
|
||||
* @param in points a buffer which holds the data to be transmitted. If NULL,
|
||||
* then \a len bytes with the value 0xff should be transmitted on the
|
||||
* bus.
|
||||
* @param out points a buffer should hold the data received from the device. If
|
||||
* NULL, any received data can be discarded.
|
||||
* @param len is the length of the in and out buffers.
|
||||
*
|
||||
*/
|
||||
void owl_spi_txrx(const uint8_t *in, uint8_t* out, uint16_t len);
|
||||
|
||||
|
||||
/**
|
||||
* Invoked when spi rx interrupts from the device should be enabled or disabled.
|
||||
* Note that the spi interrupts are obtained from pin 8 on SPB104 or pin 3 from
|
||||
* SPB105. This pin can be be connected to a gpio on the host. The irq line
|
||||
* will signal an interrupt on both edges.
|
||||
*
|
||||
* In general, the wifi device will not issue a new interrupt unless the
|
||||
* last interrupt has been handled. Also, during normal operation (i.e after
|
||||
* the complete callback registered in wl_init() has been invoked),
|
||||
* owl_spi_irq() will never be invoked so interrupts will be enabled all
|
||||
* the time. For the SPI-mode, the purpose of owl_spi_irq() is basically to
|
||||
* make sure that the first interrupt (coming after the reset performed in
|
||||
* owl_spi_init()) is ignored.
|
||||
*
|
||||
* If SPI_FLAG_POLL was set in owl_spi_init(), then this function can be
|
||||
* left empty and the wifi device will be used in polled mode. In polled mode,
|
||||
* the interrupt line is not used. Regardless of polled or interrupt-mode,
|
||||
* wl_poll() must be called to ensure progress of the driver.
|
||||
*
|
||||
* @param enable specifies if interrupts should be enabled or disabled.
|
||||
*
|
||||
*/
|
||||
void owl_spi_irq(uint8_t enable);
|
||||
|
||||
|
||||
/**
|
||||
* Invoked when the spi cs for the wifi device should be enabled. Note that
|
||||
* multiple calls to owl_spi_txrx() might be done during a 'single' chip
|
||||
* select.
|
||||
*
|
||||
* @param enable specifies whether chip select should be asserted or deasserted,
|
||||
* The chip select signal is active low, so if enable is '1' then the
|
||||
* chip select connected to the wifi device should be set to '0'.
|
||||
*
|
||||
*/
|
||||
void owl_spi_cs(uint8_t enable);
|
||||
|
||||
|
||||
/**
|
||||
* Delay executiom for the specified number of ms. This function will be called
|
||||
* with delays in the 10-20 ms range during fw download and startup of the
|
||||
* Wi-Fi device. This function can be implemented with a simple for-loop if
|
||||
* desired (beware of optimization). The timing does not have to be accurate as
|
||||
* long as the actual delay becomes at least the specified number of ms.
|
||||
*
|
||||
* @param ms is the minimal amount of time to wait [ms].
|
||||
*
|
||||
*/
|
||||
void owl_spi_mdelay(uint32_t ms);
|
||||
|
||||
|
||||
/**
|
||||
* This function should be called whenever an interrupt is detected. It can
|
||||
* be called from an interrupt context.
|
||||
*
|
||||
* If SPI_FLAG_POLL was set in owl_spi_init(), then wl_spi_irq()
|
||||
* should never be called.
|
||||
*
|
||||
*/
|
||||
extern void wl_spi_irq(void);
|
||||
|
||||
|
||||
/*! @} */
|
||||
|
||||
#endif
|
@ -0,0 +1,154 @@
|
||||
/*
|
||||
* Programming interface for wlap_api.
|
||||
* Copyright (C) 2011 HD Wireless AB
|
||||
*
|
||||
* You should have received a copy of the license along with this library.
|
||||
*/
|
||||
|
||||
/*! \file wlap_api.h *************************************************************
|
||||
*
|
||||
* \brief WiFi AP API
|
||||
*
|
||||
* This file provides the wlap_api interface.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices:
|
||||
* \li SPB104 + EVK1100
|
||||
* \li SPB104 + EVK1101
|
||||
* \li SPB104 + EVK1104
|
||||
* \li SPB104 + EVK1105 (SPI)
|
||||
* \li SPB104 + EVK1105 (SPI + irq)
|
||||
* \li SPB105 + EVK1105 (SPI)
|
||||
* - AppNote:
|
||||
*
|
||||
* \author H&D Wireless AB: \n
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* \section intro Introduction
|
||||
* This is the documentation for the WiFi AP Driver API \a wlap_api.
|
||||
*
|
||||
* \section files Main Files
|
||||
* - wlap_api.h : WiFi driver interface.
|
||||
* - libwlap_api_*.*.a - Driver library.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WLAP_API_H
|
||||
#define WLAP_API_H
|
||||
|
||||
#define WLAP_API_RELEASE_NAME "unknown"
|
||||
|
||||
#include <wl_api.h>
|
||||
|
||||
/** \defgroup wl_softap Access Point Mode
|
||||
*
|
||||
* \brief Support the WiFi Access Point mode.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/*
|
||||
* Station representation
|
||||
*
|
||||
*/
|
||||
struct wl_sta_t
|
||||
{
|
||||
struct wl_mac_addr_t bssid; /**< The BSSID of the network. */
|
||||
uint8_t queued_pkt_cnt; /**< Number of queueud packets for
|
||||
this STA. */
|
||||
uint8_t in_ps; /**< Is the STA in power save mode. */
|
||||
uint8_t aid; /**< STA AID */
|
||||
};
|
||||
|
||||
/* Station list representation. Array of pointers to wl_sta_t entries. */
|
||||
struct wl_sta_list_t
|
||||
{
|
||||
struct wl_sta_t **sta; /**< The list of pointers to stations */
|
||||
size_t cnt; /**< Number of stations */
|
||||
};
|
||||
|
||||
/*! \brief Get the list of currently associated stations (SoftAP).
|
||||
*
|
||||
* Retrieves the list of current stations from
|
||||
* the driver.
|
||||
*
|
||||
* This function is not thread safe. It must be called in the
|
||||
* same execution context as wl_poll().
|
||||
*
|
||||
* @param network_list Output buffer. The API call returns
|
||||
* a pointer to allocated memory containing the network list.
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wlap_get_sta_list(struct wl_sta_list_t **network_list);
|
||||
|
||||
|
||||
/*! Callback used to read data from a TX packet.
|
||||
* This function is supplied by the user of the API.
|
||||
*
|
||||
* @param dst Destination buffer. The data should be copied
|
||||
* to this buffer.
|
||||
* @param src_handle Handle to the source packet from where
|
||||
* the data should be copied. This handle is the same one that
|
||||
* is passed in parameter \a pkt_handle to \a wl_process_tx().
|
||||
* @param read_len Number of bytes to copy from \a src_handle
|
||||
* to \a dst.
|
||||
* @param offset The offset in bytes, counting from the
|
||||
* beginning of the Ethernet header, from where to copy data.
|
||||
* @return
|
||||
* - The number of bytes copied. This number may be smaller
|
||||
* than the length requested in \a read_len but it may not
|
||||
* be shorter than the length of the packet counting from
|
||||
* \a offset. In other words, if the caller of this function
|
||||
* receives a return count that is shorter than \a read_len
|
||||
* he will assume that all packet data has been read.
|
||||
* - < 0 on error.
|
||||
*/
|
||||
typedef ssize_t (*wl_pkt_read_cb_t)(char *dst,
|
||||
void *src_handle,
|
||||
size_t read_len,
|
||||
int offset);
|
||||
|
||||
/*! \brief Register a data access function for TX packets (SoftAP).
|
||||
*
|
||||
* When a TX data packet has a different representation than a single
|
||||
* contiguous buffer in memory then a packet read function must be
|
||||
* implemented and registered with this call. Whenever the library
|
||||
* needs to read packet data it will call this function to do it.
|
||||
*
|
||||
* This function can be ignored if the TX packet representation is
|
||||
* a single contiguous buffer. This function is only needed in SoftAP
|
||||
* mode.
|
||||
*
|
||||
* @param pkt_read_cb Read callback.
|
||||
* @param ctx Context
|
||||
*/
|
||||
void wl_register_pkt_read_cb(wl_pkt_read_cb_t pkt_read_cb);
|
||||
|
||||
/*! \brief Start a network using the SoftAP mode.
|
||||
*
|
||||
* This call will cause the WiFi chip to start sending beacons
|
||||
* and accept associations from WiFi stations.
|
||||
*
|
||||
*/
|
||||
wl_err_t wlap_start_ap(const char *ssid,
|
||||
const size_t ssid_len,
|
||||
const uint8_t channel,
|
||||
const enum wl_auth_mode auth_mode,
|
||||
const enum wl_enc_type enc_type);
|
||||
|
||||
/*! \brief Disconnect a STA (SoftAP)
|
||||
*
|
||||
* @param bssid The BSSID of the station to disconnect.
|
||||
* @return
|
||||
* - WL_SUCCESS
|
||||
* - WL_FAILURE.
|
||||
*/
|
||||
wl_err_t wlap_disconnect_sta(const struct wl_mac_addr_t bssid);
|
||||
|
||||
|
||||
/*! @} */ /* End wl_softap group */
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,309 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file has been prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Cycle counter driver.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32UC devices.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CYCLE_COUNTER_H_
|
||||
#define _CYCLE_COUNTER_H_
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
|
||||
//! Structure holding private information, automatically initialized by the
|
||||
//! cpu_set_timeout() function.
|
||||
typedef struct
|
||||
{
|
||||
//! The cycle count at the begining of the timeout.
|
||||
unsigned long delay_start_cycle;
|
||||
|
||||
//! The cycle count at the end of the timeout.
|
||||
unsigned long delay_end_cycle;
|
||||
|
||||
//! Enable/disable the timout detection
|
||||
unsigned char timer_state;
|
||||
#define CPU_TIMER_STATE_STARTED 0
|
||||
#define CPU_TIMER_STATE_REACHED 1
|
||||
#define CPU_TIMER_STATE_STOPPED 2
|
||||
} t_cpu_time;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Convert milli-seconds into CPU cycles.
|
||||
*
|
||||
* \param ms: Number of millisecond.
|
||||
* \param fcpu_hz: CPU frequency in Hz.
|
||||
*
|
||||
* \return the converted number of CPU cycles.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ U32 cpu_ms_2_cy(unsigned long ms, unsigned long fcpu_hz)
|
||||
{
|
||||
return ((unsigned long long)ms * fcpu_hz + 999) / 1000;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Convert micro-seconds into CPU cycles.
|
||||
*
|
||||
* \param us: Number of microsecond.
|
||||
* \param fcpu_hz: CPU frequency in Hz.
|
||||
*
|
||||
* \return the converted number of CPU cycles.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ U32 cpu_us_2_cy(unsigned long us, unsigned long fcpu_hz)
|
||||
{
|
||||
return ((unsigned long long)us * fcpu_hz + 999999) / 1000000;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Convert CPU cycles into milli-seconds.
|
||||
*
|
||||
* \param cy: Number of CPU cycles.
|
||||
* \param fcpu_hz: CPU frequency in Hz.
|
||||
*
|
||||
* \return the converted number of milli-second.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ U32 cpu_cy_2_ms(unsigned long cy, unsigned long fcpu_hz)
|
||||
{
|
||||
return ((unsigned long long)cy * 1000 + fcpu_hz-1) / fcpu_hz;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Convert CPU cycles into micro-seconds.
|
||||
*
|
||||
* \param cy: Number of CPU cycles.
|
||||
* \param fcpu_hz: CPU frequency in Hz.
|
||||
*
|
||||
* \return the converted number of micro-second.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ U32 cpu_cy_2_us(unsigned long cy, unsigned long fcpu_hz)
|
||||
{
|
||||
return ((unsigned long long)cy * 1000000 + fcpu_hz-1) / fcpu_hz;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set a timer variable.
|
||||
*
|
||||
* Ex: t_cpu_time timer;
|
||||
* cpu_set_timeout( cpu_ms_2_cy(10, FOSC0), &timer ); // timeout in 10 ms
|
||||
* if( cpu_is_timeout(&timer) )
|
||||
* cpu_stop_timeout(&timer);
|
||||
* ../..
|
||||
*
|
||||
* \param delay: (input) delay in CPU cycles before timeout.
|
||||
* \param cpu_time: (output) internal information used by the timer API.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void cpu_set_timeout(unsigned long delay, t_cpu_time *cpu_time)
|
||||
{
|
||||
cpu_time->delay_start_cycle = Get_system_register(AVR32_COUNT);
|
||||
cpu_time->delay_end_cycle = cpu_time->delay_start_cycle + delay;
|
||||
cpu_time->timer_state = CPU_TIMER_STATE_STARTED;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Test if a timer variable reached its timeout.
|
||||
*
|
||||
* Once the timeout is reached, the function will always return TRUE,
|
||||
* until the cpu_stop_timeout() function is called.
|
||||
*
|
||||
* Ex: t_cpu_time timer;
|
||||
* cpu_set_timeout( 10, FOSC0, &timer ); // timeout in 10 ms
|
||||
* if( cpu_is_timeout(&timer) )
|
||||
* cpu_stop_timeout(&timer);
|
||||
* ../..
|
||||
*
|
||||
* \param cpu_time: (input) internal information used by the timer API.
|
||||
*
|
||||
* \return TRUE if timeout occured, otherwise FALSE.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ unsigned long cpu_is_timeout(t_cpu_time *cpu_time)
|
||||
{
|
||||
unsigned long current_cycle_count = Get_system_register(AVR32_COUNT);
|
||||
|
||||
if( cpu_time->timer_state==CPU_TIMER_STATE_STOPPED )
|
||||
return FALSE;
|
||||
|
||||
// Test if the timeout as already occured.
|
||||
else if (cpu_time->timer_state == CPU_TIMER_STATE_REACHED)
|
||||
return TRUE;
|
||||
|
||||
// If the ending cycle count of this timeout is wrapped, ...
|
||||
else if (cpu_time->delay_start_cycle > cpu_time->delay_end_cycle)
|
||||
{
|
||||
if (current_cycle_count < cpu_time->delay_start_cycle && current_cycle_count > cpu_time->delay_end_cycle)
|
||||
{
|
||||
cpu_time->timer_state = CPU_TIMER_STATE_REACHED;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (current_cycle_count < cpu_time->delay_start_cycle || current_cycle_count > cpu_time->delay_end_cycle)
|
||||
{
|
||||
cpu_time->timer_state = CPU_TIMER_STATE_REACHED;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Stop a timeout detection.
|
||||
*
|
||||
* Ex: t_cpu_time timer;
|
||||
* cpu_set_timeout( 10, FOSC0, &timer ); // timeout in 10 ms
|
||||
* if( cpu_is_timeout(&timer) )
|
||||
* cpu_stop_timeout(&timer);
|
||||
* ../..
|
||||
*
|
||||
* \param cpu_time: (input) internal information used by the timer API.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void cpu_stop_timeout(t_cpu_time *cpu_time)
|
||||
{
|
||||
cpu_time->timer_state = CPU_TIMER_STATE_STOPPED;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Test if a timer is stopped.
|
||||
*
|
||||
* \param cpu_time: (input) internal information used by the timer API.
|
||||
*
|
||||
* \return TRUE if timer is stopped, otherwise FALSE.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ unsigned long cpu_is_timer_stopped(t_cpu_time *cpu_time)
|
||||
{
|
||||
|
||||
if( cpu_time->timer_state==CPU_TIMER_STATE_STOPPED )
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Waits during at least the specified delay (in millisecond) before returning.
|
||||
*
|
||||
* \param delay: Number of millisecond to wait.
|
||||
* \param fcpu_hz: CPU frequency in Hz.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void cpu_delay_ms(unsigned long delay, unsigned long fcpu_hz)
|
||||
{
|
||||
t_cpu_time timer;
|
||||
cpu_set_timeout( cpu_ms_2_cy(delay, fcpu_hz), &timer);
|
||||
while( !cpu_is_timeout(&timer) );
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Waits during at least the specified delay (in microsecond) before returning.
|
||||
*
|
||||
* \param delay: Number of microsecond to wait.
|
||||
* \param fcpu_hz: CPU frequency in Hz.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void cpu_delay_us(unsigned long delay, unsigned long fcpu_hz)
|
||||
{
|
||||
t_cpu_time timer;
|
||||
cpu_set_timeout( cpu_us_2_cy(delay, fcpu_hz), &timer);
|
||||
while( !cpu_is_timeout(&timer) );
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Waits during at least the specified delay (in CPU cycles) before returning.
|
||||
*
|
||||
* \param delay: Number of CPU cycles to wait.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void cpu_delay_cy(unsigned long delay)
|
||||
{
|
||||
t_cpu_time timer;
|
||||
cpu_set_timeout( delay, &timer);
|
||||
while( !cpu_is_timeout(&timer) );
|
||||
}
|
||||
|
||||
|
||||
#define Get_sys_count() ( Get_system_register(AVR32_COUNT) )
|
||||
#define Set_sys_count(x) ( Set_system_register(AVR32_COUNT, (x)) )
|
||||
#define Get_sys_compare() ( Get_system_register(AVR32_COMPARE) )
|
||||
#define Set_sys_compare(x) ( Set_system_register(AVR32_COMPARE, (x)) )
|
||||
|
||||
|
||||
#endif // _CYCLE_COUNTER_H_
|
@ -0,0 +1,995 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief SMC on EBI driver for AVR32 UC3.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with a SMC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include "compiler.h"
|
||||
#include "preprocessor.h"
|
||||
#include "gpio.h"
|
||||
#include "smc.h"
|
||||
|
||||
// Configure the SM Controller with SM setup and timing information for all chip select
|
||||
#define SMC_CS_SETUP(ncs) { \
|
||||
U32 nwe_setup = ((NWE_SETUP * hsb_mhz_up + 999) / 1000); \
|
||||
U32 ncs_wr_setup = ((NCS_WR_SETUP * hsb_mhz_up + 999) / 1000); \
|
||||
U32 nrd_setup = ((NRD_SETUP * hsb_mhz_up + 999) / 1000); \
|
||||
U32 ncs_rd_setup = ((NCS_RD_SETUP * hsb_mhz_up + 999) / 1000); \
|
||||
U32 nwe_pulse = ((NWE_PULSE * hsb_mhz_up + 999) / 1000); \
|
||||
U32 ncs_wr_pulse = ((NCS_WR_PULSE * hsb_mhz_up + 999) / 1000); \
|
||||
U32 nrd_pulse = ((NRD_PULSE * hsb_mhz_up + 999) / 1000); \
|
||||
U32 ncs_rd_pulse = ((NCS_RD_PULSE * hsb_mhz_up + 999) / 1000); \
|
||||
U32 nwe_cycle = ((NWE_CYCLE * hsb_mhz_up + 999) / 1000); \
|
||||
U32 nrd_cycle = ((NRD_CYCLE * hsb_mhz_up + 999) / 1000); \
|
||||
\
|
||||
/* Some coherence checks... */ \
|
||||
/* Ensures CS is active during Rd or Wr */ \
|
||||
if( ncs_rd_setup + ncs_rd_pulse < nrd_setup + nrd_pulse ) \
|
||||
ncs_rd_pulse = nrd_setup + nrd_pulse - ncs_rd_setup; \
|
||||
if( ncs_wr_setup + ncs_wr_pulse < nwe_setup + nwe_pulse ) \
|
||||
ncs_wr_pulse = nwe_setup + nwe_pulse - ncs_wr_setup; \
|
||||
\
|
||||
/* ncs_hold = n_cycle - ncs_setup - ncs_pulse */ \
|
||||
/* n_hold = n_cycle - n_setup - n_pulse */ \
|
||||
/* */ \
|
||||
/* All holds parameters must be positive or null, so: */ \
|
||||
/* nwe_cycle shall be >= ncs_wr_setup + ncs_wr_pulse */ \
|
||||
if( nwe_cycle < ncs_wr_setup + ncs_wr_pulse ) \
|
||||
nwe_cycle = ncs_wr_setup + ncs_wr_pulse; \
|
||||
\
|
||||
/* nwe_cycle shall be >= nwe_setup + nwe_pulse */ \
|
||||
if( nwe_cycle < nwe_setup + nwe_pulse ) \
|
||||
nwe_cycle = nwe_setup + nwe_pulse; \
|
||||
\
|
||||
/* nrd_cycle shall be >= ncs_rd_setup + ncs_rd_pulse */ \
|
||||
if( nrd_cycle < ncs_rd_setup + ncs_rd_pulse ) \
|
||||
nrd_cycle = ncs_rd_setup + ncs_rd_pulse; \
|
||||
\
|
||||
/* nrd_cycle shall be >= nrd_setup + nrd_pulse */ \
|
||||
if( nrd_cycle < nrd_setup + nrd_pulse ) \
|
||||
nrd_cycle = nrd_setup + nrd_pulse; \
|
||||
\
|
||||
AVR32_SMC.cs[ncs].setup = (nwe_setup << AVR32_SMC_SETUP0_NWE_SETUP_OFFSET) | \
|
||||
(ncs_wr_setup << AVR32_SMC_SETUP0_NCS_WR_SETUP_OFFSET) | \
|
||||
(nrd_setup << AVR32_SMC_SETUP0_NRD_SETUP_OFFSET) | \
|
||||
(ncs_rd_setup << AVR32_SMC_SETUP0_NCS_RD_SETUP_OFFSET); \
|
||||
AVR32_SMC.cs[ncs].pulse = (nwe_pulse << AVR32_SMC_PULSE0_NWE_PULSE_OFFSET) | \
|
||||
(ncs_wr_pulse << AVR32_SMC_PULSE0_NCS_WR_PULSE_OFFSET) | \
|
||||
(nrd_pulse << AVR32_SMC_PULSE0_NRD_PULSE_OFFSET) | \
|
||||
(ncs_rd_pulse << AVR32_SMC_PULSE0_NCS_RD_PULSE_OFFSET); \
|
||||
AVR32_SMC.cs[ncs].cycle = (nwe_cycle << AVR32_SMC_CYCLE0_NWE_CYCLE_OFFSET) | \
|
||||
(nrd_cycle << AVR32_SMC_CYCLE0_NRD_CYCLE_OFFSET); \
|
||||
AVR32_SMC.cs[ncs].mode = (((NCS_CONTROLLED_READ) ? AVR32_SMC_MODE0_READ_MODE_NCS_CONTROLLED : \
|
||||
AVR32_SMC_MODE0_READ_MODE_NRD_CONTROLLED) << AVR32_SMC_MODE0_READ_MODE_OFFSET) | \
|
||||
+ (((NCS_CONTROLLED_WRITE) ? AVR32_SMC_MODE0_WRITE_MODE_NCS_CONTROLLED : \
|
||||
AVR32_SMC_MODE0_WRITE_MODE_NWE_CONTROLLED) << AVR32_SMC_MODE0_WRITE_MODE_OFFSET) | \
|
||||
(NWAIT_MODE << AVR32_SMC_MODE0_EXNW_MODE_OFFSET) | \
|
||||
(((SMC_8_BIT_CHIPS) ? AVR32_SMC_MODE0_BAT_BYTE_WRITE : \
|
||||
AVR32_SMC_MODE0_BAT_BYTE_SELECT) << AVR32_SMC_MODE0_BAT_OFFSET) | \
|
||||
(((SMC_DBW <= 8 ) ? AVR32_SMC_MODE0_DBW_8_BITS : \
|
||||
(SMC_DBW <= 16) ? AVR32_SMC_MODE0_DBW_16_BITS : \
|
||||
AVR32_SMC_MODE0_DBW_32_BITS) << AVR32_SMC_MODE0_DBW_OFFSET) | \
|
||||
(TDF_CYCLES << AVR32_SMC_MODE0_TDF_CYCLES_OFFSET) | \
|
||||
(TDF_OPTIM << AVR32_SMC_MODE0_TDF_MODE_OFFSET) | \
|
||||
(PAGE_MODE << AVR32_SMC_MODE0_PMEN_OFFSET) | \
|
||||
(PAGE_SIZE << AVR32_SMC_MODE0_PS_OFFSET); \
|
||||
smc_tab_cs_size[ncs] = (U8)EXT_SM_SIZE; \
|
||||
}
|
||||
|
||||
static U8 smc_tab_cs_size[6];
|
||||
|
||||
static void smc_enable_muxed_pins(void);
|
||||
|
||||
|
||||
void smc_init(unsigned long hsb_hz)
|
||||
{
|
||||
unsigned long hsb_mhz_up = (hsb_hz + 999999) / 1000000;
|
||||
|
||||
//! Whether to use the NCS0 pin
|
||||
#ifdef SMC_USE_NCS0
|
||||
#include SMC_COMPONENT_CS0
|
||||
|
||||
// Setup SMC for NCS0
|
||||
SMC_CS_SETUP(0)
|
||||
|
||||
#ifdef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW_GLOBAL < SMC_DBW)
|
||||
#undef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS_GLOBAL < SMC_8_BIT)
|
||||
#undef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE_GLOBAL < NWAIT_MODE)
|
||||
#undef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef EXT_SM_SIZE
|
||||
#undef SMC_DBW
|
||||
#undef SMC_8_BIT_CHIPS
|
||||
#undef NWE_SETUP
|
||||
#undef NCS_WR_SETUP
|
||||
#undef NRD_SETUP
|
||||
#undef NCS_RD_SETUP
|
||||
#undef NCS_WR_PULSE
|
||||
#undef NWE_PULSE
|
||||
#undef NCS_RD_PULSE
|
||||
#undef NRD_PULSE
|
||||
#undef NCS_WR_HOLD
|
||||
#undef NWE_HOLD
|
||||
#undef NWE_CYCLE
|
||||
#undef NCS_RD_HOLD
|
||||
#undef NRD_CYCLE
|
||||
#undef TDF_CYCLES
|
||||
#undef TDF_OPTIM
|
||||
#undef PAGE_MODE
|
||||
#undef PAGE_SIZE
|
||||
#undef NCS_CONTROLLED_READ
|
||||
#undef NCS_CONTROLLED_WRITE
|
||||
#undef NWAIT_MODE
|
||||
#endif
|
||||
|
||||
|
||||
//! Whether to use the NCS1 pin
|
||||
#ifdef SMC_USE_NCS1
|
||||
#include SMC_COMPONENT_CS1
|
||||
|
||||
// Enable SM mode for CS1 if necessary.
|
||||
AVR32_HMATRIX.sfr[AVR32_EBI_HMATRIX_NR] &= ~(1 << AVR32_EBI_SDRAM_CS);
|
||||
AVR32_HMATRIX.sfr[AVR32_EBI_HMATRIX_NR];
|
||||
|
||||
// Setup SMC for NCS1
|
||||
SMC_CS_SETUP(1)
|
||||
|
||||
#ifdef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW_GLOBAL < SMC_DBW)
|
||||
#undef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS_GLOBAL < SMC_8_BIT)
|
||||
#undef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE_GLOBAL < NWAIT_MODE)
|
||||
#undef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef EXT_SM_SIZE
|
||||
#undef SMC_DBW
|
||||
#undef SMC_8_BIT_CHIPS
|
||||
#undef NWE_SETUP
|
||||
#undef NCS_WR_SETUP
|
||||
#undef NRD_SETUP
|
||||
#undef NCS_RD_SETUP
|
||||
#undef NCS_WR_PULSE
|
||||
#undef NWE_PULSE
|
||||
#undef NCS_RD_PULSE
|
||||
#undef NRD_PULSE
|
||||
#undef NCS_WR_HOLD
|
||||
#undef NWE_HOLD
|
||||
#undef NWE_CYCLE
|
||||
#undef NCS_RD_HOLD
|
||||
#undef NRD_CYCLE
|
||||
#undef TDF_CYCLES
|
||||
#undef TDF_OPTIM
|
||||
#undef PAGE_MODE
|
||||
#undef PAGE_SIZE
|
||||
#undef NCS_CONTROLLED_READ
|
||||
#undef NCS_CONTROLLED_WRITE
|
||||
#undef NWAIT_MODE
|
||||
#endif
|
||||
|
||||
//! Whether to use the NCS2 pin
|
||||
#ifdef SMC_USE_NCS2
|
||||
#include SMC_COMPONENT_CS2
|
||||
|
||||
// Setup SMC for NCS2
|
||||
SMC_CS_SETUP(2)
|
||||
|
||||
#ifdef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW_GLOBAL < SMC_DBW)
|
||||
#undef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS_GLOBAL < SMC_8_BIT)
|
||||
#undef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE_GLOBAL < NWAIT_MODE)
|
||||
#undef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#undef EXT_SM_SIZE
|
||||
#undef SMC_DBW
|
||||
#undef SMC_8_BIT_CHIPS
|
||||
#undef NWE_SETUP
|
||||
#undef NCS_WR_SETUP
|
||||
#undef NRD_SETUP
|
||||
#undef NCS_RD_SETUP
|
||||
#undef NCS_WR_PULSE
|
||||
#undef NWE_PULSE
|
||||
#undef NCS_RD_PULSE
|
||||
#undef NRD_PULSE
|
||||
#undef NCS_WR_HOLD
|
||||
#undef NWE_HOLD
|
||||
#undef NWE_CYCLE
|
||||
#undef NCS_RD_HOLD
|
||||
#undef NRD_CYCLE
|
||||
#undef TDF_CYCLES
|
||||
#undef TDF_OPTIM
|
||||
#undef PAGE_MODE
|
||||
#undef PAGE_SIZE
|
||||
#undef NCS_CONTROLLED_READ
|
||||
#undef NCS_CONTROLLED_WRITE
|
||||
#undef NWAIT_MODE
|
||||
#endif
|
||||
|
||||
//! Whether to use the NCS3 pin
|
||||
#ifdef SMC_USE_NCS3
|
||||
#include SMC_COMPONENT_CS3
|
||||
|
||||
// Setup SMC for NCS3
|
||||
SMC_CS_SETUP(3)
|
||||
|
||||
#ifdef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW_GLOBAL < SMC_DBW)
|
||||
#undef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS_GLOBAL < SMC_8_BIT)
|
||||
#undef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE_GLOBAL < NWAIT_MODE)
|
||||
#undef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#undef EXT_SM_SIZE
|
||||
#undef SMC_DBW
|
||||
#undef SMC_8_BIT_CHIPS
|
||||
#undef NWE_SETUP
|
||||
#undef NCS_WR_SETUP
|
||||
#undef NRD_SETUP
|
||||
#undef NCS_RD_SETUP
|
||||
#undef NCS_WR_PULSE
|
||||
#undef NWE_PULSE
|
||||
#undef NCS_RD_PULSE
|
||||
#undef NRD_PULSE
|
||||
#undef NCS_WR_HOLD
|
||||
#undef NWE_HOLD
|
||||
#undef NWE_CYCLE
|
||||
#undef NCS_RD_HOLD
|
||||
#undef NRD_CYCLE
|
||||
#undef TDF_CYCLES
|
||||
#undef TDF_OPTIM
|
||||
#undef PAGE_MODE
|
||||
#undef PAGE_SIZE
|
||||
#undef NCS_CONTROLLED_READ
|
||||
#undef NCS_CONTROLLED_WRITE
|
||||
#undef NWAIT_MODE
|
||||
#endif
|
||||
|
||||
//! Whether to use the NCS4 pin
|
||||
#ifdef SMC_USE_NCS4
|
||||
#include SMC_COMPONENT_CS4
|
||||
|
||||
// Setup SMC for NCS4
|
||||
SMC_CS_SETUP(4)
|
||||
|
||||
#ifdef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW_GLOBAL < SMC_DBW)
|
||||
#undef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS_GLOBAL < SMC_8_BIT)
|
||||
#undef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE_GLOBAL < NWAIT_MODE)
|
||||
#undef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#undef EXT_SM_SIZE
|
||||
#undef SMC_DBW
|
||||
#undef SMC_8_BIT_CHIPS
|
||||
#undef NWE_SETUP
|
||||
#undef NCS_WR_SETUP
|
||||
#undef NRD_SETUP
|
||||
#undef NCS_RD_SETUP
|
||||
#undef NCS_WR_PULSE
|
||||
#undef NWE_PULSE
|
||||
#undef NCS_RD_PULSE
|
||||
#undef NRD_PULSE
|
||||
#undef NCS_WR_HOLD
|
||||
#undef NWE_HOLD
|
||||
#undef NWE_CYCLE
|
||||
#undef NCS_RD_HOLD
|
||||
#undef NRD_CYCLE
|
||||
#undef TDF_CYCLES
|
||||
#undef TDF_OPTIM
|
||||
#undef PAGE_MODE
|
||||
#undef PAGE_SIZE
|
||||
#undef NCS_CONTROLLED_READ
|
||||
#undef NCS_CONTROLLED_WRITE
|
||||
#undef NWAIT_MODE
|
||||
#endif
|
||||
|
||||
//! Whether to use the NCS5 pin
|
||||
#ifdef SMC_USE_NCS5
|
||||
#include SMC_COMPONENT_CS5
|
||||
|
||||
// Setup SMC for NCS5
|
||||
SMC_CS_SETUP(5)
|
||||
|
||||
#ifdef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW_GLOBAL < SMC_DBW)
|
||||
#undef SMC_DBW_GLOBAL
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_DBW == 8)
|
||||
#define SMC_DBW_GLOBAL 8
|
||||
#elif (SMC_DBW == 16)
|
||||
#define SMC_DBW_GLOBAL 16
|
||||
#elif (SMC_DBW == 32)
|
||||
#define SMC_DBW_GLOBAL 32
|
||||
#else
|
||||
#error error in SMC_DBW size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS_GLOBAL < SMC_8_BIT)
|
||||
#undef SMC_8_BIT_CHIPS_GLOBAL
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (SMC_8_BIT_CHIPS == TRUE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL TRUE
|
||||
#elif (SMC_8_BIT_CHIPS == FALSE)
|
||||
#define SMC_8_BIT_CHIPS_GLOBAL FALSE
|
||||
#else
|
||||
#error error in SMC_8_BIT_CHIPS size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE_GLOBAL < NWAIT_MODE)
|
||||
#undef NWAIT_MODE_GLOBAL
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if (NWAIT_MODE == AVR32_SMC_EXNW_MODE_DISABLED)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#elif (NWAIT_MODE == AVR32_SMC_EXNW_MODE_FROZEN)
|
||||
#define NWAIT_MODE_GLOBAL AVR32_SMC_EXNW_MODE_FROZEN
|
||||
#else
|
||||
#error error in NWAIT_MODE size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#undef EXT_SM_SIZE
|
||||
#undef SMC_DBW
|
||||
#undef SMC_8_BIT_CHIPS
|
||||
#undef NWE_SETUP
|
||||
#undef NCS_WR_SETUP
|
||||
#undef NRD_SETUP
|
||||
#undef NCS_RD_SETUP
|
||||
#undef NCS_WR_PULSE
|
||||
#undef NWE_PULSE
|
||||
#undef NCS_RD_PULSE
|
||||
#undef NRD_PULSE
|
||||
#undef NCS_WR_HOLD
|
||||
#undef NWE_HOLD
|
||||
#undef NWE_CYCLE
|
||||
#undef NCS_RD_HOLD
|
||||
#undef NRD_CYCLE
|
||||
#undef TDF_CYCLES
|
||||
#undef TDF_OPTIM
|
||||
#undef PAGE_MODE
|
||||
#undef PAGE_SIZE
|
||||
#undef NCS_CONTROLLED_READ
|
||||
#undef NCS_CONTROLLED_WRITE
|
||||
#undef NWAIT_MODE
|
||||
#endif
|
||||
// Put the multiplexed MCU pins used for the SM under control of the SMC.
|
||||
smc_enable_muxed_pins();
|
||||
}
|
||||
|
||||
/*! \brief Puts the multiplexed MCU pins used for the SMC
|
||||
*
|
||||
*/
|
||||
static void smc_enable_muxed_pins(void)
|
||||
{
|
||||
static const gpio_map_t SMC_EBI_GPIO_MAP =
|
||||
{
|
||||
// Enable data pins.
|
||||
#ifdef EBI_DATA_0
|
||||
{ATPASTE2(EBI_DATA_0,_PIN),ATPASTE2(EBI_DATA_0,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_1
|
||||
{ATPASTE2(EBI_DATA_1,_PIN),ATPASTE2(EBI_DATA_1,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_2
|
||||
{ATPASTE2(EBI_DATA_2,_PIN),ATPASTE2(EBI_DATA_2,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_3
|
||||
{ATPASTE2(EBI_DATA_3,_PIN),ATPASTE2(EBI_DATA_3,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_4
|
||||
{ATPASTE2(EBI_DATA_4,_PIN),ATPASTE2(EBI_DATA_4,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_5
|
||||
{ATPASTE2(EBI_DATA_5,_PIN),ATPASTE2(EBI_DATA_5,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_6
|
||||
{ATPASTE2(EBI_DATA_6,_PIN),ATPASTE2(EBI_DATA_6,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_7
|
||||
{ATPASTE2(EBI_DATA_7,_PIN),ATPASTE2(EBI_DATA_7,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_8
|
||||
{ATPASTE2(EBI_DATA_8,_PIN),ATPASTE2(EBI_DATA_8,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_9
|
||||
{ATPASTE2(EBI_DATA_9,_PIN),ATPASTE2(EBI_DATA_9,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_10
|
||||
{ATPASTE2(EBI_DATA_10,_PIN),ATPASTE2(EBI_DATA_10,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_11
|
||||
{ATPASTE2(EBI_DATA_11,_PIN),ATPASTE2(EBI_DATA_11,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_12
|
||||
{ATPASTE2(EBI_DATA_12,_PIN),ATPASTE2(EBI_DATA_12,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_13
|
||||
{ATPASTE2(EBI_DATA_13,_PIN),ATPASTE2(EBI_DATA_13,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_14
|
||||
{ATPASTE2(EBI_DATA_14,_PIN),ATPASTE2(EBI_DATA_14,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_15
|
||||
{ATPASTE2(EBI_DATA_15,_PIN),ATPASTE2(EBI_DATA_15,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_16
|
||||
{ATPASTE2(EBI_DATA_16,_PIN),ATPASTE2(EBI_DATA_16,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_17
|
||||
{ATPASTE2(EBI_DATA_17,_PIN),ATPASTE2(EBI_DATA_17,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_18
|
||||
{ATPASTE2(EBI_DATA_18,_PIN),ATPASTE2(EBI_DATA_18,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_19
|
||||
{ATPASTE2(EBI_DATA_19,_PIN),ATPASTE2(EBI_DATA_19,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_20
|
||||
{ATPASTE2(EBI_DATA_20,_PIN),ATPASTE2(EBI_DATA_20,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_21
|
||||
{ATPASTE2(EBI_DATA_21,_PIN),ATPASTE2(EBI_DATA_21,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_22
|
||||
{ATPASTE2(EBI_DATA_22,_PIN),ATPASTE2(EBI_DATA_22,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_23
|
||||
{ATPASTE2(EBI_DATA_23,_PIN),ATPASTE2(EBI_DATA_23,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_24
|
||||
{ATPASTE2(EBI_DATA_24,_PIN),ATPASTE2(EBI_DATA_24,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_25
|
||||
{ATPASTE2(EBI_DATA_25,_PIN),ATPASTE2(EBI_DATA_25,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_26
|
||||
{ATPASTE2(EBI_DATA_26,_PIN),ATPASTE2(EBI_DATA_26,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_27
|
||||
{ATPASTE2(EBI_DATA_27,_PIN),ATPASTE2(EBI_DATA_27,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_28
|
||||
{ATPASTE2(EBI_DATA_28,_PIN),ATPASTE2(EBI_DATA_28,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_29
|
||||
{ATPASTE2(EBI_DATA_29,_PIN),ATPASTE2(EBI_DATA_29,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_30
|
||||
{ATPASTE2(EBI_DATA_30,_PIN),ATPASTE2(EBI_DATA_30,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_DATA_31
|
||||
{ATPASTE2(EBI_DATA_31,_PIN),ATPASTE2(EBI_DATA_31,_FUNCTION)},
|
||||
#endif
|
||||
|
||||
// Enable address pins.
|
||||
#if SMC_DBW_GLOBAL <= 8
|
||||
#ifdef EBI_ADDR_0
|
||||
{ATPASTE2(EBI_ADDR_0,_PIN),ATPASTE2(EBI_ADDR_0,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#if SMC_DBW_GLOBAL <= 16
|
||||
#ifdef EBI_ADDR_1
|
||||
{ATPASTE2(EBI_ADDR_1,_PIN),ATPASTE2(EBI_ADDR_1,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EBI_ADDR_2
|
||||
{ATPASTE2(EBI_ADDR_2,_PIN),ATPASTE2(EBI_ADDR_2,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_3
|
||||
{ATPASTE2(EBI_ADDR_3,_PIN),ATPASTE2(EBI_ADDR_3,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_4
|
||||
{ATPASTE2(EBI_ADDR_4,_PIN),ATPASTE2(EBI_ADDR_4,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_5
|
||||
{ATPASTE2(EBI_ADDR_5,_PIN),ATPASTE2(EBI_ADDR_5,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_6
|
||||
{ATPASTE2(EBI_ADDR_6,_PIN),ATPASTE2(EBI_ADDR_6,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_7
|
||||
{ATPASTE2(EBI_ADDR_7,_PIN),ATPASTE2(EBI_ADDR_7,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_8
|
||||
{ATPASTE2(EBI_ADDR_8,_PIN),ATPASTE2(EBI_ADDR_8,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_9
|
||||
{ATPASTE2(EBI_ADDR_9,_PIN),ATPASTE2(EBI_ADDR_9,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_10
|
||||
{ATPASTE2(EBI_ADDR_10,_PIN),ATPASTE2(EBI_ADDR_10,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_11
|
||||
{ATPASTE2(EBI_ADDR_11,_PIN),ATPASTE2(EBI_ADDR_11,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_12
|
||||
{ATPASTE2(EBI_ADDR_12,_PIN),ATPASTE2(EBI_ADDR_12,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_13
|
||||
{ATPASTE2(EBI_ADDR_13,_PIN),ATPASTE2(EBI_ADDR_13,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_14
|
||||
{ATPASTE2(EBI_ADDR_14,_PIN),ATPASTE2(EBI_ADDR_14,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_15
|
||||
{ATPASTE2(EBI_ADDR_15,_PIN),ATPASTE2(EBI_ADDR_15,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_16
|
||||
{ATPASTE2(EBI_ADDR_16,_PIN),ATPASTE2(EBI_ADDR_16,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_17
|
||||
{ATPASTE2(EBI_ADDR_17,_PIN),ATPASTE2(EBI_ADDR_17,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_18
|
||||
{ATPASTE2(EBI_ADDR_18,_PIN),ATPASTE2(EBI_ADDR_18,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_19
|
||||
{ATPASTE2(EBI_ADDR_19,_PIN),ATPASTE2(EBI_ADDR_19,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_20
|
||||
{ATPASTE2(EBI_ADDR_20,_PIN),ATPASTE2(EBI_ADDR_20,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_21
|
||||
{ATPASTE2(EBI_ADDR_21,_PIN),ATPASTE2(EBI_ADDR_21,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_22
|
||||
{ATPASTE2(EBI_ADDR_22,_PIN),ATPASTE2(EBI_ADDR_22,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_ADDR_23
|
||||
{ATPASTE2(EBI_ADDR_23,_PIN),ATPASTE2(EBI_ADDR_23,_FUNCTION)},
|
||||
#endif
|
||||
|
||||
#if SMC_DBW_GLOBAL <= 8
|
||||
#undef SMC_8_BIT_CHIPS
|
||||
#define SMC_8_BIT_CHIPS TRUE
|
||||
#endif
|
||||
|
||||
// Enable data mask pins.
|
||||
#if !SMC_8_BIT_CHIPS_GLOBAL
|
||||
#ifdef EBI_ADDR_0
|
||||
{ATPASTE2(EBI_ADDR_0,_PIN),ATPASTE2(EBI_ADDR_0,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef EBI_NWE0
|
||||
{ATPASTE2(EBI_NWE0,_PIN),ATPASTE2(EBI_NWE0,_FUNCTION)},
|
||||
#endif
|
||||
|
||||
#if SMC_DBW_GLOBAL >= 16
|
||||
#ifdef EBI_NWE1
|
||||
{ATPASTE2(EBI_NWE1,_PIN),ATPASTE2(EBI_NWE1,_FUNCTION)},
|
||||
#endif
|
||||
#if SMC_DBW_GLOBAL >= 32
|
||||
#ifdef EBI_ADDR_1
|
||||
{ATPASTE2(EBI_ADDR_1,_PIN),ATPASTE2(EBI_ADDR_1,_FUNCTION)},
|
||||
#endif
|
||||
#ifdef EBI_NWE3
|
||||
{ATPASTE2(EBI_NWE3,_PIN),ATPASTE2(EBI_NWE3,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifdef EBI_NRD
|
||||
{ATPASTE2(EBI_NRD,_PIN),ATPASTE2(EBI_NRD,_FUNCTION)},
|
||||
#endif
|
||||
|
||||
// Enable control pins.
|
||||
#if NWAIT_MODE_GLOBAL != AVR32_SMC_EXNW_MODE_DISABLED
|
||||
#ifdef EBI_NWAIT
|
||||
{ATPASTE2(EBI_NWAIT,_PIN),ATPASTE2(EBI_NWAIT,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SMC_USE_NCS0
|
||||
#ifdef EBI_NCS_0
|
||||
{ATPASTE2(EBI_NCS_0,_PIN),ATPASTE2(EBI_NCS_0,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SMC_USE_NCS1
|
||||
#ifdef EBI_NCS_1
|
||||
{ATPASTE2(EBI_NCS_1,_PIN),ATPASTE2(EBI_NCS_1,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SMC_USE_NCS2
|
||||
#ifdef EBI_NCS_2
|
||||
{ATPASTE2(EBI_NCS_2,_PIN),ATPASTE2(EBI_NCS_2,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SMC_USE_NCS3
|
||||
#ifdef EBI_NCS_3
|
||||
{ATPASTE2(EBI_NCS_3,_PIN),ATPASTE2(EBI_NCS_3,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SMC_USE_NCS4
|
||||
#ifdef EBI_NCS_4
|
||||
{ATPASTE2(EBI_NCS_4,_PIN),ATPASTE2(EBI_NCS_4,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SMC_USE_NCS5
|
||||
#ifdef EBI_NCS_5
|
||||
{ATPASTE2(EBI_NCS_5,_PIN),ATPASTE2(EBI_NCS_5,_FUNCTION)},
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
gpio_enable_module(SMC_EBI_GPIO_MAP, sizeof(SMC_EBI_GPIO_MAP) / sizeof(SMC_EBI_GPIO_MAP[0]));
|
||||
}
|
||||
|
||||
unsigned char smc_get_cs_size(unsigned char cs)
|
||||
{
|
||||
return smc_tab_cs_size[cs];
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief SMC on EBI driver for AVR32 UC3.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with a SMC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SMC_H_
|
||||
#define _SMC_H_
|
||||
|
||||
#include <avr32/io.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "conf_ebi.h"
|
||||
|
||||
/*! \brief Initializes the AVR32 SMC module and the connected SRAM(s).
|
||||
* \param hsb_hz HSB frequency in Hz (the HSB frequency is applied to the SMC).
|
||||
* \note Each access to the SMC address space validates the mode of the SMC
|
||||
* and generates an operation corresponding to this mode.
|
||||
*/
|
||||
extern void smc_init(unsigned long hsb_hz);
|
||||
|
||||
/*! \brief Return the size of the peripheral connected .
|
||||
* \param cs The chip select value
|
||||
*/
|
||||
extern unsigned char smc_get_cs_size(unsigned char cs);
|
||||
|
||||
#endif // _SMC_H_
|
@ -0,0 +1,183 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief EIC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 External Interrupt Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an EIC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include "compiler.h"
|
||||
#include "preprocessor.h"
|
||||
#include "eic.h"
|
||||
|
||||
|
||||
|
||||
void eic_init(volatile avr32_eic_t *eic, const eic_options_t *opt, unsigned int nb_lines)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < nb_lines; i++)
|
||||
{
|
||||
// Set up mode level
|
||||
eic->mode = (opt[i].eic_mode == 1) ? (eic->mode | (1 << opt[i].eic_line)) : (eic->mode & ~(1 << opt[i].eic_line));
|
||||
// Set up edge type
|
||||
eic->edge = (opt[i].eic_edge == 1) ? (eic->edge | (1 << opt[i].eic_line)) : (eic->edge & ~(1 << opt[i].eic_line));
|
||||
// Set up level
|
||||
eic->level = (opt[i].eic_level == 1) ? (eic->level | (1 << opt[i].eic_line)) : (eic->level & ~(1 << opt[i].eic_line));
|
||||
// Set up if filter is used
|
||||
eic->filter = (opt[i].eic_filter == 1) ? (eic->filter | (1 << opt[i].eic_line)) : (eic->filter & ~(1 << opt[i].eic_line));
|
||||
// Set up which mode is used : asynchronous mode/ synchronous mode
|
||||
eic->async = (opt[i].eic_async == 1) ? (eic->async | (1 << opt[i].eic_line)) : (eic->async & ~(1 << opt[i].eic_line));
|
||||
}
|
||||
}
|
||||
|
||||
void eic_enable_lines(volatile avr32_eic_t *eic, unsigned int mask_lines)
|
||||
{
|
||||
eic->en = mask_lines;
|
||||
}
|
||||
|
||||
void eic_enable_line(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
// Enable line line_number
|
||||
eic->en = 1 << line_number;
|
||||
}
|
||||
|
||||
void eic_disable_lines(volatile avr32_eic_t *eic, unsigned int mask_lines)
|
||||
{
|
||||
eic->dis = mask_lines;
|
||||
}
|
||||
|
||||
void eic_disable_line(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
// Disable line line_number
|
||||
eic->dis = 1 << line_number;
|
||||
}
|
||||
|
||||
Bool eic_is_line_enabled(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
return (eic->ctrl & (1 << line_number)) != 0;
|
||||
}
|
||||
|
||||
void eic_enable_interrupt_lines(volatile avr32_eic_t *eic, unsigned int mask_lines)
|
||||
{
|
||||
eic->ier = mask_lines;
|
||||
}
|
||||
|
||||
void eic_enable_interrupt_line(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
// Enable line line_number
|
||||
eic->ier = 1 << line_number;
|
||||
}
|
||||
|
||||
void eic_disable_interrupt_lines(volatile avr32_eic_t *eic, unsigned int mask_lines)
|
||||
{
|
||||
Bool global_interrupt_enabled = Is_global_interrupt_enabled();
|
||||
|
||||
if (global_interrupt_enabled) Disable_global_interrupt();
|
||||
eic->idr = mask_lines;
|
||||
eic->imr;
|
||||
if (global_interrupt_enabled) Enable_global_interrupt();
|
||||
}
|
||||
|
||||
void eic_disable_interrupt_line(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
Bool global_interrupt_enabled = Is_global_interrupt_enabled();
|
||||
|
||||
// Disable line line_number
|
||||
if (global_interrupt_enabled) Disable_global_interrupt();
|
||||
eic->idr = 1 << line_number;
|
||||
eic->imr;
|
||||
if (global_interrupt_enabled) Enable_global_interrupt();
|
||||
}
|
||||
|
||||
Bool eic_is_interrupt_line_enabled(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
return (eic->imr & (1 << line_number)) != 0;
|
||||
}
|
||||
|
||||
void eic_clear_interrupt_lines(volatile avr32_eic_t *eic, unsigned int mask_lines)
|
||||
{
|
||||
Bool global_interrupt_enabled = Is_global_interrupt_enabled();
|
||||
|
||||
if (global_interrupt_enabled) Disable_global_interrupt();
|
||||
eic->icr = mask_lines;
|
||||
eic->isr;
|
||||
if (global_interrupt_enabled) Enable_global_interrupt();
|
||||
}
|
||||
|
||||
void eic_clear_interrupt_line(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
Bool global_interrupt_enabled = Is_global_interrupt_enabled();
|
||||
|
||||
// Clear line line_number
|
||||
if (global_interrupt_enabled) Disable_global_interrupt();
|
||||
eic->icr = 1 << line_number;
|
||||
eic->isr;
|
||||
if (global_interrupt_enabled) Enable_global_interrupt();
|
||||
}
|
||||
|
||||
Bool eic_is_interrupt_line_pending(volatile avr32_eic_t *eic, unsigned int line_number)
|
||||
{
|
||||
return (eic->isr & (1 << line_number)) != 0;
|
||||
}
|
||||
|
||||
#if !defined(AVR32_EIC_301_H_INCLUDED)
|
||||
void eic_enable_interrupt_scan(volatile avr32_eic_t *eic,unsigned int presc)
|
||||
{
|
||||
// Enable SCAN function with PRESC value
|
||||
eic->scan |= (presc << AVR32_EIC_SCAN_PRESC_OFFSET) | (1 << AVR32_EIC_SCAN_EN_OFFSET);
|
||||
}
|
||||
|
||||
void eic_disable_interrupt_scan(volatile avr32_eic_t *eic)
|
||||
{
|
||||
// Disable SCAN function
|
||||
eic->scan = 0 << AVR32_EIC_SCAN_EN_OFFSET;
|
||||
}
|
||||
|
||||
unsigned long eic_get_interrupt_pad_scan(volatile avr32_eic_t *eic)
|
||||
{
|
||||
// Return pad number that causes interrupt
|
||||
return(eic->scan>>AVR32_EIC_SCAN_PIN_OFFSET);
|
||||
}
|
||||
#endif
|
@ -0,0 +1,275 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief EIC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 External Interrupt Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an EIC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _EIC_H_
|
||||
#define _EIC_H_
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
/*! \name External Interrupt lines
|
||||
*/
|
||||
//! @{
|
||||
#if (UC3A || UC3B)
|
||||
#define EXT_INT0 AVR32_EIC_INT0 //!< Line 0
|
||||
#define EXT_INT1 AVR32_EIC_INT1 //!< Line 1
|
||||
#define EXT_INT2 AVR32_EIC_INT2 //!< Line 2
|
||||
#define EXT_INT3 AVR32_EIC_INT3 //!< Line 3
|
||||
#define EXT_INT4 AVR32_EIC_INT4 //!< Line 4
|
||||
#define EXT_INT5 AVR32_EIC_INT5 //!< Line 5
|
||||
#define EXT_INT6 AVR32_EIC_INT6 //!< Line 6
|
||||
#define EXT_INT7 AVR32_EIC_INT7 //!< Line 7
|
||||
#define EXT_NMI AVR32_EIC_NMI //!< Line 8
|
||||
#else
|
||||
#define EXT_INT0 AVR32_EIC_INT1 //!< Line 0
|
||||
#define EXT_INT1 AVR32_EIC_INT2 //!< Line 1
|
||||
#define EXT_INT2 AVR32_EIC_INT3 //!< Line 2
|
||||
#define EXT_INT3 AVR32_EIC_INT4 //!< Line 3
|
||||
#define EXT_INT4 AVR32_EIC_INT5 //!< Line 4
|
||||
#define EXT_INT5 AVR32_EIC_INT6 //!< Line 5
|
||||
#define EXT_INT6 AVR32_EIC_INT7 //!< Line 6
|
||||
#define EXT_INT7 AVR32_EIC_INT8 //!< Line 7
|
||||
#define EXT_NMI AVR32_EIC_NMI //!< Line 8
|
||||
|
||||
#endif
|
||||
|
||||
//! @}
|
||||
|
||||
/*! \name Mode Trigger Options
|
||||
*/
|
||||
//! @{
|
||||
#define EIC_MODE_EDGE_TRIGGERED AVR32_EIC_EDGE_IRQ //!<
|
||||
#define EIC_MODE_LEVEL_TRIGGERED AVR32_EIC_LEVEL_IRQ //!<
|
||||
//! @}
|
||||
|
||||
/*! \name Edge level Options
|
||||
*/
|
||||
//! @{
|
||||
#define EIC_EDGE_FALLING_EDGE AVR32_EIC_FALLING_EDGE //!<
|
||||
#define EIC_EDGE_RISING_EDGE AVR32_EIC_RISING_EDGE //!<
|
||||
//! @}
|
||||
|
||||
/*! \name Level Options
|
||||
*/
|
||||
//! @{
|
||||
#define EIC_LEVEL_LOW_LEVEL AVR32_EIC_LOW_LEVEL //!<
|
||||
#define EIC_LEVEL_HIGH_LEVEL AVR32_EIC_HIGH_LEVEL //!<
|
||||
//! @}
|
||||
|
||||
/*! \name Filter Options
|
||||
*/
|
||||
//! @{
|
||||
#define EIC_FILTER_ENABLED AVR32_EIC_FILTER_ON //!<
|
||||
#define EIC_FILTER_DISABLED AVR32_EIC_FILTER_OFF //!<
|
||||
//! @}
|
||||
|
||||
/*! \name Synch Mode Options
|
||||
*/
|
||||
//! @{
|
||||
#define EIC_SYNCH_MODE AVR32_EIC_SYNC //!<
|
||||
#define EIC_ASYNCH_MODE AVR32_EIC_USE_ASYNC //!<
|
||||
//! @}
|
||||
|
||||
//! Configuration parameters of the EIC module.
|
||||
typedef struct
|
||||
{
|
||||
//!Line
|
||||
unsigned char eic_line;
|
||||
|
||||
//! Mode : EDGE_LEVEL or TRIGGER_LEVEL
|
||||
unsigned char eic_mode;
|
||||
|
||||
//! Edge : FALLING_EDGE or RISING_EDGE
|
||||
unsigned char eic_edge;
|
||||
|
||||
//! Level : LOW_LEVEL or HIGH_LEVEL
|
||||
unsigned char eic_level;
|
||||
|
||||
//! Filter: NOT_FILTERED or FILTERED
|
||||
unsigned char eic_filter;
|
||||
|
||||
//! Async: SYNC mode or ASYNC
|
||||
unsigned char eic_async;
|
||||
|
||||
} eic_options_t;
|
||||
|
||||
|
||||
/*! \brief Init the EIC driver.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param opt Configuration parameters of the EIC module (see \ref eic_options_t)
|
||||
* \param nb_lines Number of lines to consider, equal to size of opt buffer
|
||||
*/
|
||||
extern void eic_init(volatile avr32_eic_t *eic, const eic_options_t *opt, unsigned int nb_lines);
|
||||
|
||||
/*! \brief Enable the EIC driver.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param mask_lines Mask for current selected lines
|
||||
*/
|
||||
extern void eic_enable_lines(volatile avr32_eic_t *eic, unsigned int mask_lines);
|
||||
|
||||
/*! \brief Enable the EIC driver.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param line_number Line number to enable
|
||||
*/
|
||||
extern void eic_enable_line(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \brief Disable the EIC driver.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param mask_lines Mask for current selected lines
|
||||
*/
|
||||
extern void eic_disable_lines(volatile avr32_eic_t *eic, unsigned int mask_lines);
|
||||
|
||||
/*! \brief Disable the EIC driver.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param line_number Line number to disable
|
||||
*/
|
||||
extern void eic_disable_line(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \brief Tells whether an EIC line is enabled.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param line_number Line number to test
|
||||
*
|
||||
* \return Whether an EIC line is enabled.
|
||||
*/
|
||||
extern Bool eic_is_line_enabled(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \name Interrupt Control Functions
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Enable the interrupt feature of the EIC.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
* \param mask_lines Mask for current selected lines
|
||||
*/
|
||||
extern void eic_enable_interrupt_lines(volatile avr32_eic_t *eic, unsigned int mask_lines);
|
||||
|
||||
/*! \brief Enable the interrupt feature of the EIC.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
* \param line_number Line number to enable
|
||||
*/
|
||||
extern void eic_enable_interrupt_line(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \brief Disable the interrupt feature of the EIC.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
* \param mask_lines Mask for current selected lines
|
||||
*/
|
||||
extern void eic_disable_interrupt_lines(volatile avr32_eic_t *eic, unsigned int mask_lines);
|
||||
|
||||
/*! \brief Disable the interrupt feature of the EIC.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
* \param line_number Line number to disable
|
||||
*/
|
||||
extern void eic_disable_interrupt_line(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \brief Tells whether an EIC interrupt line is enabled.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param line_number Line number to test
|
||||
*
|
||||
* \return Whether an EIC interrupt line is enabled.
|
||||
*/
|
||||
extern Bool eic_is_interrupt_line_enabled(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \brief Clear the interrupt flag.
|
||||
* Call this function once you've handled the interrupt.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
* \param mask_lines Mask for current selected lines
|
||||
*/
|
||||
extern void eic_clear_interrupt_lines(volatile avr32_eic_t *eic, unsigned int mask_lines);
|
||||
|
||||
/*! \brief Clear the interrupt flag.
|
||||
* Call this function once you've handled the interrupt.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
* \param line_number Line number to clear
|
||||
*/
|
||||
extern void eic_clear_interrupt_line(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \brief Tells whether an EIC interrupt line is pending.
|
||||
*
|
||||
* \param eic Base address of the EIC module
|
||||
* \param line_number Line number to test
|
||||
*
|
||||
* \return Whether an EIC interrupt line is pending.
|
||||
*/
|
||||
extern Bool eic_is_interrupt_line_pending(volatile avr32_eic_t *eic, unsigned int line_number);
|
||||
|
||||
/*! \brief Enable the interrupt scan feature of the EIC.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
* \param presc Prescale select for the keypad scan rate in the range [0,31].
|
||||
*/
|
||||
extern void eic_enable_interrupt_scan(volatile avr32_eic_t *eic, unsigned int presc);
|
||||
|
||||
/*! \brief Disable the interrupt scan feature of the EIC.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
*/
|
||||
extern void eic_disable_interrupt_scan(volatile avr32_eic_t *eic);
|
||||
|
||||
/*! \brief Return scan pad number that causes interrupt.
|
||||
*
|
||||
* \param eic Base address of the EIC (i.e. &AVR32_EIC).
|
||||
*/
|
||||
extern unsigned long eic_get_interrupt_pad_scan(volatile avr32_eic_t *eic);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // _EIC_H_
|
@ -0,0 +1,1117 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief FLASHC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 Flash Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with a FLASHC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include <stddef.h>
|
||||
#include "compiler.h"
|
||||
#include "flashc.h"
|
||||
|
||||
|
||||
/*! \name FLASHC Writable Bit-Field Registers
|
||||
*/
|
||||
//! @{
|
||||
|
||||
typedef union
|
||||
{
|
||||
unsigned long fcr;
|
||||
avr32_flashc_fcr_t FCR;
|
||||
} u_avr32_flashc_fcr_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
unsigned long fcmd;
|
||||
avr32_flashc_fcmd_t FCMD;
|
||||
} u_avr32_flashc_fcmd_t;
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Flash Properties
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
unsigned int flashc_get_flash_size(void)
|
||||
{
|
||||
#if (defined AVR32_FLASHC_300_H_INCLUDED)
|
||||
static const unsigned int FLASH_SIZE[1 << AVR32_FLASHC_PR_FSZ_SIZE] =
|
||||
{
|
||||
32 << 10,
|
||||
64 << 10,
|
||||
128 << 10,
|
||||
256 << 10,
|
||||
384 << 10,
|
||||
512 << 10,
|
||||
768 << 10,
|
||||
1024 << 10
|
||||
};
|
||||
return FLASH_SIZE[(AVR32_FLASHC.pr & AVR32_FLASHC_PR_FSZ_MASK) >> AVR32_FLASHC_PR_FSZ_OFFSET];
|
||||
#else
|
||||
static const unsigned int FLASH_SIZE[1 << AVR32_FLASHC_FSR_FSZ_SIZE] =
|
||||
{
|
||||
32 << 10,
|
||||
64 << 10,
|
||||
128 << 10,
|
||||
256 << 10,
|
||||
384 << 10,
|
||||
512 << 10,
|
||||
768 << 10,
|
||||
1024 << 10
|
||||
};
|
||||
return FLASH_SIZE[(AVR32_FLASHC.fsr & AVR32_FLASHC_FSR_FSZ_MASK) >> AVR32_FLASHC_FSR_FSZ_OFFSET];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
unsigned int flashc_get_page_count(void)
|
||||
{
|
||||
return flashc_get_flash_size() / AVR32_FLASHC_PAGE_SIZE;
|
||||
}
|
||||
|
||||
|
||||
unsigned int flashc_get_page_count_per_region(void)
|
||||
{
|
||||
return flashc_get_page_count() / AVR32_FLASHC_REGIONS;
|
||||
}
|
||||
|
||||
|
||||
unsigned int flashc_get_page_region(int page_number)
|
||||
{
|
||||
return ((page_number >= 0) ? page_number : flashc_get_page_number()) / flashc_get_page_count_per_region();
|
||||
}
|
||||
|
||||
|
||||
unsigned int flashc_get_region_first_page_number(unsigned int region)
|
||||
{
|
||||
return region * flashc_get_page_count_per_region();
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Control
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
unsigned int flashc_get_wait_state(void)
|
||||
{
|
||||
return (AVR32_FLASHC.fcr & AVR32_FLASHC_FCR_FWS_MASK) >> AVR32_FLASHC_FCR_FWS_OFFSET;
|
||||
}
|
||||
|
||||
|
||||
void flashc_set_wait_state(unsigned int wait_state)
|
||||
{
|
||||
u_avr32_flashc_fcr_t u_avr32_flashc_fcr = {AVR32_FLASHC.fcr};
|
||||
u_avr32_flashc_fcr.FCR.fws = wait_state;
|
||||
AVR32_FLASHC.fcr = u_avr32_flashc_fcr.fcr;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_ready_int_enabled(void)
|
||||
{
|
||||
return ((AVR32_FLASHC.fcr & AVR32_FLASHC_FCR_FRDY_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
void flashc_enable_ready_int(Bool enable)
|
||||
{
|
||||
u_avr32_flashc_fcr_t u_avr32_flashc_fcr = {AVR32_FLASHC.fcr};
|
||||
u_avr32_flashc_fcr.FCR.frdy = (enable != FALSE);
|
||||
AVR32_FLASHC.fcr = u_avr32_flashc_fcr.fcr;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_lock_error_int_enabled(void)
|
||||
{
|
||||
return ((AVR32_FLASHC.fcr & AVR32_FLASHC_FCR_LOCKE_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
void flashc_enable_lock_error_int(Bool enable)
|
||||
{
|
||||
u_avr32_flashc_fcr_t u_avr32_flashc_fcr = {AVR32_FLASHC.fcr};
|
||||
u_avr32_flashc_fcr.FCR.locke = (enable != FALSE);
|
||||
AVR32_FLASHC.fcr = u_avr32_flashc_fcr.fcr;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_prog_error_int_enabled(void)
|
||||
{
|
||||
return ((AVR32_FLASHC.fcr & AVR32_FLASHC_FCR_PROGE_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
void flashc_enable_prog_error_int(Bool enable)
|
||||
{
|
||||
u_avr32_flashc_fcr_t u_avr32_flashc_fcr = {AVR32_FLASHC.fcr};
|
||||
u_avr32_flashc_fcr.FCR.proge = (enable != FALSE);
|
||||
AVR32_FLASHC.fcr = u_avr32_flashc_fcr.fcr;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Status
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Bool flashc_is_ready(void)
|
||||
{
|
||||
return ((AVR32_FLASHC.fsr & AVR32_FLASHC_FSR_FRDY_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
void flashc_default_wait_until_ready(void)
|
||||
{
|
||||
while (!flashc_is_ready());
|
||||
}
|
||||
|
||||
|
||||
void (*volatile flashc_wait_until_ready)(void) = flashc_default_wait_until_ready;
|
||||
|
||||
|
||||
/*! \brief Gets the error status of the FLASHC.
|
||||
*
|
||||
* \return The error status of the FLASHC built up from
|
||||
* \c AVR32_FLASHC_FSR_LOCKE_MASK and \c AVR32_FLASHC_FSR_PROGE_MASK.
|
||||
*
|
||||
* \warning This hardware error status is cleared by all functions reading the
|
||||
* Flash Status Register (FSR). This function is therefore not part of
|
||||
* the driver's API which instead presents \ref flashc_is_lock_error
|
||||
* and \ref flashc_is_programming_error.
|
||||
*/
|
||||
static unsigned int flashc_get_error_status(void)
|
||||
{
|
||||
return AVR32_FLASHC.fsr & (AVR32_FLASHC_FSR_LOCKE_MASK |
|
||||
AVR32_FLASHC_FSR_PROGE_MASK);
|
||||
}
|
||||
|
||||
|
||||
//! Sticky error status of the FLASHC.
|
||||
//! This variable is updated by functions that issue FLASHC commands. It
|
||||
//! contains the cumulated FLASHC error status of all the FLASHC commands issued
|
||||
//! by a function.
|
||||
static unsigned int flashc_error_status = 0;
|
||||
|
||||
|
||||
Bool flashc_is_lock_error(void)
|
||||
{
|
||||
return ((flashc_error_status & AVR32_FLASHC_FSR_LOCKE_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_programming_error(void)
|
||||
{
|
||||
return ((flashc_error_status & AVR32_FLASHC_FSR_PROGE_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Command Control
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
unsigned int flashc_get_command(void)
|
||||
{
|
||||
return (AVR32_FLASHC.fcmd & AVR32_FLASHC_FCMD_CMD_MASK) >> AVR32_FLASHC_FCMD_CMD_OFFSET;
|
||||
}
|
||||
|
||||
|
||||
unsigned int flashc_get_page_number(void)
|
||||
{
|
||||
return (AVR32_FLASHC.fcmd & AVR32_FLASHC_FCMD_PAGEN_MASK) >> AVR32_FLASHC_FCMD_PAGEN_OFFSET;
|
||||
}
|
||||
|
||||
|
||||
void flashc_issue_command(unsigned int command, int page_number)
|
||||
{
|
||||
u_avr32_flashc_fcmd_t u_avr32_flashc_fcmd;
|
||||
flashc_wait_until_ready();
|
||||
u_avr32_flashc_fcmd.fcmd = AVR32_FLASHC.fcmd;
|
||||
u_avr32_flashc_fcmd.FCMD.cmd = command;
|
||||
if (page_number >= 0) u_avr32_flashc_fcmd.FCMD.pagen = page_number;
|
||||
u_avr32_flashc_fcmd.FCMD.key = AVR32_FLASHC_FCMD_KEY_KEY;
|
||||
AVR32_FLASHC.fcmd = u_avr32_flashc_fcmd.fcmd;
|
||||
flashc_error_status = flashc_get_error_status();
|
||||
flashc_wait_until_ready();
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Global Commands
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
void flashc_no_operation(void)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_NOP, -1);
|
||||
}
|
||||
|
||||
|
||||
void flashc_erase_all(void)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_EA, -1);
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Protection Mechanisms
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Bool flashc_is_security_bit_active(void)
|
||||
{
|
||||
return ((AVR32_FLASHC.fsr & AVR32_FLASHC_FSR_SECURITY_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
void flashc_activate_security_bit(void)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_SSB, -1);
|
||||
}
|
||||
|
||||
|
||||
unsigned int flashc_get_bootloader_protected_size(void)
|
||||
{
|
||||
unsigned int bootprot = (1 << AVR32_FLASHC_FGPFRLO_BOOTPROT_SIZE) - 1 -
|
||||
flashc_read_gp_fuse_bitfield(AVR32_FLASHC_FGPFRLO_BOOTPROT_OFFSET,
|
||||
AVR32_FLASHC_FGPFRLO_BOOTPROT_SIZE);
|
||||
return (bootprot) ? AVR32_FLASHC_PAGE_SIZE << bootprot : 0;
|
||||
}
|
||||
|
||||
|
||||
unsigned int flashc_set_bootloader_protected_size(unsigned int bootprot_size)
|
||||
{
|
||||
flashc_set_gp_fuse_bitfield(AVR32_FLASHC_FGPFRLO_BOOTPROT_OFFSET,
|
||||
AVR32_FLASHC_FGPFRLO_BOOTPROT_SIZE,
|
||||
(1 << AVR32_FLASHC_FGPFRLO_BOOTPROT_SIZE) - 1 -
|
||||
((bootprot_size) ?
|
||||
32 - clz((((min(max(bootprot_size, AVR32_FLASHC_PAGE_SIZE << 1),
|
||||
AVR32_FLASHC_PAGE_SIZE <<
|
||||
((1 << AVR32_FLASHC_FGPFRLO_BOOTPROT_SIZE) - 1)) +
|
||||
AVR32_FLASHC_PAGE_SIZE - 1) /
|
||||
AVR32_FLASHC_PAGE_SIZE) << 1) - 1) - 1 :
|
||||
0));
|
||||
return flashc_get_bootloader_protected_size();
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_external_privileged_fetch_locked(void)
|
||||
{
|
||||
return (!flashc_read_gp_fuse_bit(AVR32_FLASHC_FGPFRLO_EPFL_OFFSET));
|
||||
}
|
||||
|
||||
|
||||
void flashc_lock_external_privileged_fetch(Bool lock)
|
||||
{
|
||||
flashc_set_gp_fuse_bit(AVR32_FLASHC_FGPFRLO_EPFL_OFFSET, !lock);
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_page_region_locked(int page_number)
|
||||
{
|
||||
return flashc_is_region_locked(flashc_get_page_region(page_number));
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_region_locked(unsigned int region)
|
||||
{
|
||||
return ((AVR32_FLASHC.fsr & AVR32_FLASHC_FSR_LOCK0_MASK << (region & (AVR32_FLASHC_REGIONS - 1))) != 0);
|
||||
}
|
||||
|
||||
|
||||
void flashc_lock_page_region(int page_number, Bool lock)
|
||||
{
|
||||
flashc_issue_command((lock) ? AVR32_FLASHC_FCMD_CMD_LP : AVR32_FLASHC_FCMD_CMD_UP, page_number);
|
||||
}
|
||||
|
||||
|
||||
void flashc_lock_region(unsigned int region, Bool lock)
|
||||
{
|
||||
flashc_lock_page_region(flashc_get_region_first_page_number(region), lock);
|
||||
}
|
||||
|
||||
|
||||
void flashc_lock_all_regions(Bool lock)
|
||||
{
|
||||
unsigned int error_status = 0;
|
||||
unsigned int region = AVR32_FLASHC_REGIONS;
|
||||
while (region)
|
||||
{
|
||||
flashc_lock_region(--region, lock);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_error_status = error_status;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Access to General-Purpose Fuses
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Bool flashc_read_gp_fuse_bit(unsigned int gp_fuse_bit)
|
||||
{
|
||||
return ((flashc_read_all_gp_fuses() & 1ULL << (gp_fuse_bit & 0x3F)) != 0);
|
||||
}
|
||||
|
||||
|
||||
U64 flashc_read_gp_fuse_bitfield(unsigned int pos, unsigned int width)
|
||||
{
|
||||
return flashc_read_all_gp_fuses() >> (pos & 0x3F) & ((1ULL << min(width, 64)) - 1);
|
||||
}
|
||||
|
||||
|
||||
U8 flashc_read_gp_fuse_byte(unsigned int gp_fuse_byte)
|
||||
{
|
||||
return flashc_read_all_gp_fuses() >> ((gp_fuse_byte & 0x07) << 3);
|
||||
}
|
||||
|
||||
|
||||
U64 flashc_read_all_gp_fuses(void)
|
||||
{
|
||||
return AVR32_FLASHC.fgpfrlo | (U64)AVR32_FLASHC.fgpfrhi << 32;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_erase_gp_fuse_bit(unsigned int gp_fuse_bit, Bool check)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_EGPB, gp_fuse_bit & 0x3F);
|
||||
return (check) ? flashc_read_gp_fuse_bit(gp_fuse_bit) : TRUE;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_erase_gp_fuse_bitfield(unsigned int pos, unsigned int width, Bool check)
|
||||
{
|
||||
unsigned int error_status = 0;
|
||||
unsigned int gp_fuse_bit;
|
||||
pos &= 0x3F;
|
||||
width = min(width, 64);
|
||||
for (gp_fuse_bit = pos; gp_fuse_bit < pos + width; gp_fuse_bit++)
|
||||
{
|
||||
flashc_erase_gp_fuse_bit(gp_fuse_bit, FALSE);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_error_status = error_status;
|
||||
return (check) ? (flashc_read_gp_fuse_bitfield(pos, width) == (1ULL << width) - 1) : TRUE;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_erase_gp_fuse_byte(unsigned int gp_fuse_byte, Bool check)
|
||||
{
|
||||
unsigned int error_status;
|
||||
unsigned int current_gp_fuse_byte;
|
||||
U64 value = flashc_read_all_gp_fuses();
|
||||
flashc_erase_all_gp_fuses(FALSE);
|
||||
error_status = flashc_error_status;
|
||||
for (current_gp_fuse_byte = 0; current_gp_fuse_byte < 8; current_gp_fuse_byte++, value >>= 8)
|
||||
{
|
||||
if (current_gp_fuse_byte != gp_fuse_byte)
|
||||
{
|
||||
flashc_write_gp_fuse_byte(current_gp_fuse_byte, value);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
}
|
||||
flashc_error_status = error_status;
|
||||
return (check) ? (flashc_read_gp_fuse_byte(gp_fuse_byte) == 0xFF) : TRUE;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_erase_all_gp_fuses(Bool check)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_EAGPF, -1);
|
||||
return (check) ? (flashc_read_all_gp_fuses() == 0xFFFFFFFFFFFFFFFFULL) : TRUE;
|
||||
}
|
||||
|
||||
|
||||
void flashc_write_gp_fuse_bit(unsigned int gp_fuse_bit, Bool value)
|
||||
{
|
||||
if (!value)
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_WGPB, gp_fuse_bit & 0x3F);
|
||||
}
|
||||
|
||||
|
||||
void flashc_write_gp_fuse_bitfield(unsigned int pos, unsigned int width, U64 value)
|
||||
{
|
||||
unsigned int error_status = 0;
|
||||
unsigned int gp_fuse_bit;
|
||||
pos &= 0x3F;
|
||||
width = min(width, 64);
|
||||
for (gp_fuse_bit = pos; gp_fuse_bit < pos + width; gp_fuse_bit++, value >>= 1)
|
||||
{
|
||||
flashc_write_gp_fuse_bit(gp_fuse_bit, value & 0x01);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_error_status = error_status;
|
||||
}
|
||||
|
||||
|
||||
void flashc_write_gp_fuse_byte(unsigned int gp_fuse_byte, U8 value)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_PGPFB, (gp_fuse_byte & 0x07) | value << 3);
|
||||
}
|
||||
|
||||
|
||||
void flashc_write_all_gp_fuses(U64 value)
|
||||
{
|
||||
unsigned int error_status = 0;
|
||||
unsigned int gp_fuse_byte;
|
||||
for (gp_fuse_byte = 0; gp_fuse_byte < 8; gp_fuse_byte++, value >>= 8)
|
||||
{
|
||||
flashc_write_gp_fuse_byte(gp_fuse_byte, value);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_error_status = error_status;
|
||||
}
|
||||
|
||||
|
||||
void flashc_set_gp_fuse_bit(unsigned int gp_fuse_bit, Bool value)
|
||||
{
|
||||
if (value)
|
||||
flashc_erase_gp_fuse_bit(gp_fuse_bit, FALSE);
|
||||
else
|
||||
flashc_write_gp_fuse_bit(gp_fuse_bit, FALSE);
|
||||
}
|
||||
|
||||
|
||||
void flashc_set_gp_fuse_bitfield(unsigned int pos, unsigned int width, U64 value)
|
||||
{
|
||||
unsigned int error_status = 0;
|
||||
unsigned int gp_fuse_bit;
|
||||
pos &= 0x3F;
|
||||
width = min(width, 64);
|
||||
for (gp_fuse_bit = pos; gp_fuse_bit < pos + width; gp_fuse_bit++, value >>= 1)
|
||||
{
|
||||
flashc_set_gp_fuse_bit(gp_fuse_bit, value & 0x01);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_error_status = error_status;
|
||||
}
|
||||
|
||||
|
||||
void flashc_set_gp_fuse_byte(unsigned int gp_fuse_byte, U8 value)
|
||||
{
|
||||
unsigned int error_status;
|
||||
switch (value)
|
||||
{
|
||||
case 0xFF:
|
||||
flashc_erase_gp_fuse_byte(gp_fuse_byte, FALSE);
|
||||
break;
|
||||
case 0x00:
|
||||
flashc_write_gp_fuse_byte(gp_fuse_byte, 0x00);
|
||||
break;
|
||||
default:
|
||||
flashc_erase_gp_fuse_byte(gp_fuse_byte, FALSE);
|
||||
error_status = flashc_error_status;
|
||||
flashc_write_gp_fuse_byte(gp_fuse_byte, value);
|
||||
flashc_error_status |= error_status;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void flashc_set_all_gp_fuses(U64 value)
|
||||
{
|
||||
unsigned int error_status;
|
||||
switch (value)
|
||||
{
|
||||
case 0xFFFFFFFFFFFFFFFFULL:
|
||||
flashc_erase_all_gp_fuses(FALSE);
|
||||
break;
|
||||
case 0x0000000000000000ULL:
|
||||
flashc_write_all_gp_fuses(0x0000000000000000ULL);
|
||||
break;
|
||||
default:
|
||||
flashc_erase_all_gp_fuses(FALSE);
|
||||
error_status = flashc_error_status;
|
||||
flashc_write_all_gp_fuses(value);
|
||||
flashc_error_status |= error_status;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Access to Flash Pages
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
void flashc_clear_page_buffer(void)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_CPB, -1);
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_is_page_erased(void)
|
||||
{
|
||||
return ((AVR32_FLASHC.fsr & AVR32_FLASHC_FSR_QPRR_MASK) != 0);
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_quick_page_read(int page_number)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_QPR, page_number);
|
||||
return flashc_is_page_erased();
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_erase_page(int page_number, Bool check)
|
||||
{
|
||||
Bool page_erased = TRUE;
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_EP, page_number);
|
||||
if (check)
|
||||
{
|
||||
unsigned int error_status = flashc_error_status;
|
||||
page_erased = flashc_quick_page_read(-1);
|
||||
flashc_error_status |= error_status;
|
||||
}
|
||||
return page_erased;
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_erase_all_pages(Bool check)
|
||||
{
|
||||
Bool all_pages_erased = TRUE;
|
||||
unsigned int error_status = 0;
|
||||
unsigned int page_number = flashc_get_page_count();
|
||||
while (page_number)
|
||||
{
|
||||
all_pages_erased &= flashc_erase_page(--page_number, check);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_error_status = error_status;
|
||||
return all_pages_erased;
|
||||
}
|
||||
|
||||
|
||||
void flashc_write_page(int page_number)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_WP, page_number);
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_quick_user_page_read(void)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_QPRUP, -1);
|
||||
return flashc_is_page_erased();
|
||||
}
|
||||
|
||||
|
||||
Bool flashc_erase_user_page(Bool check)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_EUP, -1);
|
||||
return (check) ? flashc_quick_user_page_read() : TRUE;
|
||||
}
|
||||
|
||||
|
||||
void flashc_write_user_page(void)
|
||||
{
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_WUP, -1);
|
||||
}
|
||||
|
||||
|
||||
volatile void *flashc_memset8(volatile void *dst, U8 src, size_t nbytes, Bool erase)
|
||||
{
|
||||
return flashc_memset16(dst, src | (U16)src << 8, nbytes, erase);
|
||||
}
|
||||
|
||||
|
||||
volatile void *flashc_memset16(volatile void *dst, U16 src, size_t nbytes, Bool erase)
|
||||
{
|
||||
return flashc_memset32(dst, src | (U32)src << 16, nbytes, erase);
|
||||
}
|
||||
|
||||
|
||||
volatile void *flashc_memset32(volatile void *dst, U32 src, size_t nbytes, Bool erase)
|
||||
{
|
||||
return flashc_memset64(dst, src | (U64)src << 32, nbytes, erase);
|
||||
}
|
||||
|
||||
|
||||
volatile void *flashc_memset64(volatile void *dst, U64 src, size_t nbytes, Bool erase)
|
||||
{
|
||||
// Use aggregated pointers to have several alignments available for a same address.
|
||||
UnionCVPtr flash_array_end;
|
||||
UnionVPtr dest;
|
||||
Union64 source = {0};
|
||||
StructCVPtr dest_end;
|
||||
UnionCVPtr flash_page_source_end;
|
||||
Bool incomplete_flash_page_end;
|
||||
Union64 flash_dword;
|
||||
UnionVPtr tmp;
|
||||
unsigned int error_status = 0;
|
||||
unsigned int i;
|
||||
|
||||
// Reformat arguments.
|
||||
flash_array_end.u8ptr = AVR32_FLASH + flashc_get_flash_size();
|
||||
dest.u8ptr = dst;
|
||||
for (i = (Get_align((U32)dest.u8ptr, sizeof(U64)) - 1) & (sizeof(U64) - 1);
|
||||
src; i = (i - 1) & (sizeof(U64) - 1))
|
||||
{
|
||||
source.u8[i] = src;
|
||||
src >>= 8;
|
||||
}
|
||||
dest_end.u8ptr = dest.u8ptr + nbytes;
|
||||
|
||||
// If destination is outside flash, go to next flash page if any.
|
||||
if (dest.u8ptr < AVR32_FLASH)
|
||||
{
|
||||
dest.u8ptr = AVR32_FLASH;
|
||||
}
|
||||
else if (flash_array_end.u8ptr <= dest.u8ptr && dest.u8ptr < AVR32_FLASHC_USER_PAGE)
|
||||
{
|
||||
dest.u8ptr = AVR32_FLASHC_USER_PAGE;
|
||||
}
|
||||
|
||||
// If end of destination is outside flash, move it to the end of the previous flash page if any.
|
||||
if (dest_end.u8ptr > AVR32_FLASHC_USER_PAGE + AVR32_FLASHC_USER_PAGE_SIZE)
|
||||
{
|
||||
dest_end.u8ptr = AVR32_FLASHC_USER_PAGE + AVR32_FLASHC_USER_PAGE_SIZE;
|
||||
}
|
||||
else if (AVR32_FLASHC_USER_PAGE >= dest_end.u8ptr && dest_end.u8ptr > flash_array_end.u8ptr)
|
||||
{
|
||||
dest_end.u8ptr = flash_array_end.u8ptr;
|
||||
}
|
||||
|
||||
// Align each end of destination pointer with its natural boundary.
|
||||
dest_end.u16ptr = (U16 *)Align_down((U32)dest_end.u8ptr, sizeof(U16));
|
||||
dest_end.u32ptr = (U32 *)Align_down((U32)dest_end.u16ptr, sizeof(U32));
|
||||
dest_end.u64ptr = (U64 *)Align_down((U32)dest_end.u32ptr, sizeof(U64));
|
||||
|
||||
// While end of destination is not reached...
|
||||
while (dest.u8ptr < dest_end.u8ptr)
|
||||
{
|
||||
// Clear the page buffer in order to prepare data for a flash page write.
|
||||
flashc_clear_page_buffer();
|
||||
error_status |= flashc_error_status;
|
||||
|
||||
// Determine where the source data will end in the current flash page.
|
||||
flash_page_source_end.u64ptr =
|
||||
(U64 *)min((U32)dest_end.u64ptr,
|
||||
Align_down((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE) + AVR32_FLASHC_PAGE_SIZE);
|
||||
|
||||
// Determine if the current destination page has an incomplete end.
|
||||
incomplete_flash_page_end = (Align_down((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE) >=
|
||||
Align_down((U32)dest_end.u8ptr, AVR32_FLASHC_PAGE_SIZE));
|
||||
|
||||
// Use a flash double-word buffer to manage unaligned accesses.
|
||||
flash_dword.u64 = source.u64;
|
||||
|
||||
// If destination does not point to the beginning of the current flash page...
|
||||
if (!Test_align((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE))
|
||||
{
|
||||
// Fill the beginning of the page buffer with the current flash page data.
|
||||
// This is required by the hardware, even if page erase is not requested,
|
||||
// in order to be able to write successfully to erased parts of flash
|
||||
// pages that have already been written to.
|
||||
for (tmp.u8ptr = (U8 *)Align_down((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE);
|
||||
tmp.u64ptr < (U64 *)Align_down((U32)dest.u8ptr, sizeof(U64));
|
||||
tmp.u64ptr++)
|
||||
*tmp.u64ptr = *tmp.u64ptr;
|
||||
|
||||
// If destination is not 64-bit aligned...
|
||||
if (!Test_align((U32)dest.u8ptr, sizeof(U64)))
|
||||
{
|
||||
// Fill the beginning of the flash double-word buffer with the current
|
||||
// flash page data.
|
||||
// This is required by the hardware, even if page erase is not
|
||||
// requested, in order to be able to write successfully to erased parts
|
||||
// of flash pages that have already been written to.
|
||||
for (i = 0; i < Get_align((U32)dest.u8ptr, sizeof(U64)); i++)
|
||||
flash_dword.u8[i] = *tmp.u8ptr++;
|
||||
|
||||
// Align the destination pointer with its 64-bit boundary.
|
||||
dest.u64ptr = (U64 *)Align_down((U32)dest.u8ptr, sizeof(U64));
|
||||
|
||||
// If the current destination double-word is not the last one...
|
||||
if (dest.u64ptr < dest_end.u64ptr)
|
||||
{
|
||||
// Write the flash double-word buffer to the page buffer and reinitialize it.
|
||||
*dest.u64ptr++ = flash_dword.u64;
|
||||
flash_dword.u64 = source.u64;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Write the source data to the page buffer with 64-bit alignment.
|
||||
for (i = flash_page_source_end.u64ptr - dest.u64ptr; i; i--)
|
||||
*dest.u64ptr++ = source.u64;
|
||||
|
||||
// If the current destination page has an incomplete end...
|
||||
if (incomplete_flash_page_end)
|
||||
{
|
||||
// This is required by the hardware, even if page erase is not requested,
|
||||
// in order to be able to write successfully to erased parts of flash
|
||||
// pages that have already been written to.
|
||||
{
|
||||
tmp.u8ptr = (volatile U8 *)dest_end.u8ptr;
|
||||
|
||||
// If end of destination is not 64-bit aligned...
|
||||
if (!Test_align((U32)dest_end.u8ptr, sizeof(U64)))
|
||||
{
|
||||
// Fill the end of the flash double-word buffer with the current flash page data.
|
||||
for (i = Get_align((U32)dest_end.u8ptr, sizeof(U64)); i < sizeof(U64); i++)
|
||||
flash_dword.u8[i] = *tmp.u8ptr++;
|
||||
|
||||
// Write the flash double-word buffer to the page buffer.
|
||||
*dest.u64ptr++ = flash_dword.u64;
|
||||
}
|
||||
|
||||
// Fill the end of the page buffer with the current flash page data.
|
||||
for (; !Test_align((U32)tmp.u64ptr, AVR32_FLASHC_PAGE_SIZE); tmp.u64ptr++)
|
||||
*tmp.u64ptr = *tmp.u64ptr;
|
||||
}
|
||||
}
|
||||
|
||||
// If the current flash page is in the flash array...
|
||||
if (dest.u8ptr <= AVR32_FLASHC_USER_PAGE)
|
||||
{
|
||||
// Erase the current page if requested and write it from the page buffer.
|
||||
if (erase)
|
||||
{
|
||||
flashc_erase_page(-1, FALSE);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_write_page(-1);
|
||||
error_status |= flashc_error_status;
|
||||
|
||||
// If the end of the flash array is reached, go to the User page.
|
||||
if (dest.u8ptr >= flash_array_end.u8ptr)
|
||||
dest.u8ptr = AVR32_FLASHC_USER_PAGE;
|
||||
}
|
||||
// If the current flash page is the User page...
|
||||
else
|
||||
{
|
||||
// Erase the User page if requested and write it from the page buffer.
|
||||
if (erase)
|
||||
{
|
||||
flashc_erase_user_page(FALSE);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_write_user_page();
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the FLASHC error status.
|
||||
flashc_error_status = error_status;
|
||||
|
||||
// Return the initial destination pointer as the standard memset function does.
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
||||
volatile void *flashc_memcpy(volatile void *dst, const void *src, size_t nbytes, Bool erase)
|
||||
{
|
||||
// Use aggregated pointers to have several alignments available for a same address.
|
||||
UnionCVPtr flash_array_end;
|
||||
UnionVPtr dest;
|
||||
UnionCPtr source;
|
||||
StructCVPtr dest_end;
|
||||
UnionCVPtr flash_page_source_end;
|
||||
Bool incomplete_flash_page_end;
|
||||
Union64 flash_dword;
|
||||
Bool flash_dword_pending = FALSE;
|
||||
UnionVPtr tmp;
|
||||
unsigned int error_status = 0;
|
||||
unsigned int i, j;
|
||||
|
||||
// Reformat arguments.
|
||||
flash_array_end.u8ptr = AVR32_FLASH + flashc_get_flash_size();
|
||||
dest.u8ptr = dst;
|
||||
source.u8ptr = src;
|
||||
dest_end.u8ptr = dest.u8ptr + nbytes;
|
||||
|
||||
// If destination is outside flash, go to next flash page if any.
|
||||
if (dest.u8ptr < AVR32_FLASH)
|
||||
{
|
||||
source.u8ptr += AVR32_FLASH - dest.u8ptr;
|
||||
dest.u8ptr = AVR32_FLASH;
|
||||
}
|
||||
else if (flash_array_end.u8ptr <= dest.u8ptr && dest.u8ptr < AVR32_FLASHC_USER_PAGE)
|
||||
{
|
||||
source.u8ptr += AVR32_FLASHC_USER_PAGE - dest.u8ptr;
|
||||
dest.u8ptr = AVR32_FLASHC_USER_PAGE;
|
||||
}
|
||||
|
||||
// If end of destination is outside flash, move it to the end of the previous flash page if any.
|
||||
if (dest_end.u8ptr > AVR32_FLASHC_USER_PAGE + AVR32_FLASHC_USER_PAGE_SIZE)
|
||||
{
|
||||
dest_end.u8ptr = AVR32_FLASHC_USER_PAGE + AVR32_FLASHC_USER_PAGE_SIZE;
|
||||
}
|
||||
else if (AVR32_FLASHC_USER_PAGE >= dest_end.u8ptr && dest_end.u8ptr > flash_array_end.u8ptr)
|
||||
{
|
||||
dest_end.u8ptr = flash_array_end.u8ptr;
|
||||
}
|
||||
|
||||
// Align each end of destination pointer with its natural boundary.
|
||||
dest_end.u16ptr = (U16 *)Align_down((U32)dest_end.u8ptr, sizeof(U16));
|
||||
dest_end.u32ptr = (U32 *)Align_down((U32)dest_end.u16ptr, sizeof(U32));
|
||||
dest_end.u64ptr = (U64 *)Align_down((U32)dest_end.u32ptr, sizeof(U64));
|
||||
|
||||
// While end of destination is not reached...
|
||||
while (dest.u8ptr < dest_end.u8ptr)
|
||||
{
|
||||
// Clear the page buffer in order to prepare data for a flash page write.
|
||||
flashc_clear_page_buffer();
|
||||
error_status |= flashc_error_status;
|
||||
|
||||
// Determine where the source data will end in the current flash page.
|
||||
flash_page_source_end.u64ptr =
|
||||
(U64 *)min((U32)dest_end.u64ptr,
|
||||
Align_down((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE) + AVR32_FLASHC_PAGE_SIZE);
|
||||
|
||||
// Determine if the current destination page has an incomplete end.
|
||||
incomplete_flash_page_end = (Align_down((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE) >=
|
||||
Align_down((U32)dest_end.u8ptr, AVR32_FLASHC_PAGE_SIZE));
|
||||
|
||||
// If destination does not point to the beginning of the current flash page...
|
||||
if (!Test_align((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE))
|
||||
{
|
||||
// Fill the beginning of the page buffer with the current flash page data.
|
||||
// This is required by the hardware, even if page erase is not requested,
|
||||
// in order to be able to write successfully to erased parts of flash
|
||||
// pages that have already been written to.
|
||||
for (tmp.u8ptr = (U8 *)Align_down((U32)dest.u8ptr, AVR32_FLASHC_PAGE_SIZE);
|
||||
tmp.u64ptr < (U64 *)Align_down((U32)dest.u8ptr, sizeof(U64));
|
||||
tmp.u64ptr++)
|
||||
*tmp.u64ptr = *tmp.u64ptr;
|
||||
|
||||
// If destination is not 64-bit aligned...
|
||||
if (!Test_align((U32)dest.u8ptr, sizeof(U64)))
|
||||
{
|
||||
// Fill the beginning of the flash double-word buffer with the current
|
||||
// flash page data.
|
||||
// This is required by the hardware, even if page erase is not
|
||||
// requested, in order to be able to write successfully to erased parts
|
||||
// of flash pages that have already been written to.
|
||||
for (i = 0; i < Get_align((U32)dest.u8ptr, sizeof(U64)); i++)
|
||||
flash_dword.u8[i] = *tmp.u8ptr++;
|
||||
|
||||
// Fill the end of the flash double-word buffer with the source data.
|
||||
for (; i < sizeof(U64); i++)
|
||||
flash_dword.u8[i] = *source.u8ptr++;
|
||||
|
||||
// Align the destination pointer with its 64-bit boundary.
|
||||
dest.u64ptr = (U64 *)Align_down((U32)dest.u8ptr, sizeof(U64));
|
||||
|
||||
// If the current destination double-word is not the last one...
|
||||
if (dest.u64ptr < dest_end.u64ptr)
|
||||
{
|
||||
// Write the flash double-word buffer to the page buffer.
|
||||
*dest.u64ptr++ = flash_dword.u64;
|
||||
}
|
||||
// If the current destination double-word is the last one, the flash
|
||||
// double-word buffer must be kept for later.
|
||||
else flash_dword_pending = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Read the source data with the maximal possible alignment and write it to
|
||||
// the page buffer with 64-bit alignment.
|
||||
switch (Get_align((U32)source.u8ptr, sizeof(U32)))
|
||||
{
|
||||
case 0:
|
||||
for (i = flash_page_source_end.u64ptr - dest.u64ptr; i; i--)
|
||||
*dest.u64ptr++ = *source.u64ptr++;
|
||||
break;
|
||||
|
||||
case sizeof(U16):
|
||||
for (i = flash_page_source_end.u64ptr - dest.u64ptr; i; i--)
|
||||
{
|
||||
for (j = 0; j < sizeof(U64) / sizeof(U16); j++) flash_dword.u16[j] = *source.u16ptr++;
|
||||
*dest.u64ptr++ = flash_dword.u64;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
for (i = flash_page_source_end.u64ptr - dest.u64ptr; i; i--)
|
||||
{
|
||||
for (j = 0; j < sizeof(U64); j++) flash_dword.u8[j] = *source.u8ptr++;
|
||||
*dest.u64ptr++ = flash_dword.u64;
|
||||
}
|
||||
}
|
||||
|
||||
// If the current destination page has an incomplete end...
|
||||
if (incomplete_flash_page_end)
|
||||
{
|
||||
// If the flash double-word buffer is in use, do not initialize it.
|
||||
if (flash_dword_pending) i = Get_align((U32)dest_end.u8ptr, sizeof(U64));
|
||||
// If the flash double-word buffer is free...
|
||||
else
|
||||
{
|
||||
// Fill the beginning of the flash double-word buffer with the source data.
|
||||
for (i = 0; i < Get_align((U32)dest_end.u8ptr, sizeof(U64)); i++)
|
||||
flash_dword.u8[i] = *source.u8ptr++;
|
||||
}
|
||||
|
||||
// This is required by the hardware, even if page erase is not requested,
|
||||
// in order to be able to write successfully to erased parts of flash
|
||||
// pages that have already been written to.
|
||||
{
|
||||
tmp.u8ptr = (volatile U8 *)dest_end.u8ptr;
|
||||
|
||||
// If end of destination is not 64-bit aligned...
|
||||
if (!Test_align((U32)dest_end.u8ptr, sizeof(U64)))
|
||||
{
|
||||
// Fill the end of the flash double-word buffer with the current flash page data.
|
||||
for (; i < sizeof(U64); i++)
|
||||
flash_dword.u8[i] = *tmp.u8ptr++;
|
||||
|
||||
// Write the flash double-word buffer to the page buffer.
|
||||
*dest.u64ptr++ = flash_dword.u64;
|
||||
}
|
||||
|
||||
// Fill the end of the page buffer with the current flash page data.
|
||||
for (; !Test_align((U32)tmp.u64ptr, AVR32_FLASHC_PAGE_SIZE); tmp.u64ptr++)
|
||||
*tmp.u64ptr = *tmp.u64ptr;
|
||||
}
|
||||
}
|
||||
|
||||
// If the current flash page is in the flash array...
|
||||
if (dest.u8ptr <= AVR32_FLASHC_USER_PAGE)
|
||||
{
|
||||
// Erase the current page if requested and write it from the page buffer.
|
||||
if (erase)
|
||||
{
|
||||
flashc_erase_page(-1, FALSE);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_write_page(-1);
|
||||
error_status |= flashc_error_status;
|
||||
|
||||
// If the end of the flash array is reached, go to the User page.
|
||||
if (dest.u8ptr >= flash_array_end.u8ptr)
|
||||
{
|
||||
source.u8ptr += AVR32_FLASHC_USER_PAGE - dest.u8ptr;
|
||||
dest.u8ptr = AVR32_FLASHC_USER_PAGE;
|
||||
}
|
||||
}
|
||||
// If the current flash page is the User page...
|
||||
else
|
||||
{
|
||||
// Erase the User page if requested and write it from the page buffer.
|
||||
if (erase)
|
||||
{
|
||||
flashc_erase_user_page(FALSE);
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
flashc_write_user_page();
|
||||
error_status |= flashc_error_status;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the FLASHC error status.
|
||||
flashc_error_status = error_status;
|
||||
|
||||
// Return the initial destination pointer as the standard memcpy function does.
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
||||
#if UC3C
|
||||
void flashc_set_flash_waitstate_and_readmode(unsigned long cpu_f_hz)
|
||||
{
|
||||
//! Device-specific data
|
||||
#undef AVR32_FLASHC_FWS_0_MAX_FREQ
|
||||
#undef AVR32_FLASHC_FWS_1_MAX_FREQ
|
||||
#undef AVR32_FLASHC_HSEN_FWS_0_MAX_FREQ
|
||||
#undef AVR32_FLASHC_HSEN_FWS_1_MAX_FREQ
|
||||
#define AVR32_FLASHC_FWS_0_MAX_FREQ 33000000
|
||||
#define AVR32_FLASHC_FWS_1_MAX_FREQ 66000000
|
||||
#define AVR32_FLASHC_HSEN_FWS_0_MAX_FREQ 33000000
|
||||
#define AVR32_FLASHC_HSEN_FWS_1_MAX_FREQ 72000000
|
||||
// These defines are missing from or wrong in the toolchain header files uc3cxxx.h
|
||||
// Put a Bugzilla
|
||||
|
||||
if(cpu_f_hz > AVR32_FLASHC_HSEN_FWS_0_MAX_FREQ) // > 33MHz
|
||||
{
|
||||
// Set a wait-state
|
||||
flashc_set_wait_state(1);
|
||||
if(cpu_f_hz <= AVR32_FLASHC_FWS_1_MAX_FREQ) // <= 66MHz and >33Mhz
|
||||
{
|
||||
// Disable the high-speed read mode.
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_HSDIS, -1);
|
||||
}
|
||||
else // > 66Mhz
|
||||
{
|
||||
// Enable the high-speed read mode.
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_HSEN, -1);
|
||||
}
|
||||
}
|
||||
else // <= 33 MHz
|
||||
{
|
||||
// Disable wait-state
|
||||
flashc_set_wait_state(0);
|
||||
|
||||
// Disable the high-speed read mode.
|
||||
flashc_issue_command(AVR32_FLASHC_FCMD_CMD_HSDIS, -1);
|
||||
|
||||
}
|
||||
}
|
||||
#endif // UC3C device-specific implementation
|
||||
|
||||
//! @}
|
@ -0,0 +1,1002 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief FLASHC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 Flash Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with a FLASHC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FLASHC_H_
|
||||
#define _FLASHC_H_
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include <stddef.h>
|
||||
#include "compiler.h"
|
||||
|
||||
//! Number of flash regions defined by the FLASHC.
|
||||
#define AVR32_FLASHC_REGIONS (AVR32_FLASHC_FLASH_SIZE /\
|
||||
(AVR32_FLASHC_PAGES_PR_REGION * AVR32_FLASHC_PAGE_SIZE))
|
||||
|
||||
|
||||
/*! \name Flash Properties
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Gets the size of the whole flash array.
|
||||
*
|
||||
* \return The size of the whole flash array in bytes.
|
||||
*/
|
||||
extern unsigned int flashc_get_flash_size(void);
|
||||
|
||||
/*! \brief Gets the total number of pages in the flash array.
|
||||
*
|
||||
* \return The total number of pages in the flash array.
|
||||
*/
|
||||
extern unsigned int flashc_get_page_count(void);
|
||||
|
||||
/*! \brief Gets the number of pages in each flash region.
|
||||
*
|
||||
* \return The number of pages in each flash region.
|
||||
*/
|
||||
extern unsigned int flashc_get_page_count_per_region(void);
|
||||
|
||||
/*! \brief Gets the region number of a page.
|
||||
*
|
||||
* \param page_number The page number:
|
||||
* \arg \c 0 to <tt>(flashc_get_page_count() - 1)</tt>: a page number within
|
||||
* the flash array;
|
||||
* \arg <tt>< 0</tt>: the current page number.
|
||||
*
|
||||
* \return The region number of the specified page.
|
||||
*/
|
||||
extern unsigned int flashc_get_page_region(int page_number);
|
||||
|
||||
/*! \brief Gets the number of the first page of a region.
|
||||
*
|
||||
* \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
|
||||
*
|
||||
* \return The number of the first page of the specified region.
|
||||
*/
|
||||
extern unsigned int flashc_get_region_first_page_number(unsigned int region);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Control
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Gets the number of wait states of flash read accesses.
|
||||
*
|
||||
* \return The number of wait states of flash read accesses.
|
||||
*/
|
||||
extern unsigned int flashc_get_wait_state(void);
|
||||
|
||||
/*! \brief Sets the number of wait states of flash read accesses.
|
||||
*
|
||||
* \param wait_state The number of wait states of flash read accesses: \c 0 to
|
||||
* \c 1.
|
||||
*/
|
||||
extern void flashc_set_wait_state(unsigned int wait_state);
|
||||
|
||||
/*! \brief Tells whether the Flash Ready interrupt is enabled.
|
||||
*
|
||||
* \return Whether the Flash Ready interrupt is enabled.
|
||||
*/
|
||||
extern Bool flashc_is_ready_int_enabled(void);
|
||||
|
||||
/*! \brief Enables or disables the Flash Ready interrupt.
|
||||
*
|
||||
* \param enable Whether to enable the Flash Ready interrupt: \c TRUE or
|
||||
* \c FALSE.
|
||||
*/
|
||||
extern void flashc_enable_ready_int(Bool enable);
|
||||
|
||||
/*! \brief Tells whether the Lock Error interrupt is enabled.
|
||||
*
|
||||
* \return Whether the Lock Error interrupt is enabled.
|
||||
*/
|
||||
extern Bool flashc_is_lock_error_int_enabled(void);
|
||||
|
||||
/*! \brief Enables or disables the Lock Error interrupt.
|
||||
*
|
||||
* \param enable Whether to enable the Lock Error interrupt: \c TRUE or
|
||||
* \c FALSE.
|
||||
*/
|
||||
extern void flashc_enable_lock_error_int(Bool enable);
|
||||
|
||||
/*! \brief Tells whether the Programming Error interrupt is enabled.
|
||||
*
|
||||
* \return Whether the Programming Error interrupt is enabled.
|
||||
*/
|
||||
extern Bool flashc_is_prog_error_int_enabled(void);
|
||||
|
||||
/*! \brief Enables or disables the Programming Error interrupt.
|
||||
*
|
||||
* \param enable Whether to enable the Programming Error interrupt: \c TRUE or
|
||||
* \c FALSE.
|
||||
*/
|
||||
extern void flashc_enable_prog_error_int(Bool enable);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Status
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Tells whether the FLASHC is ready to run a new command.
|
||||
*
|
||||
* \return Whether the FLASHC is ready to run a new command.
|
||||
*/
|
||||
extern Bool flashc_is_ready(void);
|
||||
|
||||
/*! \brief Waits actively until the FLASHC is ready to run a new command.
|
||||
*
|
||||
* This is the default function assigned to \ref flashc_wait_until_ready.
|
||||
*/
|
||||
extern void flashc_default_wait_until_ready(void);
|
||||
|
||||
//! Pointer to the function used by the driver when it needs to wait until the
|
||||
//! FLASHC is ready to run a new command.
|
||||
//! The default function is \ref flashc_default_wait_until_ready.
|
||||
//! The user may change this pointer to use another implementation.
|
||||
extern void (*volatile flashc_wait_until_ready)(void);
|
||||
|
||||
/*! \brief Tells whether a Lock Error has occurred during the last function
|
||||
* called that issued one or more FLASHC commands.
|
||||
*
|
||||
* \return Whether a Lock Error has occurred during the last function called
|
||||
* that issued one or more FLASHC commands.
|
||||
*/
|
||||
extern Bool flashc_is_lock_error(void);
|
||||
|
||||
/*! \brief Tells whether a Programming Error has occurred during the last
|
||||
* function called that issued one or more FLASHC commands.
|
||||
*
|
||||
* \return Whether a Programming Error has occurred during the last function
|
||||
* called that issued one or more FLASHC commands.
|
||||
*/
|
||||
extern Bool flashc_is_programming_error(void);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Command Control
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Gets the last issued FLASHC command.
|
||||
*
|
||||
* \return The last issued FLASHC command.
|
||||
*/
|
||||
extern unsigned int flashc_get_command(void);
|
||||
|
||||
/*! \brief Gets the current FLASHC page number.
|
||||
*
|
||||
* \return The current FLASHC page number.
|
||||
*/
|
||||
extern unsigned int flashc_get_page_number(void);
|
||||
|
||||
/*! \brief Issues a FLASHC command.
|
||||
*
|
||||
* \param command The command: \c AVR32_FLASHC_FCMD_CMD_x.
|
||||
* \param page_number The page number to apply the command to:
|
||||
* \arg \c 0 to <tt>(flashc_get_page_count() - 1)</tt>: a page number within
|
||||
* the flash array;
|
||||
* \arg <tt>< 0</tt>: use this to apply the command to the current page number
|
||||
* or if the command does not apply to any page number;
|
||||
* \arg this argument may have other meanings according to the command. See
|
||||
* the FLASHC chapter of the MCU datasheet.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command violates the protection
|
||||
* mechanism.
|
||||
*
|
||||
* \warning A Programming Error is issued if the command is invalid.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_issue_command(unsigned int command, int page_number);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Global Commands
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Issues a No Operation command to the FLASHC.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_no_operation(void);
|
||||
|
||||
/*! \brief Issues an Erase All command to the FLASHC.
|
||||
*
|
||||
* This command erases all bits in the flash array, the general-purpose fuse
|
||||
* bits and the Security bit. The User page is not erased.
|
||||
*
|
||||
* This command also ensures that all volatile memories, such as register file
|
||||
* and RAMs, are erased before the Security bit is erased, i.e. deactivated.
|
||||
*
|
||||
* \warning A Lock Error is issued if at least one region is locked or the
|
||||
* bootloader protection is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*/
|
||||
extern void flashc_erase_all(void);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name FLASHC Protection Mechanisms
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Tells whether the Security bit is active.
|
||||
*
|
||||
* \return Whether the Security bit is active.
|
||||
*/
|
||||
extern Bool flashc_is_security_bit_active(void);
|
||||
|
||||
/*! \brief Activates the Security bit.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_activate_security_bit(void);
|
||||
|
||||
/*! \brief Gets the bootloader protected size.
|
||||
*
|
||||
* \return The bootloader protected size in bytes.
|
||||
*/
|
||||
extern unsigned int flashc_get_bootloader_protected_size(void);
|
||||
|
||||
/*! \brief Sets the bootloader protected size.
|
||||
*
|
||||
* \param bootprot_size The wanted bootloader protected size in bytes. If this
|
||||
* size is not supported, the actual size will be the
|
||||
* nearest greater available size or the maximal possible
|
||||
* size if the requested size is too large.
|
||||
*
|
||||
* \return The actual bootloader protected size in bytes.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern unsigned int flashc_set_bootloader_protected_size(unsigned int bootprot_size);
|
||||
|
||||
/*! \brief Tells whether external privileged fetch is locked.
|
||||
*
|
||||
* \return Whether external privileged fetch is locked.
|
||||
*/
|
||||
extern Bool flashc_is_external_privileged_fetch_locked(void);
|
||||
|
||||
/*! \brief Locks or unlocks external privileged fetch.
|
||||
*
|
||||
* \param lock Whether to lock external privileged fetch: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_lock_external_privileged_fetch(Bool lock);
|
||||
|
||||
/*! \brief Tells whether the region of a page is locked.
|
||||
*
|
||||
* \param page_number The page number:
|
||||
* \arg \c 0 to <tt>(flashc_get_page_count() - 1)</tt>: a page number within
|
||||
* the flash array;
|
||||
* \arg <tt>< 0</tt>: the current page number.
|
||||
*
|
||||
* \return Whether the region of the specified page is locked.
|
||||
*/
|
||||
extern Bool flashc_is_page_region_locked(int page_number);
|
||||
|
||||
/*! \brief Tells whether a region is locked.
|
||||
*
|
||||
* \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
|
||||
*
|
||||
* \return Whether the specified region is locked.
|
||||
*/
|
||||
extern Bool flashc_is_region_locked(unsigned int region);
|
||||
|
||||
/*! \brief Locks or unlocks the region of a page.
|
||||
*
|
||||
* \param page_number The page number:
|
||||
* \arg \c 0 to <tt>(flashc_get_page_count() - 1)</tt>: a page number within
|
||||
* the flash array;
|
||||
* \arg <tt>< 0</tt>: the current page number.
|
||||
* \param lock Whether to lock the region of the specified page: \c TRUE or
|
||||
* \c FALSE.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_lock_page_region(int page_number, Bool lock);
|
||||
|
||||
/*! \brief Locks or unlocks a region.
|
||||
*
|
||||
* \param region The region number: \c 0 to <tt>(AVR32_FLASHC_REGIONS - 1)</tt>.
|
||||
* \param lock Whether to lock the specified region: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_lock_region(unsigned int region, Bool lock);
|
||||
|
||||
/*! \brief Locks or unlocks all regions.
|
||||
*
|
||||
* \param lock Whether to lock the regions: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_lock_all_regions(Bool lock);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Access to General-Purpose Fuses
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Reads a general-purpose fuse bit.
|
||||
*
|
||||
* \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
|
||||
*
|
||||
* \return The value of the specified general-purpose fuse bit.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern Bool flashc_read_gp_fuse_bit(unsigned int gp_fuse_bit);
|
||||
|
||||
/*! \brief Reads a general-purpose fuse bit-field.
|
||||
*
|
||||
* \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 63.
|
||||
* \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 64.
|
||||
*
|
||||
* \return The value of the specified general-purpose fuse bit-field.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern U64 flashc_read_gp_fuse_bitfield(unsigned int pos, unsigned int width);
|
||||
|
||||
/*! \brief Reads a general-purpose fuse byte.
|
||||
*
|
||||
* \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
|
||||
*
|
||||
* \return The value of the specified general-purpose fuse byte.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern U8 flashc_read_gp_fuse_byte(unsigned int gp_fuse_byte);
|
||||
|
||||
/*! \brief Reads all general-purpose fuses.
|
||||
*
|
||||
* \return The value of all general-purpose fuses as a word.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern U64 flashc_read_all_gp_fuses(void);
|
||||
|
||||
/*! \brief Erases a general-purpose fuse bit.
|
||||
*
|
||||
* \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
|
||||
* \param check Whether to check erase: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return Whether the erase succeeded or always \c TRUE if erase check was not
|
||||
* requested.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active and the command
|
||||
* is applied to BOOTPROT or EPFL fuses.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern Bool flashc_erase_gp_fuse_bit(unsigned int gp_fuse_bit, Bool check);
|
||||
|
||||
/*! \brief Erases a general-purpose fuse bit-field.
|
||||
*
|
||||
* \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 63.
|
||||
* \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 64.
|
||||
* \param check Whether to check erase: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return Whether the erase succeeded or always \c TRUE if erase check was not
|
||||
* requested.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active and the command
|
||||
* is applied to BOOTPROT or EPFL fuses.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern Bool flashc_erase_gp_fuse_bitfield(unsigned int pos, unsigned int width, Bool check);
|
||||
|
||||
/*! \brief Erases a general-purpose fuse byte.
|
||||
*
|
||||
* \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
|
||||
* \param check Whether to check erase: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return Whether the erase succeeded or always \c TRUE if erase check was not
|
||||
* requested.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern Bool flashc_erase_gp_fuse_byte(unsigned int gp_fuse_byte, Bool check);
|
||||
|
||||
/*! \brief Erases all general-purpose fuses.
|
||||
*
|
||||
* \param check Whether to check erase: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return Whether the erase succeeded or always \c TRUE if erase check was not
|
||||
* requested.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern Bool flashc_erase_all_gp_fuses(Bool check);
|
||||
|
||||
/*! \brief Writes a general-purpose fuse bit.
|
||||
*
|
||||
* \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
|
||||
* \param value The value of the specified general-purpose fuse bit.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active and the command
|
||||
* is applied to BOOTPROT or EPFL fuses.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note A write operation can only clear bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_write_gp_fuse_bit(unsigned int gp_fuse_bit, Bool value);
|
||||
|
||||
/*! \brief Writes a general-purpose fuse bit-field.
|
||||
*
|
||||
* \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 63.
|
||||
* \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 64.
|
||||
* \param value The value of the specified general-purpose fuse bit-field.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active and the command
|
||||
* is applied to BOOTPROT or EPFL fuses.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note A write operation can only clear bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_write_gp_fuse_bitfield(unsigned int pos, unsigned int width, U64 value);
|
||||
|
||||
/*! \brief Writes a general-purpose fuse byte.
|
||||
*
|
||||
* \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
|
||||
* \param value The value of the specified general-purpose fuse byte.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note A write operation can only clear bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_write_gp_fuse_byte(unsigned int gp_fuse_byte, U8 value);
|
||||
|
||||
/*! \brief Writes all general-purpose fuses.
|
||||
*
|
||||
* \param value The value of all general-purpose fuses as a word.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note A write operation can only clear bits.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_write_all_gp_fuses(U64 value);
|
||||
|
||||
/*! \brief Sets a general-purpose fuse bit with the appropriate erase and write
|
||||
* operations.
|
||||
*
|
||||
* \param gp_fuse_bit The general-purpose fuse bit: \c 0 to \c 63.
|
||||
* \param value The value of the specified general-purpose fuse bit.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active and the command
|
||||
* is applied to BOOTPROT or EPFL fuses.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_set_gp_fuse_bit(unsigned int gp_fuse_bit, Bool value);
|
||||
|
||||
/*! \brief Sets a general-purpose fuse bit-field with the appropriate erase and
|
||||
* write operations.
|
||||
*
|
||||
* \param pos The bit-position of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 63.
|
||||
* \param width The bit-width of the general-purpose fuse bit-field: \c 0 to
|
||||
* \c 64.
|
||||
* \param value The value of the specified general-purpose fuse bit-field.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active and the command
|
||||
* is applied to BOOTPROT or EPFL fuses.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_set_gp_fuse_bitfield(unsigned int pos, unsigned int width, U64 value);
|
||||
|
||||
/*! \brief Sets a general-purpose fuse byte with the appropriate erase and write
|
||||
* operations.
|
||||
*
|
||||
* \param gp_fuse_byte The general-purpose fuse byte: \c 0 to \c 7.
|
||||
* \param value The value of the specified general-purpose fuse byte.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_set_gp_fuse_byte(unsigned int gp_fuse_byte, U8 value);
|
||||
|
||||
/*! \brief Sets all general-purpose fuses with the appropriate erase and write
|
||||
* operations.
|
||||
*
|
||||
* \param value The value of all general-purpose fuses as a word.
|
||||
*
|
||||
* \warning A Lock Error is issued if the Security bit is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note The actual number of general-purpose fuse bits implemented by hardware
|
||||
* is given by \c AVR32_FLASHC_GPF_NUM. The other bits among the 64 are
|
||||
* fixed at 1 by hardware.
|
||||
*/
|
||||
extern void flashc_set_all_gp_fuses(U64 value);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Access to Flash Pages
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Clears the page buffer.
|
||||
*
|
||||
* This command resets all bits in the page buffer to one. Write accesses to the
|
||||
* page buffer can only change page buffer bits from one to zero.
|
||||
*
|
||||
* \warning The page buffer is not automatically reset after a page write.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern void flashc_clear_page_buffer(void);
|
||||
|
||||
/*! \brief Tells whether the page to which the last Quick Page Read or Quick
|
||||
* Page Read User Page command was applied was erased.
|
||||
*
|
||||
* \return Whether the page to which the last Quick Page Read or Quick Page Read
|
||||
* User Page command was applied was erased.
|
||||
*/
|
||||
extern Bool flashc_is_page_erased(void);
|
||||
|
||||
/*! \brief Applies the Quick Page Read command to a page.
|
||||
*
|
||||
* \param page_number The page number:
|
||||
* \arg \c 0 to <tt>(flashc_get_page_count() - 1)</tt>: a page number within
|
||||
* the flash array;
|
||||
* \arg <tt>< 0</tt>: the current page number.
|
||||
*
|
||||
* \return Whether the specified page is erased.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern Bool flashc_quick_page_read(int page_number);
|
||||
|
||||
/*! \brief Erases a page.
|
||||
*
|
||||
* \param page_number The page number:
|
||||
* \arg \c 0 to <tt>(flashc_get_page_count() - 1)</tt>: a page number within
|
||||
* the flash array;
|
||||
* \arg <tt>< 0</tt>: the current page number.
|
||||
* \param check Whether to check erase: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return Whether the erase succeeded or always \c TRUE if erase check was not
|
||||
* requested.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to a page belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*/
|
||||
extern Bool flashc_erase_page(int page_number, Bool check);
|
||||
|
||||
/*! \brief Erases all pages within the flash array.
|
||||
*
|
||||
* \param check Whether to check erase: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return Whether the erase succeeded or always \c TRUE if erase check was not
|
||||
* requested.
|
||||
*
|
||||
* \warning A Lock Error is issued if at least one region is locked or the
|
||||
* bootloader protection is active.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*/
|
||||
extern Bool flashc_erase_all_pages(Bool check);
|
||||
|
||||
/*! \brief Writes a page from the page buffer.
|
||||
*
|
||||
* \param page_number The page number:
|
||||
* \arg \c 0 to <tt>(flashc_get_page_count() - 1)</tt>: a page number within
|
||||
* the flash array;
|
||||
* \arg <tt>< 0</tt>: the current page number.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to a page belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \warning The page buffer is not automatically reset after a page write.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note A write operation can only clear bits.
|
||||
*/
|
||||
extern void flashc_write_page(int page_number);
|
||||
|
||||
/*! \brief Issues a Quick Page Read User Page command to the FLASHC.
|
||||
*
|
||||
* \return Whether the User page is erased.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern Bool flashc_quick_user_page_read(void);
|
||||
|
||||
/*! \brief Erases the User page.
|
||||
*
|
||||
* \param check Whether to check erase: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return Whether the erase succeeded or always \c TRUE if erase check was not
|
||||
* requested.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note An erase operation can only set bits.
|
||||
*/
|
||||
extern Bool flashc_erase_user_page(Bool check);
|
||||
|
||||
/*! \brief Writes the User page from the page buffer.
|
||||
*
|
||||
* \warning The page buffer is not automatically reset after a page write.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*
|
||||
* \note A write operation can only clear bits.
|
||||
*/
|
||||
extern void flashc_write_user_page(void);
|
||||
|
||||
/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
|
||||
* from the repeated \a src source byte.
|
||||
*
|
||||
* The destination areas that are not within the flash array or the User page
|
||||
* are ignored.
|
||||
*
|
||||
* All pointer and size alignments are supported.
|
||||
*
|
||||
* \param dst Pointer to flash destination.
|
||||
* \param src Source byte.
|
||||
* \param nbytes Number of bytes to set.
|
||||
* \param erase Whether to erase before writing: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return The value of \a dst.
|
||||
*
|
||||
* \warning This function may be called with \a erase set to \c FALSE only if
|
||||
* the destination consists only of erased words, i.e. this function
|
||||
* can not be used to write only one bit of a previously written word.
|
||||
* E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
|
||||
* resulting value in flash may be different from \c 0x00000000.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to pages belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern volatile void *flashc_memset8(volatile void *dst, U8 src, size_t nbytes, Bool erase);
|
||||
|
||||
/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
|
||||
* from the repeated \a src big-endian source half-word.
|
||||
*
|
||||
* The destination areas that are not within the flash array or the User page
|
||||
* are ignored.
|
||||
*
|
||||
* All pointer and size alignments are supported.
|
||||
*
|
||||
* \param dst Pointer to flash destination.
|
||||
* \param src Source half-word.
|
||||
* \param nbytes Number of bytes to set.
|
||||
* \param erase Whether to erase before writing: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return The value of \a dst.
|
||||
*
|
||||
* \warning This function may be called with \a erase set to \c FALSE only if
|
||||
* the destination consists only of erased words, i.e. this function
|
||||
* can not be used to write only one bit of a previously written word.
|
||||
* E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
|
||||
* resulting value in flash may be different from \c 0x00000000.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to pages belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern volatile void *flashc_memset16(volatile void *dst, U16 src, size_t nbytes, Bool erase);
|
||||
|
||||
/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
|
||||
* from the repeated \a src big-endian source word.
|
||||
*
|
||||
* The destination areas that are not within the flash array or the User page
|
||||
* are ignored.
|
||||
*
|
||||
* All pointer and size alignments are supported.
|
||||
*
|
||||
* \param dst Pointer to flash destination.
|
||||
* \param src Source word.
|
||||
* \param nbytes Number of bytes to set.
|
||||
* \param erase Whether to erase before writing: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return The value of \a dst.
|
||||
*
|
||||
* \warning This function may be called with \a erase set to \c FALSE only if
|
||||
* the destination consists only of erased words, i.e. this function
|
||||
* can not be used to write only one bit of a previously written word.
|
||||
* E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
|
||||
* resulting value in flash may be different from \c 0x00000000.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to pages belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern volatile void *flashc_memset32(volatile void *dst, U32 src, size_t nbytes, Bool erase);
|
||||
|
||||
/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
|
||||
* from the repeated \a src big-endian source double-word.
|
||||
*
|
||||
* The destination areas that are not within the flash array or the User page
|
||||
* are ignored.
|
||||
*
|
||||
* All pointer and size alignments are supported.
|
||||
*
|
||||
* \param dst Pointer to flash destination.
|
||||
* \param src Source double-word.
|
||||
* \param nbytes Number of bytes to set.
|
||||
* \param erase Whether to erase before writing: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return The value of \a dst.
|
||||
*
|
||||
* \warning This function may be called with \a erase set to \c FALSE only if
|
||||
* the destination consists only of erased words, i.e. this function
|
||||
* can not be used to write only one bit of a previously written word.
|
||||
* E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
|
||||
* resulting value in flash may be different from \c 0x00000000.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to pages belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern volatile void *flashc_memset64(volatile void *dst, U64 src, size_t nbytes, Bool erase);
|
||||
|
||||
/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
|
||||
* from the repeated \a src big-endian source pattern.
|
||||
*
|
||||
* The destination areas that are not within the flash array or the User page
|
||||
* are ignored.
|
||||
*
|
||||
* All pointer and size alignments are supported.
|
||||
*
|
||||
* \param dst Pointer to flash destination.
|
||||
* \param src Source double-word.
|
||||
* \param src_width \a src width in bits: 8, 16, 32 or 64.
|
||||
* \param nbytes Number of bytes to set.
|
||||
* \param erase Whether to erase before writing: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return The value of \a dst.
|
||||
*
|
||||
* \warning This function may be called with \a erase set to \c FALSE only if
|
||||
* the destination consists only of erased words, i.e. this function
|
||||
* can not be used to write only one bit of a previously written word.
|
||||
* E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
|
||||
* resulting value in flash may be different from \c 0x00000000.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to pages belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
#define flashc_memset(dst, src, src_width, nbytes, erase) \
|
||||
TPASTE2(flashc_memset, src_width)((dst), (src), (nbytes), (erase))
|
||||
|
||||
/*! \brief Copies \a nbytes bytes to the flash destination pointed to by \a dst
|
||||
* from the source pointed to by \a src.
|
||||
*
|
||||
* The destination areas that are not within the flash array or the User page
|
||||
* are ignored.
|
||||
*
|
||||
* All pointer and size alignments are supported.
|
||||
*
|
||||
* \param dst Pointer to flash destination.
|
||||
* \param src Pointer to source data.
|
||||
* \param nbytes Number of bytes to copy.
|
||||
* \param erase Whether to erase before writing: \c TRUE or \c FALSE.
|
||||
*
|
||||
* \return The value of \a dst.
|
||||
*
|
||||
* \warning If copying takes place between areas that overlap, the behavior is
|
||||
* undefined.
|
||||
*
|
||||
* \warning This function may be called with \a erase set to \c FALSE only if
|
||||
* the destination consists only of erased words, i.e. this function
|
||||
* can not be used to write only one bit of a previously written word.
|
||||
* E.g., if \c 0x00000001 then \c 0xFFFFFFFE are written to a word, the
|
||||
* resulting value in flash may be different from \c 0x00000000.
|
||||
*
|
||||
* \warning A Lock Error is issued if the command is applied to pages belonging
|
||||
* to a locked region or to the bootloader protected area.
|
||||
*
|
||||
* \note The FLASHC error status returned by \ref flashc_is_lock_error and
|
||||
* \ref flashc_is_programming_error is updated.
|
||||
*/
|
||||
extern volatile void *flashc_memcpy(volatile void *dst, const void *src, size_t nbytes, Bool erase);
|
||||
|
||||
#if UC3C
|
||||
|
||||
/*! \brief Depednding to the CPU frequency, set the wait states of flash read
|
||||
* accesses and enable or disable the High speed read mode.
|
||||
*
|
||||
* \param cpu_f_hz The CPU frequency
|
||||
*/
|
||||
void flashc_set_flash_waitstate_and_readmode(unsigned long cpu_f_hz);
|
||||
#endif // UC3C device-specific implementation
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // _FLASHC_H_
|
@ -0,0 +1,458 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file has been prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief GPIO driver for AVR32 UC3.
|
||||
*
|
||||
* This file defines a useful set of functions for the GPIO.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with a GPIO module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
//! GPIO module instance.
|
||||
#define GPIO AVR32_GPIO
|
||||
|
||||
|
||||
/*! \name Peripheral Bus Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
int gpio_enable_module(const gpio_map_t gpiomap, unsigned int size)
|
||||
{
|
||||
int status = GPIO_SUCCESS;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
status |= gpio_enable_module_pin(gpiomap->pin, gpiomap->function);
|
||||
gpiomap++;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
int gpio_enable_module_pin(unsigned int pin, unsigned int function)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
// Enable the correct function.
|
||||
switch (function)
|
||||
{
|
||||
case 0: // A function.
|
||||
gpio_port->pmr0c = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1c = 1 << (pin & 0x1F);
|
||||
#if defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
gpio_port->pmr2c = 1 << (pin & 0x1F);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 1: // B function.
|
||||
gpio_port->pmr0s = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1c = 1 << (pin & 0x1F);
|
||||
#if defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
gpio_port->pmr2c = 1 << (pin & 0x1F);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 2: // C function.
|
||||
gpio_port->pmr0c = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1s = 1 << (pin & 0x1F);
|
||||
#if defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
gpio_port->pmr2c = 1 << (pin & 0x1F);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 3: // D function.
|
||||
gpio_port->pmr0s = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1s = 1 << (pin & 0x1F);
|
||||
#if defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
gpio_port->pmr2c = 1 << (pin & 0x1F);
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
case 4: // E function.
|
||||
gpio_port->pmr0c = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1c = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr2s = 1 << (pin & 0x1F);
|
||||
break;
|
||||
|
||||
case 5: // F function.
|
||||
gpio_port->pmr0s = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1c = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr2s = 1 << (pin & 0x1F);
|
||||
break;
|
||||
|
||||
case 6: // G function.
|
||||
gpio_port->pmr0c = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1s = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr2s = 1 << (pin & 0x1F);
|
||||
break;
|
||||
|
||||
case 7: // H function.
|
||||
gpio_port->pmr0s = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr1s = 1 << (pin & 0x1F);
|
||||
gpio_port->pmr2s = 1 << (pin & 0x1F);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
return GPIO_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
// Disable GPIO control.
|
||||
gpio_port->gperc = 1 << (pin & 0x1F);
|
||||
|
||||
return GPIO_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void gpio_enable_gpio(const gpio_map_t gpiomap, unsigned int size)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
gpio_enable_gpio_pin(gpiomap->pin);
|
||||
gpiomap++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void gpio_enable_gpio_pin(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->oderc = 1 << (pin & 0x1F);
|
||||
gpio_port->gpers = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
// The open-drain mode is not synthesized on the current AVR32 products.
|
||||
// If one day some AVR32 products have this feature, the corresponding part
|
||||
// numbers should be listed in the #if below.
|
||||
// Note that other functions are available in this driver to use pins with open
|
||||
// drain in GPIO mode. The advantage of the open-drain mode functions over these
|
||||
// other functions is that they can be used not only in GPIO mode but also in
|
||||
// module mode.
|
||||
#if 0
|
||||
|
||||
|
||||
void gpio_enable_pin_open_drain(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->odmers = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
void gpio_disable_pin_open_drain(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->odmerc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void gpio_enable_pin_pull_up(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->puers = 1 << (pin & 0x1F);
|
||||
#if defined(AVR32_GPIO_200_H_INCLUDED) || defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
gpio_port->pderc = 1 << (pin & 0x1F);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void gpio_disable_pin_pull_up(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->puerc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
#if defined(AVR32_GPIO_200_H_INCLUDED) || defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
// Added support of Pull-up Resistor, Pull-down Resistor and Buskeeper Control.
|
||||
|
||||
/*! \brief Enables the pull-down resistor of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
void gpio_enable_pin_pull_down(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->puerc = 1 << (pin & 0x1F);
|
||||
gpio_port->pders = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Disables the pull-down resistor of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
void gpio_disable_pin_pull_down(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->pderc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Enables the buskeeper functionality on a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
void gpio_enable_pin_buskeeper(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->puers = 1 << (pin & 0x1F);
|
||||
gpio_port->pders = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Disables the buskeeper functionality on a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
void gpio_disable_pin_buskeeper(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->puerc = 1 << (pin & 0x1F);
|
||||
gpio_port->pderc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int gpio_get_pin_value(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
return (gpio_port->pvr >> (pin & 0x1F)) & 1;
|
||||
}
|
||||
|
||||
|
||||
int gpio_get_gpio_pin_output_value(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
return (gpio_port->ovr >> (pin & 0x1F)) & 1;
|
||||
}
|
||||
|
||||
|
||||
int gpio_get_gpio_open_drain_pin_output_value(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
return ((gpio_port->oder >> (pin & 0x1F)) & 1) ^ 1;
|
||||
}
|
||||
|
||||
|
||||
void gpio_set_gpio_pin(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
gpio_port->ovrs = 1 << (pin & 0x1F); // Value to be driven on the I/O line: 1.
|
||||
gpio_port->oders = 1 << (pin & 0x1F); // The GPIO output driver is enabled for that pin.
|
||||
gpio_port->gpers = 1 << (pin & 0x1F); // The GPIO module controls that pin.
|
||||
}
|
||||
|
||||
|
||||
void gpio_clr_gpio_pin(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
gpio_port->ovrc = 1 << (pin & 0x1F); // Value to be driven on the I/O line: 0.
|
||||
gpio_port->oders = 1 << (pin & 0x1F); // The GPIO output driver is enabled for that pin.
|
||||
gpio_port->gpers = 1 << (pin & 0x1F); // The GPIO module controls that pin.
|
||||
}
|
||||
|
||||
|
||||
void gpio_tgl_gpio_pin(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
gpio_port->ovrt = 1 << (pin & 0x1F); // Toggle the I/O line.
|
||||
gpio_port->oders = 1 << (pin & 0x1F); // The GPIO output driver is enabled for that pin.
|
||||
gpio_port->gpers = 1 << (pin & 0x1F); // The GPIO module controls that pin.
|
||||
}
|
||||
|
||||
|
||||
void gpio_set_gpio_open_drain_pin(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
gpio_port->oderc = 1 << (pin & 0x1F); // The GPIO output driver is disabled for that pin.
|
||||
gpio_port->gpers = 1 << (pin & 0x1F); // The GPIO module controls that pin.
|
||||
}
|
||||
|
||||
|
||||
void gpio_clr_gpio_open_drain_pin(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
gpio_port->ovrc = 1 << (pin & 0x1F); // Value to be driven on the I/O line: 0.
|
||||
gpio_port->oders = 1 << (pin & 0x1F); // The GPIO output driver is enabled for that pin.
|
||||
gpio_port->gpers = 1 << (pin & 0x1F); // The GPIO module controls that pin.
|
||||
}
|
||||
|
||||
|
||||
void gpio_tgl_gpio_open_drain_pin(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
gpio_port->ovrc = 1 << (pin & 0x1F); // Value to be driven on the I/O line if the GPIO output driver is enabled: 0.
|
||||
gpio_port->odert = 1 << (pin & 0x1F); // The GPIO output driver is toggled for that pin.
|
||||
gpio_port->gpers = 1 << (pin & 0x1F); // The GPIO module controls that pin.
|
||||
}
|
||||
|
||||
|
||||
void gpio_enable_pin_glitch_filter(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->gfers = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
void gpio_disable_pin_glitch_filter(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->gferc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Configure the edge detector of an input pin
|
||||
*
|
||||
* \param pin The pin number.
|
||||
* \param mode The edge detection mode (\ref GPIO_PIN_CHANGE, \ref GPIO_RISING_EDGE
|
||||
* or \ref GPIO_FALLING_EDGE).
|
||||
*
|
||||
* \return \ref GPIO_SUCCESS or \ref GPIO_INVALID_ARGUMENT.
|
||||
*/
|
||||
static int gpio_configure_edge_detector(unsigned int pin, unsigned int mode)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
// Configure the edge detector.
|
||||
switch (mode)
|
||||
{
|
||||
case GPIO_PIN_CHANGE:
|
||||
gpio_port->imr0c = 1 << (pin & 0x1F);
|
||||
gpio_port->imr1c = 1 << (pin & 0x1F);
|
||||
break;
|
||||
|
||||
case GPIO_RISING_EDGE:
|
||||
gpio_port->imr0s = 1 << (pin & 0x1F);
|
||||
gpio_port->imr1c = 1 << (pin & 0x1F);
|
||||
break;
|
||||
|
||||
case GPIO_FALLING_EDGE:
|
||||
gpio_port->imr0c = 1 << (pin & 0x1F);
|
||||
gpio_port->imr1s = 1 << (pin & 0x1F);
|
||||
break;
|
||||
|
||||
default:
|
||||
return GPIO_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
return GPIO_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int gpio_enable_pin_interrupt(unsigned int pin, unsigned int mode)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
// Enable the glitch filter.
|
||||
gpio_port->gfers = 1 << (pin & 0x1F);
|
||||
|
||||
// Configure the edge detector.
|
||||
if(GPIO_INVALID_ARGUMENT == gpio_configure_edge_detector(pin, mode))
|
||||
return(GPIO_INVALID_ARGUMENT);
|
||||
|
||||
// Enable interrupt.
|
||||
gpio_port->iers = 1 << (pin & 0x1F);
|
||||
|
||||
return GPIO_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void gpio_disable_pin_interrupt(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->ierc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
int gpio_get_pin_interrupt_flag(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
return (gpio_port->ifr >> (pin & 0x1F)) & 1;
|
||||
}
|
||||
|
||||
|
||||
void gpio_clear_pin_interrupt_flag(unsigned int pin)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
gpio_port->ifrc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
//#
|
||||
//# Peripheral Event System Support.
|
||||
//#
|
||||
#if UC3L
|
||||
int gpio_configure_pin_periph_event_mode(unsigned int pin, unsigned int mode, unsigned int use_igf)
|
||||
{
|
||||
volatile avr32_gpio_port_t *gpio_port = &GPIO.port[pin >> 5];
|
||||
|
||||
if(TRUE == use_igf)
|
||||
{
|
||||
// Enable the glitch filter.
|
||||
gpio_port->gfers = 1 << (pin & 0x1F);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Disable the glitch filter.
|
||||
gpio_port->gferc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
// Configure the edge detector.
|
||||
return(gpio_configure_edge_detector(pin, mode));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//! @}
|
@ -0,0 +1,583 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file has been prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief GPIO header for AVR32 UC3.
|
||||
*
|
||||
* This file contains basic GPIO driver functions.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with a GPIO module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _GPIO_H_
|
||||
#define _GPIO_H_
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include "compiler.h"
|
||||
|
||||
/*! \name Return Values of the GPIO API
|
||||
*/
|
||||
//! @{
|
||||
#define GPIO_SUCCESS 0 //!< Function successfully completed.
|
||||
#define GPIO_INVALID_ARGUMENT 1 //!< Input parameters are out of range.
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Interrupt Trigger Modes
|
||||
*/
|
||||
//! @{
|
||||
#define GPIO_PIN_CHANGE 0 //!< Interrupt triggered upon pin change.
|
||||
#define GPIO_RISING_EDGE 1 //!< Interrupt triggered upon rising edge.
|
||||
#define GPIO_FALLING_EDGE 2 //!< Interrupt triggered upon falling edge.
|
||||
//! @}
|
||||
|
||||
|
||||
//! A type definition of pins and modules connectivity.
|
||||
typedef struct
|
||||
{
|
||||
unsigned char pin; //!< Module pin.
|
||||
unsigned char function; //!< Module function.
|
||||
} gpio_map_t[];
|
||||
|
||||
|
||||
/*! \name Peripheral Bus Interface
|
||||
*
|
||||
* Low-speed interface with a non-deterministic number of clock cycles per
|
||||
* access.
|
||||
*
|
||||
* This interface operates with lower clock frequencies (fPB <= fCPU), and its
|
||||
* timing is not deterministic since it needs to access a shared bus which may
|
||||
* be heavily loaded.
|
||||
*
|
||||
* \note This interface is immediately available without initialization.
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Enables specific module modes for a set of pins.
|
||||
*
|
||||
* \param gpiomap The pin map.
|
||||
* \param size The number of pins in \a gpiomap.
|
||||
*
|
||||
* \return \ref GPIO_SUCCESS or \ref GPIO_INVALID_ARGUMENT.
|
||||
*/
|
||||
extern int gpio_enable_module(const gpio_map_t gpiomap, unsigned int size);
|
||||
|
||||
/*! \brief Enables a specific module mode for a pin.
|
||||
*
|
||||
* \param pin The pin number.\n
|
||||
* Refer to the product header file `uc3x.h' (where x is the part
|
||||
* number; e.g. x = a0512) for module pins. E.g., to enable a PWM
|
||||
* channel output, the pin number can be AVR32_PWM_3_PIN for PWM
|
||||
* channel 3.
|
||||
* \param function The pin function.\n
|
||||
* Refer to the product header file `uc3x.h' (where x is the
|
||||
* part number; e.g. x = a0512) for module pin functions. E.g.,
|
||||
* to enable a PWM channel output, the pin function can be
|
||||
* AVR32_PWM_3_FUNCTION for PWM channel 3.
|
||||
*
|
||||
* \return \ref GPIO_SUCCESS or \ref GPIO_INVALID_ARGUMENT.
|
||||
*/
|
||||
extern int gpio_enable_module_pin(unsigned int pin, unsigned int function);
|
||||
|
||||
/*! \brief Enables the GPIO mode of a set of pins.
|
||||
*
|
||||
* \param gpiomap The pin map.
|
||||
* \param size The number of pins in \a gpiomap.
|
||||
*/
|
||||
extern void gpio_enable_gpio(const gpio_map_t gpiomap, unsigned int size);
|
||||
|
||||
/*! \brief Enables the GPIO mode of a pin.
|
||||
*
|
||||
* \param pin The pin number.\n
|
||||
* Refer to the product header file `uc3x.h' (where x is the part
|
||||
* number; e.g. x = a0512) for pin definitions. E.g., to enable the
|
||||
* GPIO mode of PX21, AVR32_PIN_PX21 can be used. Module pins such as
|
||||
* AVR32_PWM_3_PIN for PWM channel 3 can also be used to release
|
||||
* module pins for GPIO.
|
||||
*/
|
||||
extern void gpio_enable_gpio_pin(unsigned int pin);
|
||||
|
||||
// The open-drain mode is not synthesized on the current AVR32 products.
|
||||
// If one day some AVR32 products have this feature, the corresponding part
|
||||
// numbers should be listed in the #if below.
|
||||
// Note that other functions are available in this driver to use pins with open
|
||||
// drain in GPIO mode. The advantage of the open-drain mode functions over these
|
||||
// other functions is that they can be used not only in GPIO mode but also in
|
||||
// module mode.
|
||||
#if 0
|
||||
|
||||
/*! \brief Enables the open-drain mode of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_enable_pin_open_drain(unsigned int pin);
|
||||
|
||||
/*! \brief Disables the open-drain mode of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_disable_pin_open_drain(unsigned int pin);
|
||||
|
||||
#endif
|
||||
|
||||
/*! \brief Enables the pull-up resistor of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_enable_pin_pull_up(unsigned int pin);
|
||||
|
||||
/*! \brief Disables the pull-up resistor of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_disable_pin_pull_up(unsigned int pin);
|
||||
|
||||
#if defined(AVR32_GPIO_200_H_INCLUDED) || defined(AVR32_GPIO_210_H_INCLUDED) || defined(AVR32_GPIO_211_H_INCLUDED)
|
||||
// Added support of Pull-up Resistor, Pull-down Resistor and Buskeeper Control.
|
||||
|
||||
/*! \brief Enables the pull-down resistor of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_enable_pin_pull_down(unsigned int pin);
|
||||
|
||||
/*! \brief Disables the pull-down resistor of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_disable_pin_pull_down(unsigned int pin);
|
||||
|
||||
/*! \brief Enables the buskeeper functionality on a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_enable_pin_buskeeper(unsigned int pin);
|
||||
|
||||
/*! \brief Disables the buskeeper functionality on a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_disable_pin_buskeeper(unsigned int pin);
|
||||
|
||||
#endif
|
||||
|
||||
/*! \brief Returns the value of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \return The pin value.
|
||||
*/
|
||||
extern int gpio_get_pin_value(unsigned int pin);
|
||||
|
||||
/*! \brief Returns the output value set for a GPIO pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \return The pin output value.
|
||||
*
|
||||
* \note This function must be used in conjunction with \ref gpio_set_gpio_pin,
|
||||
* \ref gpio_clr_gpio_pin and \ref gpio_tgl_gpio_pin.
|
||||
*/
|
||||
extern int gpio_get_gpio_pin_output_value(unsigned int pin);
|
||||
|
||||
/*! \brief Returns the output value set for a GPIO pin using open drain.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \return The pin output value.
|
||||
*
|
||||
* \note This function must be used in conjunction with
|
||||
* \ref gpio_set_gpio_open_drain_pin, \ref gpio_clr_gpio_open_drain_pin
|
||||
* and \ref gpio_tgl_gpio_open_drain_pin.
|
||||
*/
|
||||
extern int gpio_get_gpio_open_drain_pin_output_value(unsigned int pin);
|
||||
|
||||
/*! \brief Drives a GPIO pin to 1.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_set_gpio_pin(unsigned int pin);
|
||||
|
||||
/*! \brief Drives a GPIO pin to 0.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_clr_gpio_pin(unsigned int pin);
|
||||
|
||||
/*! \brief Toggles a GPIO pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_tgl_gpio_pin(unsigned int pin);
|
||||
|
||||
/*! \brief Drives a GPIO pin to 1 using open drain.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_set_gpio_open_drain_pin(unsigned int pin);
|
||||
|
||||
/*! \brief Drives a GPIO pin to 0 using open drain.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_clr_gpio_open_drain_pin(unsigned int pin);
|
||||
|
||||
/*! \brief Toggles a GPIO pin using open drain.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_tgl_gpio_open_drain_pin(unsigned int pin);
|
||||
|
||||
/*! \brief Enables the glitch filter of a pin.
|
||||
*
|
||||
* When the glitch filter is enabled, a glitch with duration of less than 1
|
||||
* clock cycle is automatically rejected, while a pulse with duration of 2 clock
|
||||
* cycles or more is accepted. For pulse durations between 1 clock cycle and 2
|
||||
* clock cycles, the pulse may or may not be taken into account, depending on
|
||||
* the precise timing of its occurrence. Thus for a pulse to be guaranteed
|
||||
* visible it must exceed 2 clock cycles, whereas for a glitch to be reliably
|
||||
* filtered out, its duration must not exceed 1 clock cycle. The filter
|
||||
* introduces 2 clock cycles latency.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_enable_pin_glitch_filter(unsigned int pin);
|
||||
|
||||
/*! \brief Disables the glitch filter of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_disable_pin_glitch_filter(unsigned int pin);
|
||||
|
||||
/*! \brief Enables the interrupt of a pin with the specified settings.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
* \param mode The trigger mode (\ref GPIO_PIN_CHANGE, \ref GPIO_RISING_EDGE or
|
||||
* \ref GPIO_FALLING_EDGE).
|
||||
*
|
||||
* \return \ref GPIO_SUCCESS or \ref GPIO_INVALID_ARGUMENT.
|
||||
*/
|
||||
extern int gpio_enable_pin_interrupt(unsigned int pin, unsigned int mode);
|
||||
|
||||
/*! \brief Disables the interrupt of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_disable_pin_interrupt(unsigned int pin);
|
||||
|
||||
/*! \brief Gets the interrupt flag of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \return The pin interrupt flag.
|
||||
*/
|
||||
extern int gpio_get_pin_interrupt_flag(unsigned int pin);
|
||||
|
||||
/*! \brief Clears the interrupt flag of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*/
|
||||
extern void gpio_clear_pin_interrupt_flag(unsigned int pin);
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#if (defined AVR32_GPIO_LOCAL_ADDRESS)
|
||||
/*! \name Local Bus Interface
|
||||
*
|
||||
* High-speed interface with only one clock cycle per access.
|
||||
*
|
||||
* This interface operates with high clock frequency (fCPU), and its timing is
|
||||
* deterministic since it does not need to access a shared bus which may be
|
||||
* heavily loaded.
|
||||
*
|
||||
* \warning To use this interface, the clock frequency of the peripheral bus on
|
||||
* which the GPIO peripheral is connected must be set to the CPU clock
|
||||
* frequency (fPB = fCPU).
|
||||
*
|
||||
* \note This interface has to be initialized in order to be available.
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Enables the local bus interface for GPIO.
|
||||
*
|
||||
* \note This function must have been called at least once before using other
|
||||
* functions in this interface.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_init(void)
|
||||
{
|
||||
Set_system_register(AVR32_CPUCR,
|
||||
Get_system_register(AVR32_CPUCR) | AVR32_CPUCR_LOCEN_MASK);
|
||||
}
|
||||
|
||||
/*! \brief Enables the output driver of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init must have been called beforehand.
|
||||
*
|
||||
* \note This function does not enable the GPIO mode of the pin.
|
||||
* \ref gpio_enable_gpio_pin can be called for this purpose.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_enable_pin_output_driver(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].oders = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Disables the output driver of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init must have been called beforehand.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_disable_pin_output_driver(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].oderc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Returns the value of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \return The pin value.
|
||||
*
|
||||
* \note \ref gpio_local_init must have been called beforehand.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ int gpio_local_get_pin_value(unsigned int pin)
|
||||
{
|
||||
return (AVR32_GPIO_LOCAL.port[pin >> 5].pvr >> (pin & 0x1F)) & 1;
|
||||
}
|
||||
|
||||
/*! \brief Drives a GPIO pin to 1.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init must have been called beforehand.
|
||||
*
|
||||
* \note This function does not enable the GPIO mode of the pin nor its output
|
||||
* driver. \ref gpio_enable_gpio_pin and
|
||||
* \ref gpio_local_enable_pin_output_driver can be called for this
|
||||
* purpose.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_set_gpio_pin(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].ovrs = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Drives a GPIO pin to 0.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init must have been called beforehand.
|
||||
*
|
||||
* \note This function does not enable the GPIO mode of the pin nor its output
|
||||
* driver. \ref gpio_enable_gpio_pin and
|
||||
* \ref gpio_local_enable_pin_output_driver can be called for this
|
||||
* purpose.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_clr_gpio_pin(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].ovrc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Toggles a GPIO pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init must have been called beforehand.
|
||||
*
|
||||
* \note This function does not enable the GPIO mode of the pin nor its output
|
||||
* driver. \ref gpio_enable_gpio_pin and
|
||||
* \ref gpio_local_enable_pin_output_driver can be called for this
|
||||
* purpose.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_tgl_gpio_pin(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].ovrt = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Initializes the configuration of a GPIO pin so that it can be used
|
||||
* with GPIO open-drain functions.
|
||||
*
|
||||
* \note This function must have been called at least once before using
|
||||
* \ref gpio_local_set_gpio_open_drain_pin,
|
||||
* \ref gpio_local_clr_gpio_open_drain_pin or
|
||||
* \ref gpio_local_tgl_gpio_open_drain_pin.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_init_gpio_open_drain_pin(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].ovrc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Drives a GPIO pin to 1 using open drain.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init and \ref gpio_local_init_gpio_open_drain_pin must
|
||||
* have been called beforehand.
|
||||
*
|
||||
* \note This function does not enable the GPIO mode of the pin.
|
||||
* \ref gpio_enable_gpio_pin can be called for this purpose.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_set_gpio_open_drain_pin(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].oderc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Drives a GPIO pin to 0 using open drain.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init and \ref gpio_local_init_gpio_open_drain_pin must
|
||||
* have been called beforehand.
|
||||
*
|
||||
* \note This function does not enable the GPIO mode of the pin.
|
||||
* \ref gpio_enable_gpio_pin can be called for this purpose.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_clr_gpio_open_drain_pin(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].oders = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Toggles a GPIO pin using open drain.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
* \note \ref gpio_local_init and \ref gpio_local_init_gpio_open_drain_pin must
|
||||
* have been called beforehand.
|
||||
*
|
||||
* \note This function does not enable the GPIO mode of the pin.
|
||||
* \ref gpio_enable_gpio_pin can be called for this purpose.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_local_tgl_gpio_open_drain_pin(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO_LOCAL.port[pin >> 5].odert = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
//! @}
|
||||
#endif // AVR32_GPIO_LOCAL_ADDRESS
|
||||
|
||||
#if UC3L
|
||||
//! @{
|
||||
/*! \name Peripheral Event System support
|
||||
*
|
||||
* The GPIO can be programmed to output peripheral events whenever an interrupt
|
||||
* condition is detected, such as pin value change, or only when a rising or
|
||||
* falling edge is detected.
|
||||
*
|
||||
*/
|
||||
|
||||
/*! \brief Enables the peripheral event generation of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_enable_pin_periph_event(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO.port[pin >> 5].oderc = 1 << (pin & 0x1F); // The GPIO output driver is disabled for that pin.
|
||||
AVR32_GPIO.port[pin >> 5].evers = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Disables the peripheral event generation of a pin.
|
||||
*
|
||||
* \param pin The pin number.
|
||||
*
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__always_inline__))
|
||||
#endif
|
||||
extern __inline__ void gpio_disable_pin_periph_event(unsigned int pin)
|
||||
{
|
||||
AVR32_GPIO.port[pin >> 5].everc = 1 << (pin & 0x1F);
|
||||
}
|
||||
|
||||
/*! \brief Configure the peripheral event trigger mode of a pin
|
||||
*
|
||||
* \param pin The pin number.
|
||||
* \param mode The trigger mode (\ref GPIO_PIN_CHANGE, \ref GPIO_RISING_EDGE or
|
||||
* \ref GPIO_FALLING_EDGE).
|
||||
* \param use_igf use the Input Glitch Filter (TRUE) or not (FALSE).
|
||||
*
|
||||
* \return \ref GPIO_SUCCESS or \ref GPIO_INVALID_ARGUMENT.
|
||||
*/
|
||||
extern int gpio_configure_pin_periph_event_mode(unsigned int pin, unsigned int mode, unsigned int use_igf);
|
||||
|
||||
//! @}
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _GPIO_H_
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user