Microchip® Advanced Software Framework

mqtt-example-main.c File Reference
#include <stdio.h>
#include <string.h>
#include "contiki.h"
#include "contiki-net.h"
#include "sys/autostart.h"
#include "flash.h"
#include "leds.h"
#include "serial-line.h"
#include "slip.h"
#include "watchdog.h"
#include "button-sensor.h"
#include "xmem.h"
#include "lib/random.h"
#include "lib/sensors.h"
#include "temp-sensor.h"
#include "voltage-sensor.h"
#include "netstack-aes.h"
#include "net/netstack.h"
#include "net/ip/uip.h"
#include "net/mac/frame802154.h"
#include "net/linkaddr.h"
#include "net/rime/rime.h"
#include "node-id.h"
#include "delay.h"
#include <asf.h>
#include "usart.h"
#include "sio2host.h"
#include "conf_sio2host.h"
#include "stdio_serial.h"
#include "rtc_count.h"
#include "rtc_count_interrupt.h"
#include "ledctrl.h"

Macros

#define _DEBUG_   0
 Copyright (c) 2015 Microchip Technology Inc and 2012 – 2013, Thingsquare, http://www.thingsquare.com/. More...
 
#define BUSYWAIT_UNTIL(cond, max_time)
 
#define PRINT6ADDR(addr)
 
#define PRINTF(...)
 
#define PRINTLLADDR(addr)
 
#define PUTS_ON_ENC   0
 
#define REG_RCAUSE   (0x40000438U)
 
#define UART_RX_ENABLE   0
 

Functions

void configure_gclock_generator (void)
 
void configure_tc3 (void)
 
void configure_wdt_callbacks (void)
 
uint8_t * edbg_eui_read_eui64 (void)
 
int main (int argc, char *argv[])
 
static void print_processes (struct process *const processes[])
 
static void print_reset_causes (void)
 Print out all known reset causes. More...
 
static void set_link_addr (void)
 
void watchdog_early_warning_callback (void)
 

Variables

PROCINITetimer_process
 
bool ready_to_send_new_packet =true
 
uint8_t sent_packets =0
 

#define _DEBUG_   0

Copyright (c) 2015 Microchip Technology Inc and 2012 – 2013, Thingsquare, http://www.thingsquare.com/.

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. Neither the name of Atmel nor the name of Thingsquare nor the names of its contributors may 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 microcontroller or Atmel wireless product.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 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.

#define BUSYWAIT_UNTIL (   cond,
  max_time 
)
Value:
do { \
t0 = RTIMER_NOW(); \
while(!(cond) && RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + (max_time))); \
} while(0)
unsigned short rtimer_clock_t
Definition: rtimer.h:58
#define RTIMER_NOW()
Get the current clock time.
Definition: rtimer.h:132
while(s->file.len > 0)
Definition: wireless/SmartConnect_6LoWPAN/apps/ip64-webserver/httpd.c:170
#define RTIMER_CLOCK_LT(a, b)
Definition: rtimer.h:59
#define PRINT6ADDR (   addr)
#define PRINTF (   ...)
#define PRINTLLADDR (   addr)
#define PUTS_ON_ENC   0
#define REG_RCAUSE   (0x40000438U)

Referenced by print_reset_causes().

#define UART_RX_ENABLE   0

void configure_gclock_generator ( void  )

[setup_1]

[setup_1] [setup_2]

[setup_2]

[setup_3]

[setup_3] [setup_4]

[setup_4]

[setup_5]

[setup_5]

void configure_tc3 ( void  )

[setup_config]

[setup_config] [setup_config_defaults]

[setup_config_defaults]

[setup_change_config]

[setup_change_config]

[setup_change_config_pwm]

[setup_change_config_pwm]

[setup_set_config]

[setup_set_config]

[setup_enable]

[setup_enable]

void configure_wdt_callbacks ( void  )

[setup_5]

[setup_5]

[setup_6]

[setup_6]

uint8_t* edbg_eui_read_eui64 ( void  )
static void print_processes ( struct process *const  processes[])
static

References NULL, and printf.

Referenced by main().

static void print_reset_causes ( void  )
static

Print out all known reset causes.

Returns
Returns nothing

References printf, and REG_RCAUSE.

Referenced by main().

static void set_link_addr ( void  )
static
void watchdog_early_warning_callback ( void  )

PROCINIT& etimer_process
bool ready_to_send_new_packet =true
uint8_t sent_packets =0