doxygen: Fix many warnings
This commit fixes nearly all of the reported doxygen warnings. I tried to not clutter the log with removed trailing spaces. Removed whitespace and converted tab/spaces for all files affected by this commit are in a separate branch.
This commit is contained in:
parent
d0e9cd18c7
commit
938d17576b
|
@ -246,6 +246,7 @@ program_handler_load(char *name, char *arg)
|
||||||
#else /* WITH_LOADER_ARCH */
|
#else /* WITH_LOADER_ARCH */
|
||||||
#define RUN(prg, process, arg) process_start(process, arg)
|
#define RUN(prg, process, arg) process_start(process, arg)
|
||||||
#endif /* WITH_LOADER_ARCH */
|
#endif /* WITH_LOADER_ARCH */
|
||||||
|
#if CTK_CONF_SCREENSAVER
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* Configures the name of the screensaver to be loaded when
|
* Configures the name of the screensaver to be loaded when
|
||||||
|
@ -255,7 +256,6 @@ program_handler_load(char *name, char *arg)
|
||||||
* should be used.
|
* should be used.
|
||||||
*/
|
*/
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
#if CTK_CONF_SCREENSAVER
|
|
||||||
void
|
void
|
||||||
program_handler_setscreensaver(char *name)
|
program_handler_setscreensaver(char *name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,15 +142,18 @@ typedef struct uip_eth_addr {
|
||||||
typedef uip_802154_longaddr uip_lladdr_t;
|
typedef uip_802154_longaddr uip_lladdr_t;
|
||||||
#define UIP_802154_SHORTADDR_LEN 2
|
#define UIP_802154_SHORTADDR_LEN 2
|
||||||
#define UIP_802154_LONGADDR_LEN 8
|
#define UIP_802154_LONGADDR_LEN 8
|
||||||
|
/** \brief Link layer address length */
|
||||||
#define UIP_LLADDR_LEN UIP_802154_LONGADDR_LEN
|
#define UIP_LLADDR_LEN UIP_802154_LONGADDR_LEN
|
||||||
#else /*UIP_CONF_LL_802154*/
|
#else /*UIP_CONF_LL_802154*/
|
||||||
#if UIP_CONF_LL_80211
|
#if UIP_CONF_LL_80211
|
||||||
/** \brief 802.11 address */
|
/** \brief 802.11 address */
|
||||||
typedef uip_80211_addr uip_lladdr_t;
|
typedef uip_80211_addr uip_lladdr_t;
|
||||||
|
/** \brief Link layer address length */
|
||||||
#define UIP_LLADDR_LEN 6
|
#define UIP_LLADDR_LEN 6
|
||||||
#else /*UIP_CONF_LL_80211*/
|
#else /*UIP_CONF_LL_80211*/
|
||||||
/** \brief Ethernet address */
|
/** \brief Ethernet address */
|
||||||
typedef uip_eth_addr uip_lladdr_t;
|
typedef uip_eth_addr uip_lladdr_t;
|
||||||
|
/** \brief Link layer address length */
|
||||||
#define UIP_LLADDR_LEN 6
|
#define UIP_LLADDR_LEN 6
|
||||||
#endif /*UIP_CONF_LL_80211*/
|
#endif /*UIP_CONF_LL_80211*/
|
||||||
#endif /*UIP_CONF_LL_802154*/
|
#endif /*UIP_CONF_LL_802154*/
|
||||||
|
@ -1379,8 +1382,7 @@ struct uip_conn {
|
||||||
uint8_t nrtx; /**< The number of retransmissions for the last
|
uint8_t nrtx; /**< The number of retransmissions for the last
|
||||||
segment sent. */
|
segment sent. */
|
||||||
|
|
||||||
/** The application state. */
|
uip_tcp_appstate_t appstate; /** The application state. */
|
||||||
uip_tcp_appstate_t appstate;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1046,8 +1046,10 @@ uncompress_hdr_hc06(uint16_t ip_len)
|
||||||
* - Both src and dest interface ID are recoverable from lower layer
|
* - Both src and dest interface ID are recoverable from lower layer
|
||||||
* header
|
* header
|
||||||
* - Next header is either ICMP, UDP or TCP
|
* - Next header is either ICMP, UDP or TCP
|
||||||
|
*
|
||||||
* Moreover, if next header is UDP, we try to compress it using HC_UDP.
|
* Moreover, if next header is UDP, we try to compress it using HC_UDP.
|
||||||
* This is feasible is both ports are between F0B0 and F0B0 + 15\n\n
|
* This is feasible is both ports are between F0B0 and F0B0 + 15.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* Resulting header structure:
|
* Resulting header structure:
|
||||||
* - For ICMP, TCP, non compressed UDP\n
|
* - For ICMP, TCP, non compressed UDP\n
|
||||||
|
@ -1062,7 +1064,7 @@ uncompress_hdr_hc06(uint16_t ip_len)
|
||||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
* \endverbatim
|
* \endverbatim
|
||||||
*
|
*
|
||||||
* - For compressed UDP
|
* - For compressed UDP\n
|
||||||
* HC1 encoding = 11111011, HC_UDP encoding = 11100000\n
|
* HC1 encoding = 11111011, HC_UDP encoding = 11100000\n
|
||||||
* \verbatim
|
* \verbatim
|
||||||
* 1 2 3
|
* 1 2 3
|
||||||
|
@ -1577,7 +1579,6 @@ output(const uip_lladdr_t *localdest)
|
||||||
|
|
||||||
/*--------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------*/
|
||||||
/** \brief Process a received 6lowpan packet.
|
/** \brief Process a received 6lowpan packet.
|
||||||
* \param r The MAC layer
|
|
||||||
*
|
*
|
||||||
* The 6lowpan packet is put in packetbuf by the MAC. If its a frag1 or
|
* The 6lowpan packet is put in packetbuf by the MAC. If its a frag1 or
|
||||||
* a non-fragmented packet we first uncompress the IP header. The
|
* a non-fragmented packet we first uncompress the IP header. The
|
||||||
|
|
|
@ -231,10 +231,10 @@ uip_ds6_link_neighbor_callback(int status, int numtx)
|
||||||
|
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/** Periodic processing on neighbors */
|
||||||
void
|
void
|
||||||
uip_ds6_neighbor_periodic(void)
|
uip_ds6_neighbor_periodic(void)
|
||||||
{
|
{
|
||||||
/* Periodic processing on neighbors */
|
|
||||||
uip_ds6_nbr_t *nbr = nbr_table_head(ds6_neighbors);
|
uip_ds6_nbr_t *nbr = nbr_table_head(ds6_neighbors);
|
||||||
while(nbr != NULL) {
|
while(nbr != NULL) {
|
||||||
switch(nbr->state) {
|
switch(nbr->state) {
|
||||||
|
|
|
@ -53,23 +53,23 @@
|
||||||
#define DEBUG DEBUG_NONE
|
#define DEBUG DEBUG_NONE
|
||||||
#include "net/ip/uip-debug.h"
|
#include "net/ip/uip-debug.h"
|
||||||
|
|
||||||
struct etimer uip_ds6_timer_periodic; /** \brief Timer for maintenance of data structures */
|
struct etimer uip_ds6_timer_periodic; /**< Timer for maintenance of data structures */
|
||||||
|
|
||||||
#if UIP_CONF_ROUTER
|
#if UIP_CONF_ROUTER
|
||||||
struct stimer uip_ds6_timer_ra; /** \brief RA timer, to schedule RA sending */
|
struct stimer uip_ds6_timer_ra; /**< RA timer, to schedule RA sending */
|
||||||
#if UIP_ND6_SEND_RA
|
#if UIP_ND6_SEND_RA
|
||||||
static uint8_t racount; /** \brief number of RA already sent */
|
static uint8_t racount; /**< number of RA already sent */
|
||||||
static uint16_t rand_time; /** \brief random time value for timers */
|
static uint16_t rand_time; /**< random time value for timers */
|
||||||
#endif
|
#endif
|
||||||
#else /* UIP_CONF_ROUTER */
|
#else /* UIP_CONF_ROUTER */
|
||||||
struct etimer uip_ds6_timer_rs; /** \brief RS timer, to schedule RS sending */
|
struct etimer uip_ds6_timer_rs; /**< RS timer, to schedule RS sending */
|
||||||
static uint8_t rscount; /** \brief number of rs already sent */
|
static uint8_t rscount; /**< number of rs already sent */
|
||||||
#endif /* UIP_CONF_ROUTER */
|
#endif /* UIP_CONF_ROUTER */
|
||||||
|
|
||||||
/** \name "DS6" Data structures */
|
/** \name "DS6" Data structures */
|
||||||
/** @{ */
|
/** @{ */
|
||||||
uip_ds6_netif_t uip_ds6_if; /** \brief The single interface */
|
uip_ds6_netif_t uip_ds6_if; /**< The single interface */
|
||||||
uip_ds6_prefix_t uip_ds6_prefix_list[UIP_DS6_PREFIX_NB]; /** \brief Prefix list */
|
uip_ds6_prefix_t uip_ds6_prefix_list[UIP_DS6_PREFIX_NB]; /**< Prefix list */
|
||||||
|
|
||||||
/* Used by Cooja to enable extraction of addresses from memory.*/
|
/* Used by Cooja to enable extraction of addresses from memory.*/
|
||||||
uint8_t uip_ds6_addr_size;
|
uint8_t uip_ds6_addr_size;
|
||||||
|
|
|
@ -282,6 +282,7 @@ uint8_t uip_ds6_is_addr_onlink(uip_ipaddr_t *ipaddr);
|
||||||
|
|
||||||
/** \name Unicast address list basic routines */
|
/** \name Unicast address list basic routines */
|
||||||
/** @{ */
|
/** @{ */
|
||||||
|
/** \brief Add a unicast address to the interface */
|
||||||
uip_ds6_addr_t *uip_ds6_addr_add(uip_ipaddr_t *ipaddr,
|
uip_ds6_addr_t *uip_ds6_addr_add(uip_ipaddr_t *ipaddr,
|
||||||
unsigned long vlifetime, uint8_t type);
|
unsigned long vlifetime, uint8_t type);
|
||||||
void uip_ds6_addr_rm(uip_ds6_addr_t *addr);
|
void uip_ds6_addr_rm(uip_ds6_addr_t *addr);
|
||||||
|
|
|
@ -811,7 +811,7 @@ uip_nd6_rs_output(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/*
|
/**
|
||||||
* Process a Router Advertisement
|
* Process a Router Advertisement
|
||||||
*
|
*
|
||||||
* - Possible actions when receiving a RA: add router to router list,
|
* - Possible actions when receiving a RA: add router to router list,
|
||||||
|
|
|
@ -59,8 +59,11 @@
|
||||||
|
|
||||||
/** \name RFC 4861 Host constant */
|
/** \name RFC 4861 Host constant */
|
||||||
/** @{ */
|
/** @{ */
|
||||||
|
/** \brief Maximum router solicitation delay */
|
||||||
#define UIP_ND6_MAX_RTR_SOLICITATION_DELAY 1
|
#define UIP_ND6_MAX_RTR_SOLICITATION_DELAY 1
|
||||||
|
/** \brief Router solicitation interval */
|
||||||
#define UIP_ND6_RTR_SOLICITATION_INTERVAL 4
|
#define UIP_ND6_RTR_SOLICITATION_INTERVAL 4
|
||||||
|
/** \brief Maximum router solicitations */
|
||||||
#define UIP_ND6_MAX_RTR_SOLICITATIONS 3
|
#define UIP_ND6_MAX_RTR_SOLICITATIONS 3
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -654,7 +654,7 @@ static uint8_t uip_reassflags;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
struct etimer uip_reass_timer; /* timer for reassembly */
|
struct etimer uip_reass_timer; /**< Timer for reassembly */
|
||||||
uint8_t uip_reass_on; /* equal to 1 if we are currently reassembling a packet */
|
uint8_t uip_reass_on; /* equal to 1 if we are currently reassembling a packet */
|
||||||
|
|
||||||
static uint32_t uip_id; /* For every packet that is to be fragmented, the source
|
static uint32_t uip_id; /* For every packet that is to be fragmented, the source
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/****************************************************************************************************//**
|
/****************************************************************************************************//**
|
||||||
* @file ADUCRF101.h
|
* @file ADuCRF101.h
|
||||||
*
|
*
|
||||||
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File for
|
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File for
|
||||||
* default ADUCRF101 Device Series
|
* default ADUCRF101 Device Series
|
||||||
|
|
|
@ -1292,7 +1292,6 @@ static RIE_Responses RadioWaitOnState(RadioState FinalState)
|
||||||
/**
|
/**
|
||||||
@fn RIE_Responses RadioWaitOnCmdLdr(void)
|
@fn RIE_Responses RadioWaitOnCmdLdr(void)
|
||||||
@brief Wait for Final State to be reached
|
@brief Wait for Final State to be reached
|
||||||
@param FinalState State to wait on
|
|
||||||
@return RIE_Responses Error code
|
@return RIE_Responses Error code
|
||||||
**/
|
**/
|
||||||
static RIE_Responses RadioWaitOnCmdLdr(void)
|
static RIE_Responses RadioWaitOnCmdLdr(void)
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
@file system_ADUCRF101.c
|
@file system_ADuCRF101.c
|
||||||
@brief CMSIS Cortex-M3 Device Peripheral Access Layer Implementation File
|
@brief CMSIS Cortex-M3 Device Peripheral Access Layer Implementation File
|
||||||
for the ADuCRF101
|
for the ADuCRF101
|
||||||
@version v1.0
|
@version v1.0
|
||||||
|
@ -106,7 +106,6 @@ void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */
|
||||||
/**
|
/**
|
||||||
* Initialize the system
|
* Initialize the system
|
||||||
*
|
*
|
||||||
* @param none
|
|
||||||
* @return none
|
* @return none
|
||||||
*
|
*
|
||||||
* @brief Setup the microcontroller system.
|
* @brief Setup the microcontroller system.
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
@file system_ADUCRF101.h
|
@file system_ADuCRF101.h
|
||||||
@brief: CMSIS Cortex-M3 Device Peripheral Access Layer Header File
|
@brief: CMSIS Cortex-M3 Device Peripheral Access Layer Header File
|
||||||
for the ADuCRF101
|
for the ADuCRF101
|
||||||
@version v0.2
|
@version v0.2
|
||||||
|
@ -51,7 +51,6 @@
|
||||||
/**
|
/**
|
||||||
* @brief Initialize the system
|
* @brief Initialize the system
|
||||||
*
|
*
|
||||||
* @param none
|
|
||||||
* @return none
|
* @return none
|
||||||
*
|
*
|
||||||
* Setup the microcontroller system.
|
* Setup the microcontroller system.
|
||||||
|
@ -62,7 +61,6 @@ extern void SystemInit (void);
|
||||||
/**
|
/**
|
||||||
* @brief Update internal SystemCoreClock variable
|
* @brief Update internal SystemCoreClock variable
|
||||||
*
|
*
|
||||||
* @param none
|
|
||||||
* @return none
|
* @return none
|
||||||
*
|
*
|
||||||
* Updates the internal SystemCoreClock with current core
|
* Updates the internal SystemCoreClock with current core
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a relocation.
|
* \brief Perform a relocation.
|
||||||
|
* \param input_fd The file descriptor for the ELF file.
|
||||||
* \param output The output object for the segment.
|
* \param output The output object for the segment.
|
||||||
* \param sectionoffset The file offset at which the relocation can be found.
|
* \param sectionoffset The file offset at which the relocation can be found.
|
||||||
* \param sectionaddr The section start address (absolute runtime).
|
* \param sectionaddr The section start address (absolute runtime).
|
||||||
|
|
|
@ -170,7 +170,7 @@ struct elfloader_output {
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* \brief Allocate a new segment
|
* \brief Allocate a new segment
|
||||||
* \param input The output object
|
* \param output The output object
|
||||||
* \param type Type of segment
|
* \param type Type of segment
|
||||||
* \param size Size of segment in bytes
|
* \param size Size of segment in bytes
|
||||||
* \return A pointer to the start of the segment.
|
* \return A pointer to the start of the segment.
|
||||||
|
@ -184,7 +184,7 @@ void *elfloader_allocate_segment(struct elfloader_output *output,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Start writing to a new segment
|
* \brief Start writing to a new segment
|
||||||
* \param input The output object
|
* \param output The output object
|
||||||
* \param type Type of segment
|
* \param type Type of segment
|
||||||
* \param addr Address of segment from elfloader_allocate_segment
|
* \param addr Address of segment from elfloader_allocate_segment
|
||||||
* \param size Size of segment in bytes
|
* \param size Size of segment in bytes
|
||||||
|
@ -196,7 +196,7 @@ int elfloader_start_segment(struct elfloader_output *output,
|
||||||
unsigned int type, void *addr, int size);
|
unsigned int type, void *addr, int size);
|
||||||
/**
|
/**
|
||||||
* \brief Mark end of segment
|
* \brief Mark end of segment
|
||||||
* \param input The output object
|
* \param output The output object
|
||||||
* \return Zero if successful
|
* \return Zero if successful
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ int elfloader_end_segment(struct elfloader_output *output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Write data to a segment
|
* \brief Write data to a segment
|
||||||
* \param input The output object
|
* \param output The output object
|
||||||
* \param buf Data to be written
|
* \param buf Data to be written
|
||||||
* \param len Length of data
|
* \param len Length of data
|
||||||
* \return The number of bytes actually written, or negative if failed.
|
* \return The number of bytes actually written, or negative if failed.
|
||||||
|
@ -216,7 +216,7 @@ int elfloader_write_segment(struct elfloader_output *output, const char *buf,
|
||||||
/**
|
/**
|
||||||
* \brief Get the current offset in the file where the next data will
|
* \brief Get the current offset in the file where the next data will
|
||||||
* be written.
|
* be written.
|
||||||
* \param input The output object
|
* \param output The output object
|
||||||
* \return The current offset.
|
* \return The current offset.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ void elfloader_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Load and relocate an ELF file.
|
* \brief Load and relocate an ELF file.
|
||||||
* \param input Input object defining how to read from the ELF file
|
* \param input_fd Input object defining how to read from the ELF file
|
||||||
* \param output Output object defining how to create and write to seegments.
|
* \param output Output object defining how to create and write to seegments.
|
||||||
* \return ELFLOADER_OK if loading and relocation worked.
|
* \return ELFLOADER_OK if loading and relocation worked.
|
||||||
* Otherwise an error value.
|
* Otherwise an error value.
|
||||||
|
|
|
@ -271,6 +271,9 @@
|
||||||
*/
|
*/
|
||||||
#define NIC_MMUCR (LANC111_BASE_ADDR + 0x00)
|
#define NIC_MMUCR (LANC111_BASE_ADDR + 0x00)
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief MMU command register busy flag.
|
||||||
|
*/
|
||||||
#define MMUCR_BUSY 0x0001
|
#define MMUCR_BUSY 0x0001
|
||||||
|
|
||||||
#define MMU_NOP 0
|
#define MMU_NOP 0
|
||||||
|
@ -292,7 +295,7 @@
|
||||||
/*!
|
/*!
|
||||||
* \brief Bank 2 - Allocation result register.
|
* \brief Bank 2 - Allocation result register.
|
||||||
*
|
*
|
||||||
* This byte register is updated upon a \ref MMU_ALO command.
|
* This byte register is updated upon a MMU_ALO command.
|
||||||
*/
|
*/
|
||||||
#define NIC_ARR (LANC111_BASE_ADDR + 0x03)
|
#define NIC_ARR (LANC111_BASE_ADDR + 0x03)
|
||||||
|
|
||||||
|
@ -334,14 +337,14 @@
|
||||||
*/
|
*/
|
||||||
#define NIC_MSK (LANC111_BASE_ADDR + 0x0D)
|
#define NIC_MSK (LANC111_BASE_ADDR + 0x0D)
|
||||||
|
|
||||||
#define INT_MD 0x80 /*!< \ref PHY state change interrupt bit mask. */
|
#define INT_MD 0x80 /*!< PHY state change interrupt bit mask. */
|
||||||
#define INT_ERCV 0x40 /*!< \ref Early receive interrupt bit mask. */
|
#define INT_ERCV 0x40 /*!< Early receive interrupt bit mask. */
|
||||||
#define INT_EPH 0x20 /*!< \ref Ethernet protocol interrupt bit mask. */
|
#define INT_EPH 0x20 /*!< Ethernet protocol interrupt bit mask. */
|
||||||
#define INT_RX_OVRN 0x10 /*!< \ref Receive overrun interrupt bit mask. */
|
#define INT_RX_OVRN 0x10 /*!< Receive overrun interrupt bit mask. */
|
||||||
#define INT_ALLOC 0x08 /*!< \ref Transmit allocation interrupt bit mask. */
|
#define INT_ALLOC 0x08 /*!< Transmit allocation interrupt bit mask. */
|
||||||
#define INT_TX_EMPTY 0x04 /*!< \ref Transmitter empty interrupt bit mask. */
|
#define INT_TX_EMPTY 0x04 /*!< Transmitter empty interrupt bit mask. */
|
||||||
#define INT_TX 0x02 /*!< \ref Transmit complete interrupt bit mask. */
|
#define INT_TX 0x02 /*!< Transmit complete interrupt bit mask. */
|
||||||
#define INT_RCV 0x01 /*!< \ref Receive interrupt bit mask. */
|
#define INT_RCV 0x01 /*!< Receive interrupt bit mask. */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Bank 3 - Multicast table register.
|
* \brief Bank 3 - Multicast table register.
|
||||||
|
@ -493,12 +496,6 @@
|
||||||
|
|
||||||
#define nic_bs(bank) nic_outlb(NIC_BSR, bank)
|
#define nic_bs(bank) nic_outlb(NIC_BSR, bank)
|
||||||
|
|
||||||
/*!
|
|
||||||
* \struct _NICINFO lanc111.h dev/lanc111.h
|
|
||||||
* \brief Network interface controller information structure.
|
|
||||||
*/
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \addtogroup xgNicLanc111
|
* \addtogroup xgNicLanc111
|
||||||
*/
|
*/
|
||||||
|
@ -840,10 +837,10 @@ static int NicStart(CONST uint8_t * mac)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/*
|
/*
|
||||||
* NIC interrupt entry.
|
* NIC interrupt entry.
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
static void NicInterrupt(void *arg)
|
static void NicInterrupt(void *arg)
|
||||||
{
|
{
|
||||||
uint8_t isr;
|
uint8_t isr;
|
||||||
|
@ -955,7 +952,7 @@ static void NicRead(uint8_t * buf, uint16_t len)
|
||||||
*
|
*
|
||||||
* Nic interrupts must be disabled when calling this funtion.
|
* Nic interrupts must be disabled when calling this funtion.
|
||||||
*
|
*
|
||||||
* \return Pointer to an allocated ::NETBUF. If there is no
|
* \return Pointer to an allocated NETBUF. If there is no
|
||||||
* no data available, then the function returns a
|
* no data available, then the function returns a
|
||||||
* null pointer. If the NIC's buffer seems to be
|
* null pointer. If the NIC's buffer seems to be
|
||||||
* corrupted, a pointer to 0xFFFF is returned.
|
* corrupted, a pointer to 0xFFFF is returned.
|
||||||
|
@ -1014,6 +1011,7 @@ static NETBUF *NicGetPacket(void)
|
||||||
return nb;
|
return nb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/*!
|
/*!
|
||||||
* \brief Load a packet into the nic's transmit ring buffer.
|
* \brief Load a packet into the nic's transmit ring buffer.
|
||||||
*
|
*
|
||||||
|
@ -1028,7 +1026,6 @@ static NETBUF *NicGetPacket(void)
|
||||||
* will automatically release the network buffer
|
* will automatically release the network buffer
|
||||||
* structure.
|
* structure.
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
static int NicPutPacket(NETBUF * nb)
|
static int NicPutPacket(NETBUF * nb)
|
||||||
{
|
{
|
||||||
uint16_t sz;
|
uint16_t sz;
|
||||||
|
@ -1119,13 +1116,12 @@ static int NicPutPacket(NETBUF * nb)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* 0 */
|
||||||
|
|
||||||
/*! \fn NicRxLanc(void *arg)
|
|
||||||
* \brief NIC receiver thread.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#if 1
|
#if 1
|
||||||
|
/*!
|
||||||
|
* \brief NIC receiver thread.
|
||||||
|
*/
|
||||||
PROCESS_THREAD(lanc111_process, ev, data)
|
PROCESS_THREAD(lanc111_process, ev, data)
|
||||||
/*THREAD(NicRxLanc, arg)*/
|
/*THREAD(NicRxLanc, arg)*/
|
||||||
{
|
{
|
||||||
|
@ -1202,7 +1198,7 @@ PROCESS_THREAD(lanc111_process, ev, data)
|
||||||
|
|
||||||
PROCESS_END();
|
PROCESS_END();
|
||||||
}
|
}
|
||||||
#endif /* 0 */
|
#endif /* 1 */
|
||||||
#if 0
|
#if 0
|
||||||
/*!
|
/*!
|
||||||
* \brief Send Ethernet packet.
|
* \brief Send Ethernet packet.
|
||||||
|
@ -1245,7 +1241,7 @@ int LancOutput(NUTDEVICE * dev, NETBUF * nb)
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* 0 */
|
||||||
#if 0
|
#if 0
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize Ethernet hardware.
|
* \brief Initialize Ethernet hardware.
|
||||||
|
@ -1340,7 +1336,7 @@ NUTDEVICE devSmsc111 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
#endif
|
#endif /* 0 */
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
* Dummy implementation of minileds module
|
* Dummy implementation of minileds module
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file printf-stdarg.c
|
* \file lib/printf.c
|
||||||
*
|
*
|
||||||
* \brief sprintf functions to replace newlib for AVR32 UC3.
|
* \brief sprintf functions to replace newlib for AVR32 UC3.
|
||||||
*
|
*
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
#ifndef ERRORS_H_
|
#ifndef ERRORS_H_
|
||||||
#define ERRORS_H_
|
#define ERRORS_H_
|
||||||
|
|
||||||
|
#ifndef __STSTATUS_TYPE__
|
||||||
|
#define __STSTATUS_TYPE__
|
||||||
/**
|
/**
|
||||||
* @brief Return type for St functions.
|
* @brief Return type for St functions.
|
||||||
*/
|
*/
|
||||||
#ifndef __STSTATUS_TYPE__
|
|
||||||
#define __STSTATUS_TYPE__
|
|
||||||
typedef uint8_t StStatus;
|
typedef uint8_t StStatus;
|
||||||
#endif //__STSTATUS_TYPE__
|
#endif //__STSTATUS_TYPE__
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
* @brief Macro used by error-def.h to define all of the return codes.
|
* @brief Macro used by error-def.h to define all of the return codes.
|
||||||
*
|
*
|
||||||
* @param symbol The name of the constant being defined. All St returns
|
* @param symbol The name of the constant being defined. All St returns
|
||||||
* begin with ST_. For example, ::ST_CONNECTION_OPEN.
|
* begin with ST_. For example, ::ST_ERR_FATAL.
|
||||||
*
|
*
|
||||||
* @param value The value of the return code. For example, 0x61.
|
* @param value The value of the return code. For example, 0x61.
|
||||||
*/
|
*/
|
||||||
|
@ -36,9 +36,7 @@
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
|
||||||
#include "error-def.h"
|
#include "error-def.h"
|
||||||
#endif //DOXYGEN_SHOULD_SKIP_THIS
|
|
||||||
/** Gets defined as a count of all the possible return codes in the
|
/** Gets defined as a count of all the possible return codes in the
|
||||||
* StZNet stack API.
|
* StZNet stack API.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#ifndef MFG_TOKEN_H_
|
#ifndef MFG_TOKEN_H_
|
||||||
#define MFG_TOKEN_H_
|
#define MFG_TOKEN_H_
|
||||||
|
|
||||||
|
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||||
|
|
||||||
// The manufacturing tokens live in the Info Blocks, while all other tokens
|
// The manufacturing tokens live in the Info Blocks, while all other tokens
|
||||||
// live in the Simulated EEPROM. This requires the token names to be defined
|
// live in the Simulated EEPROM. This requires the token names to be defined
|
||||||
|
@ -21,9 +22,12 @@
|
||||||
* extern, the actual definition is found in hal/micro/cortexm3/token.c)
|
* extern, the actual definition is found in hal/micro/cortexm3/token.c)
|
||||||
*
|
*
|
||||||
* \param name: The name of the token.
|
* \param name: The name of the token.
|
||||||
*
|
* \param creator: The manufacturing creators.
|
||||||
* \param TOKEN_##name##_ADDRESS: The address in EEPROM at which the token
|
* \param iscnt:
|
||||||
* will be stored. This parameter is generated with a macro above.
|
* \param isidx:
|
||||||
|
* \param type: The token type. The types are found in token-stack.h.
|
||||||
|
* \param arraysize: The number of elements in an indexed token (arraysize=1
|
||||||
|
* for scalar tokens).
|
||||||
*/
|
*/
|
||||||
#define TOKEN_MFG(name,creator,iscnt,isidx,type,arraysize,...) \
|
#define TOKEN_MFG(name,creator,iscnt,isidx,type,arraysize,...) \
|
||||||
extern const uint16_t TOKEN_##name;
|
extern const uint16_t TOKEN_##name;
|
||||||
|
@ -35,8 +39,12 @@
|
||||||
* This provides a convenience for abstracting the 'sizeof(type)' anywhere.
|
* This provides a convenience for abstracting the 'sizeof(type)' anywhere.
|
||||||
*
|
*
|
||||||
* \param name: The name of the token.
|
* \param name: The name of the token.
|
||||||
*
|
* \param creator: The manufacturing creators.
|
||||||
|
* \param iscnt:
|
||||||
|
* \param isidx:
|
||||||
* \param type: The token type. The types are found in token-stack.h.
|
* \param type: The token type. The types are found in token-stack.h.
|
||||||
|
* \param arraysize: The number of elements in an indexed token (arraysize=1
|
||||||
|
* for scalar tokens).
|
||||||
*/
|
*/
|
||||||
#define TOKEN_MFG(name,creator,iscnt,isidx,type,arraysize,...) \
|
#define TOKEN_MFG(name,creator,iscnt,isidx,type,arraysize,...) \
|
||||||
TOKEN_##name##_SIZE = sizeof(type),
|
TOKEN_##name##_SIZE = sizeof(type),
|
||||||
|
@ -49,12 +57,16 @@
|
||||||
/**
|
/**
|
||||||
* \brief Macro for typedef'ing the CamelCase token type found in
|
* \brief Macro for typedef'ing the CamelCase token type found in
|
||||||
* token-stack.h to a capitalized TOKEN style name that ends in _TYPE.
|
* token-stack.h to a capitalized TOKEN style name that ends in _TYPE.
|
||||||
* This macro allows other macros below to use 'token##_TYPE' to declare
|
* This macro allows other macros below to use 'token\#\#_TYPE' to declare
|
||||||
* a local copy of that token.
|
* a local copy of that token.
|
||||||
*
|
*
|
||||||
* \param name: The name of the token.
|
* \param name: The name of the token.
|
||||||
*
|
* \param creator: The manufacturing creators.
|
||||||
|
* \param iscnt:
|
||||||
|
* \param isidx:
|
||||||
* \param type: The token type. The types are found in token-stack.h.
|
* \param type: The token type. The types are found in token-stack.h.
|
||||||
|
* \param arraysize: The number of elements in an indexed token (arraysize=1
|
||||||
|
* for scalar tokens).
|
||||||
*/
|
*/
|
||||||
#define TOKEN_MFG(name,creator,iscnt,isidx,type,arraysize,...) \
|
#define TOKEN_MFG(name,creator,iscnt,isidx,type,arraysize,...) \
|
||||||
typedef type TOKEN_##name##_TYPE;
|
typedef type TOKEN_##name##_TYPE;
|
||||||
|
@ -70,8 +82,7 @@
|
||||||
* subsequent tokens to align against. ( See hal/micro/cortexm3/token.c for
|
* subsequent tokens to align against. ( See hal/micro/cortexm3/token.c for
|
||||||
* the instances of TOKEN_NEXT_ADDRESS() );
|
* the instances of TOKEN_NEXT_ADDRESS() );
|
||||||
*
|
*
|
||||||
* \param region: The name to give to the element in the address enum..
|
* \param region: The name to give to the element in the address enum.
|
||||||
*
|
|
||||||
* \param address: The address in EEPROM where the region begins.
|
* \param address: The address in EEPROM where the region begins.
|
||||||
*/
|
*/
|
||||||
#define TOKEN_NEXT_ADDRESS(region, address) \
|
#define TOKEN_NEXT_ADDRESS(region, address) \
|
||||||
|
@ -80,12 +91,15 @@
|
||||||
/**
|
/**
|
||||||
* \brief Macro for creating ADDRESS and END elements for each token in
|
* \brief Macro for creating ADDRESS and END elements for each token in
|
||||||
* the enum below. The ADDRESS element is linked to from the the normal
|
* the enum below. The ADDRESS element is linked to from the the normal
|
||||||
* TOKEN_##name macro and provides the value passed into the internal token
|
* TOKEN_\#\#name macro and provides the value passed into the internal token
|
||||||
* system calls. The END element is a placeholder providing the starting
|
* system calls. The END element is a placeholder providing the starting
|
||||||
* point for the ADDRESS of the next dynamically positioned token.
|
* point for the ADDRESS of the next dynamically positioned token.
|
||||||
*
|
*
|
||||||
* \param name: The name of the token.
|
* \param name: The name of the token.
|
||||||
*
|
* \param creator: The manufacturing creators.
|
||||||
|
* \param iscnt:
|
||||||
|
* \param isidx:
|
||||||
|
* \param type: The token type. The types are found in token-stack.h.
|
||||||
* \param arraysize: The number of elements in an indexed token (arraysize=1
|
* \param arraysize: The number of elements in an indexed token (arraysize=1
|
||||||
* for scalar tokens).
|
* for scalar tokens).
|
||||||
*/
|
*/
|
||||||
|
@ -106,8 +120,6 @@ enum {
|
||||||
|
|
||||||
#undef DEFINETOKENS
|
#undef DEFINETOKENS
|
||||||
|
|
||||||
|
|
||||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
|
||||||
/**
|
/**
|
||||||
* \brief Copies the token value from non-volatile storage into a RAM
|
* \brief Copies the token value from non-volatile storage into a RAM
|
||||||
* location. This is the internal function that the exposed API
|
* location. This is the internal function that the exposed API
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
* @addtogroup stm32w-cpu
|
* @addtogroup stm32w-cpu
|
||||||
* @{ */
|
* @{ */
|
||||||
|
|
||||||
/** @defgroup nvm
|
/** @defgroup nvm Cortex-M3 Non-Volatile Memory data storage system.
|
||||||
* @brief Cortex-M3 Non-Volatile Memory data storage system.
|
|
||||||
*
|
*
|
||||||
* This header defines the API for NVM data storage. This header also
|
* This header defines the API for NVM data storage. This header also
|
||||||
* describes the algorithm behind the NVM data storage system with notes
|
* describes the algorithm behind the NVM data storage system with notes
|
||||||
|
|
|
@ -33,7 +33,7 @@ typedef enum
|
||||||
* @param parity The type of parity used for communication.
|
* @param parity The type of parity used for communication.
|
||||||
* See the SerialParity enum for possible values
|
* See the SerialParity enum for possible values
|
||||||
*
|
*
|
||||||
* @return stopbits The number of stop bits used for communication.
|
* @param stopbits The number of stop bits used for communication.
|
||||||
* Valid values are 1 or 2
|
* Valid values are 1 or 2
|
||||||
*/
|
*/
|
||||||
void uartInit(uint32_t baudrate, uint8_t databits, SerialParity parity, uint8_t stopbits);
|
void uartInit(uint32_t baudrate, uint8_t databits, SerialParity parity, uint8_t stopbits);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* @{ */
|
* @{ */
|
||||||
|
|
||||||
/** \file hal/micro/generic/compiler/platform-common.h
|
/** \file hal/micro/generic/compiler/platform-common.h
|
||||||
* See \ref platform_common for detailed documentation.
|
* See platform_common.h for detailed documentation.
|
||||||
*
|
*
|
||||||
* <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
|
* <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -70,38 +70,43 @@ void halInternalDisableWatchDog(uint8_t magicKey);
|
||||||
*/
|
*/
|
||||||
boolean halInternalWatchDogEnabled( void );
|
boolean halInternalWatchDogEnabled( void );
|
||||||
|
|
||||||
#ifdef DOXYGEN_SHOULD_SKIP_THIS
|
|
||||||
/** @brief Enumerations for the possible microcontroller sleep modes.
|
/** @brief Enumerations for the possible microcontroller sleep modes.
|
||||||
* - SLEEPMODE_RUNNING
|
|
||||||
* Everything is active and running. In practice this mode is not
|
|
||||||
* used, but it is defined for completeness of information.
|
|
||||||
* - SLEEPMODE_IDLE
|
|
||||||
* Only the CPU is idled. The rest of the chip continues runing
|
|
||||||
* normally. The chip will wake from any interrupt.
|
|
||||||
* - SLEEPMODE_WAKETIMER
|
|
||||||
* The sleep timer clock sources remain running. The RC is always
|
|
||||||
* running and the 32kHz XTAL depends on the board header. Wakeup
|
|
||||||
* is possible from both GPIO and the sleep timer. System time
|
|
||||||
* is maintained. The sleep timer is assumed to be configured
|
|
||||||
* properly for wake events.
|
|
||||||
* - SLEEPMODE_MAINTAINTIMER
|
|
||||||
* The sleep timer clock sources remain running. The RC is always
|
|
||||||
* running and the 32kHz XTAL depends on the board header. Wakeup
|
|
||||||
* is possible from only GPIO. System time is maintained.
|
|
||||||
* - SLEEPMODE_NOTIMER
|
|
||||||
* The sleep timer clock sources (both RC and XTAL) are turned off.
|
|
||||||
* Wakeup is possible from only GPIO. System time is lost.
|
|
||||||
*/
|
*/
|
||||||
|
#ifdef DOXYGEN_SHOULD_SKIP_THIS
|
||||||
enum SleepModes
|
enum SleepModes
|
||||||
#else
|
#else
|
||||||
typedef uint8_t SleepModes;
|
typedef uint8_t SleepModes;
|
||||||
enum
|
enum
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Everything is active and running. In practice this mode is not
|
||||||
|
* used, but it is defined for completeness of information.
|
||||||
|
*/
|
||||||
SLEEPMODE_RUNNING = 0,
|
SLEEPMODE_RUNNING = 0,
|
||||||
|
/**
|
||||||
|
* Oly the CPU is idled. The rest of the chip continues runing
|
||||||
|
* normally. The chip will wake from any interrupt.
|
||||||
|
*/
|
||||||
SLEEPMODE_IDLE = 1,
|
SLEEPMODE_IDLE = 1,
|
||||||
|
/**
|
||||||
|
* The sleep timer clock sources remain running. The RC is always
|
||||||
|
* running and the 32kHz XTAL depends on the board header. Wakeup
|
||||||
|
* is possible from both GPIO and the sleep timer. System time
|
||||||
|
* is maintained. The sleep timer is assumed to be configured
|
||||||
|
* properly for wake events.
|
||||||
|
*/
|
||||||
SLEEPMODE_WAKETIMER = 2,
|
SLEEPMODE_WAKETIMER = 2,
|
||||||
|
/**
|
||||||
|
* The sleep timer clock sources remain running. The RC is always
|
||||||
|
* running and the 32kHz XTAL depends on the board header. Wakeup
|
||||||
|
* is possible from only GPIO. System time is maintained.
|
||||||
|
*/
|
||||||
SLEEPMODE_MAINTAINTIMER = 3,
|
SLEEPMODE_MAINTAINTIMER = 3,
|
||||||
|
/**
|
||||||
|
* The sleep timer clock sources (both RC and XTAL) are turned off.
|
||||||
|
* Wakeup is possible from only GPIO. System time is lost.
|
||||||
|
*/
|
||||||
SLEEPMODE_NOTIMER = 4,
|
SLEEPMODE_NOTIMER = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,7 +141,7 @@ void halCommonDelayMicroseconds(uint16_t us);
|
||||||
* default panID (only vaild for RF mode).
|
* default panID (only vaild for RF mode).
|
||||||
* @return An error code or it will never return.
|
* @return An error code or it will never return.
|
||||||
*/
|
*/
|
||||||
StStatus halBootloaderStart(uint8_t mode, uint8_t channel, uint16_t panId);
|
StStatus halBootloaderStart(uint8_t mode, uint8_t channel, uint16_t panID);
|
||||||
|
|
||||||
#ifdef CORTEXM3_STM32F103
|
#ifdef CORTEXM3_STM32F103
|
||||||
#include "micro/cortexm3/stm32f103ret/micro-specific.h"
|
#include "micro/cortexm3/stm32f103ret/micro-specific.h"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* @addtogroup stm32w-cpu
|
* @addtogroup stm32w-cpu
|
||||||
* @{ */
|
* @{ */
|
||||||
|
|
||||||
/** @defgroup system_timer
|
/** @defgroup system_timer System Timer
|
||||||
* @brief Functions that provide access to the system clock.
|
* @brief Functions that provide access to the system clock.
|
||||||
*
|
*
|
||||||
* A single system tick (as returned by ::halCommonGetInt16uMillisecondTick() and
|
* A single system tick (as returned by ::halCommonGetInt16uMillisecondTick() and
|
||||||
|
|
|
@ -1959,6 +1959,11 @@ PREDEFINED = CC_FUNCTION_POINTER_ARGS:=1 \
|
||||||
UIP_TCP:=1 \
|
UIP_TCP:=1 \
|
||||||
UIP_UDP:=1 \
|
UIP_UDP:=1 \
|
||||||
UIP_CONF_ICMP6:=1 \
|
UIP_CONF_ICMP6:=1 \
|
||||||
|
UIP_ND6_DEF_MAXDADNS:=1 \
|
||||||
|
UIP_CONF_IPV6_REASSEMBLY:=1 \
|
||||||
|
RNG_CONF_USE_ADC:=0 \
|
||||||
|
RNG_CONF_USE_RADIO_CLOCK:=1 \
|
||||||
|
CLOCK_SECOND:=128 \
|
||||||
WITH_LOADER_ARCH:=1 \
|
WITH_LOADER_ARCH:=1 \
|
||||||
__attribute__(x):= \
|
__attribute__(x):= \
|
||||||
CC_ALIGN_ATTR(n):= \
|
CC_ALIGN_ATTR(n):= \
|
||||||
|
|
BIN
doc/pics/raven3290p.jpg
Normal file
BIN
doc/pics/raven3290p.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -75,6 +75,13 @@
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
|
|
||||||
|
#if UIP_CONF_IPV6_RPL
|
||||||
|
// Include needs to be up here instead of embedded in the other
|
||||||
|
// UIP_CONF_IPV6_RPL block, as doxygen seems not to be compatible with
|
||||||
|
// #includes embedded in other functions and spits out a warning.
|
||||||
|
#include "rpl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if JACKDAW_CONF_USE_SETTINGS
|
#if JACKDAW_CONF_USE_SETTINGS
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -579,7 +586,6 @@ void menu_process(char c)
|
||||||
|
|
||||||
|
|
||||||
#if UIP_CONF_IPV6_RPL
|
#if UIP_CONF_IPV6_RPL
|
||||||
#include "rpl.h"
|
|
||||||
extern uip_ds6_netif_t uip_ds6_if;
|
extern uip_ds6_netif_t uip_ds6_if;
|
||||||
case 'N':
|
case 'N':
|
||||||
{ uint8_t i,j;
|
{ uint8_t i,j;
|
||||||
|
|
|
@ -283,6 +283,8 @@ process_run_thread_loop(void *data)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Initialize a mote by starting processes etc.
|
* \brief Initialize a mote by starting processes etc.
|
||||||
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
*
|
*
|
||||||
* This function initializes a mote by starting certain
|
* This function initializes a mote by starting certain
|
||||||
* processes and setting up the environment.
|
* processes and setting up the environment.
|
||||||
|
@ -300,12 +302,15 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_init(JNIEnv *env, jobject obj)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Get a segment from the process memory.
|
* \brief Get a segment from the process memory.
|
||||||
* \param start Start address of segment
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
|
* \param rel_addr Start address of segment
|
||||||
* \param length Size of memory segment
|
* \param length Size of memory segment
|
||||||
|
* \param mem_arr Byte array destination for the fetched memory segment
|
||||||
* \return Java byte array containing a copy of memory segment.
|
* \return Java byte array containing a copy of memory segment.
|
||||||
*
|
*
|
||||||
* Fetches a memory segment from the process memory starting at
|
* Fetches a memory segment from the process memory starting at
|
||||||
* (start), with size (length). This function does not perform
|
* (rel_addr), with size (length). This function does not perform
|
||||||
* ANY error checking, and the process may crash if addresses are
|
* ANY error checking, and the process may crash if addresses are
|
||||||
* not available/readable.
|
* not available/readable.
|
||||||
*
|
*
|
||||||
|
@ -326,7 +331,9 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_getMemory(JNIEnv *env, jobject obj,
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Replace a segment of the process memory with given byte array.
|
* \brief Replace a segment of the process memory with given byte array.
|
||||||
* \param start Start address of segment
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
|
* \param rel_addr Start address of segment
|
||||||
* \param length Size of memory segment
|
* \param length Size of memory segment
|
||||||
* \param mem_arr Byte array contaning new memory
|
* \param mem_arr Byte array contaning new memory
|
||||||
*
|
*
|
||||||
|
@ -349,6 +356,8 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_setMemory(JNIEnv *env, jobject obj,
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Let mote execute one "block" of code (tick mote).
|
* \brief Let mote execute one "block" of code (tick mote).
|
||||||
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
*
|
*
|
||||||
* Let mote defined by the active contiki processes and current
|
* Let mote defined by the active contiki processes and current
|
||||||
* process memory execute some program code. This code must not block
|
* process memory execute some program code. This code must not block
|
||||||
|
@ -413,7 +422,9 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_tick(JNIEnv *env, jobject obj)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Set the relative memory address of the reference variable.
|
* \brief Set the relative memory address of the reference variable.
|
||||||
* \return Relative memory address.
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
|
* \param addr Relative memory address
|
||||||
*
|
*
|
||||||
* This is a JNI function and should only be called via the
|
* This is a JNI function and should only be called via the
|
||||||
* responsible Java part (MoteType.java).
|
* responsible Java part (MoteType.java).
|
||||||
|
|
|
@ -359,6 +359,8 @@ process_run_thread_loop(void *data)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Initialize a mote by starting processes etc.
|
* \brief Initialize a mote by starting processes etc.
|
||||||
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
*
|
*
|
||||||
* This function initializes a mote by starting certain
|
* This function initializes a mote by starting certain
|
||||||
* processes and setting up the environment.
|
* processes and setting up the environment.
|
||||||
|
@ -376,12 +378,15 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_init(JNIEnv *env, jobject obj)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Get a segment from the process memory.
|
* \brief Get a segment from the process memory.
|
||||||
* \param start Start address of segment
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
|
* \param rel_addr Start address of segment
|
||||||
* \param length Size of memory segment
|
* \param length Size of memory segment
|
||||||
|
* \param mem_arr Byte array destination for the fetched memory segment
|
||||||
* \return Java byte array containing a copy of memory segment.
|
* \return Java byte array containing a copy of memory segment.
|
||||||
*
|
*
|
||||||
* Fetches a memory segment from the process memory starting at
|
* Fetches a memory segment from the process memory starting at
|
||||||
* (start), with size (length). This function does not perform
|
* (rel_addr), with size (length). This function does not perform
|
||||||
* ANY error checking, and the process may crash if addresses are
|
* ANY error checking, and the process may crash if addresses are
|
||||||
* not available/readable.
|
* not available/readable.
|
||||||
*
|
*
|
||||||
|
@ -402,7 +407,9 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_getMemory(JNIEnv *env, jobject obj,
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Replace a segment of the process memory with given byte array.
|
* \brief Replace a segment of the process memory with given byte array.
|
||||||
* \param start Start address of segment
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
|
* \param rel_addr Start address of segment
|
||||||
* \param length Size of memory segment
|
* \param length Size of memory segment
|
||||||
* \param mem_arr Byte array contaning new memory
|
* \param mem_arr Byte array contaning new memory
|
||||||
*
|
*
|
||||||
|
@ -426,6 +433,8 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_setMemory(JNIEnv *env, jobject obj,
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Let mote execute one "block" of code (tick mote).
|
* \brief Let mote execute one "block" of code (tick mote).
|
||||||
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
*
|
*
|
||||||
* Let mote defined by the active contiki processes and current
|
* Let mote defined by the active contiki processes and current
|
||||||
* process memory execute some program code. This code must not block
|
* process memory execute some program code. This code must not block
|
||||||
|
@ -490,7 +499,9 @@ Java_org_contikios_cooja_corecomm_CLASSNAME_tick(JNIEnv *env, jobject obj)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Set the relative memory address of the reference variable.
|
* \brief Set the relative memory address of the reference variable.
|
||||||
* \return Relative memory address.
|
* \param env JNI Environment interface pointer
|
||||||
|
* \param obj unused
|
||||||
|
* \param addr Relative memory address
|
||||||
*
|
*
|
||||||
* This is a JNI function and should only be called via the
|
* This is a JNI function and should only be called via the
|
||||||
* responsible Java part (MoteType.java).
|
* responsible Java part (MoteType.java).
|
||||||
|
|
|
@ -286,7 +286,7 @@ convert(uint8_t *data, int32_t *temp, uint32_t *press)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Returns a reading from the sensor
|
* \brief Returns a reading from the sensor
|
||||||
* \param BMP_280_SENSOR_TYPE_TEMP or BMP_280_SENSOR_TYPE_PRESS
|
* \param type BMP_280_SENSOR_TYPE_TEMP or BMP_280_SENSOR_TYPE_PRESS
|
||||||
* \return Temperature (centi degrees C) or Pressure (Pascal).
|
* \return Temperature (centi degrees C) or Pressure (Pascal).
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -223,7 +223,7 @@ read_data(uint16_t *raw_data)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* \brief Convert raw data to a value in lux
|
* \brief Convert raw data to a value in lux
|
||||||
* \param data Pointer to a buffer with a raw sensor reading
|
* \param raw_data data Pointer to a buffer with a raw sensor reading
|
||||||
* \return Converted value (lux)
|
* \return Converted value (lux)
|
||||||
*/
|
*/
|
||||||
static float
|
static float
|
||||||
|
|
|
@ -42,8 +42,8 @@ static void
|
||||||
activate(void)
|
activate(void)
|
||||||
{
|
{
|
||||||
/* This assumes that some other sensor system already did setup the ADC
|
/* This assumes that some other sensor system already did setup the ADC
|
||||||
/* (in the case of the sky platform it is sensors_light_init that does it)
|
* (in the case of the sky platform it is sensors_light_init that does it) */
|
||||||
|
#if 0
|
||||||
P6SEL |= 0x70;
|
P6SEL |= 0x70;
|
||||||
P6DIR = 0x00;
|
P6DIR = 0x00;
|
||||||
P6OUT = 0x00;
|
P6OUT = 0x00;
|
||||||
|
@ -52,37 +52,40 @@ activate(void)
|
||||||
P2OUT |= 0x48;
|
P2OUT |= 0x48;
|
||||||
|
|
||||||
|
|
||||||
/* stop converting immediately
|
/* stop converting immediately */
|
||||||
ADC12CTL0 &= ~ENC;
|
ADC12CTL0 &= ~ENC;
|
||||||
ADC12CTL1 &= ~CONSEQ_3;
|
ADC12CTL1 &= ~CONSEQ_3;
|
||||||
|
|
||||||
/* Configure ADC12_2 to sample channel 11 (voltage) and use
|
/* Configure ADC12_2 to sample channel 11 (voltage) and use
|
||||||
/* the Vref+ as reference (SREF_1) since it is a stable reference
|
* the Vref+ as reference (SREF_1) since it is a stable reference */
|
||||||
ADC12MCTL2 = (INCH_4 + SREF_1);
|
ADC12MCTL2 = (INCH_4 + SREF_1);
|
||||||
ADC12MCTL3 = (INCH_5 + SREF_1);
|
ADC12MCTL3 = (INCH_5 + SREF_1);
|
||||||
ADC12MCTL4 = (INCH_6 + SREF_1);
|
ADC12MCTL4 = (INCH_6 + SREF_1);
|
||||||
/* internal temperature can be read as value(3)
|
/* internal temperature can be read as value(3) */
|
||||||
ADC12MCTL5 = (INCH_10 + SREF_1);
|
ADC12MCTL5 = (INCH_10 + SREF_1);
|
||||||
|
|
||||||
ADC12CTL1 |= CONSEQ_3;
|
ADC12CTL1 |= CONSEQ_3;
|
||||||
ADC12CTL0 |= ENC | ADC12SC;
|
ADC12CTL0 |= ENC | ADC12SC;
|
||||||
|
|
||||||
/* Irq_adc12_activate(&acc_sensor, 6, (INCH_11 + SREF_1)); */
|
Irq_adc12_activate(&acc_sensor, 6, (INCH_11 + SREF_1));
|
||||||
|
#endif /* 0 */
|
||||||
active = 1;
|
active = 1;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
deactivate(void)
|
deactivate(void)
|
||||||
{
|
{
|
||||||
/* irq_adc12_deactivate(&acc_sensor, 6);
|
#if 0
|
||||||
acc_value = 0;*/
|
irq_adc12_deactivate(&acc_sensor, 6);
|
||||||
|
acc_value = 0;
|
||||||
|
#endif /* 0 */
|
||||||
active = 0;
|
active = 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static int
|
static int
|
||||||
value(int type)
|
value(int type)
|
||||||
{
|
{
|
||||||
/*
|
#if 0
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 0:
|
case 0:
|
||||||
return ADC12MEM2;
|
return ADC12MEM2;
|
||||||
|
@ -92,7 +95,8 @@ value(int type)
|
||||||
return ADC12MEM4;
|
return ADC12MEM4;
|
||||||
case 3:
|
case 3:
|
||||||
return ADC12MEM5;
|
return ADC12MEM5;
|
||||||
}*/
|
}
|
||||||
|
#endif /* 0 */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -43,8 +43,10 @@ static uint8_t active;
|
||||||
static int
|
static int
|
||||||
value(int type)
|
value(int type)
|
||||||
{
|
{
|
||||||
/* ADC0 corresponds to the port under the logo, ADC1 to the port over the logo,
|
#if 0
|
||||||
ADC2 and ADC3 corresponds to port on the JCreate bottom expansion port)
|
/* ADC0 corresponds to the port under the logo,
|
||||||
|
* ADC1 to the port over the logo,
|
||||||
|
* ADC2 and ADC3 corresponds to port on the JCreate bottom expansion port) */
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case ADC0:
|
case ADC0:
|
||||||
return ADC12MEM6;
|
return ADC12MEM6;
|
||||||
|
@ -54,7 +56,8 @@ value(int type)
|
||||||
return ADC12MEM8;
|
return ADC12MEM8;
|
||||||
case ADC3:
|
case ADC3:
|
||||||
return ADC12MEM9;
|
return ADC12MEM9;
|
||||||
}*/
|
}
|
||||||
|
#endif /* 0 */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -77,16 +80,17 @@ configure(int type, int c)
|
||||||
case SENSORS_ACTIVE:
|
case SENSORS_ACTIVE:
|
||||||
if(c) {
|
if(c) {
|
||||||
if(!status(SENSORS_ACTIVE)) {
|
if(!status(SENSORS_ACTIVE)) {
|
||||||
/* SREF_1 is Vref+
|
#if 0
|
||||||
/* MemReg6 == P6.0/A0 == port "under" logo
|
/* SREF_1 is Vref+ */
|
||||||
|
/* MemReg6 == P6.0/A0 == port "under" logo */
|
||||||
ADC12MCTL6 = (INCH_0 + SREF_0);
|
ADC12MCTL6 = (INCH_0 + SREF_0);
|
||||||
/* MemReg7 == P6.1/A1 == port "over" logo
|
/* MemReg7 == P6.1/A1 == port "over" logo */
|
||||||
ADC12MCTL7 = (INCH_1 + SREF_0);
|
ADC12MCTL7 = (INCH_1 + SREF_0);
|
||||||
/* MemReg8 == P6.2/A2, bottom expansion port
|
/* MemReg8 == P6.2/A2, bottom expansion port */
|
||||||
ADC12MCTL8 = (INCH_2 + SREF_0);
|
ADC12MCTL8 = (INCH_2 + SREF_0);
|
||||||
/* MemReg9 == P6.1/A3, bottom expansion port, End Of (ADC-)Sequence
|
/* MemReg9 == P6.1/A3, bottom expansion port, End Of (ADC-)Sequence */
|
||||||
ADC12MCTL9 = (INCH_3 + SREF_0);
|
ADC12MCTL9 = (INCH_3 + SREF_0);
|
||||||
*/
|
#endif /* 0 */
|
||||||
sky_sensors_activate(0x0F);
|
sky_sensors_activate(0x0F);
|
||||||
active = 1;
|
active = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue