Atmel Software Framework

console.c File Reference
#include <util/top_defs.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <util/printf-stdarg.h>
#include <util/console.h>
#include <ports/avr32/board_init.h>
#include <usart.h>

Macros

#define CMD_MAX_LEN   80
 
#define MAX_ARGS   16
 

Functions

int console_add_cmd (const char *str, cmd_cb_t cb, void *ctx)
 
char * console_gets ()
 
void console_init (void)
 
void console_init_silent (void)
 
void console_poll (void)
 
int console_schedule_cmd (char *cmd, int interactive)
 
int io_getc (char *c)
 

Variables

struct {
   cmd_cb_t   cb
 
   void *   ctx
 
   const char *   str
 
cmd_list [16] = { { 0 } }
 
static uint8_t is_initialized = 0
 

#define CMD_MAX_LEN   80

Referenced by console_gets().

#define MAX_ARGS   16

Referenced by console_schedule_cmd().

int console_add_cmd ( const char *  str,
cmd_cb_t  cb,
void *  ctx 
)

References ARRAY_SIZE, cb, cmd_list, ctx, i, and str.

Referenced by wl_init_complete_cb().

char* console_gets ( void  )

References buf, c, CMD_MAX_LEN, io_getc(), and NULL.

Referenced by console_poll().

void console_init ( void  )

References is_initialized, and printk().

Referenced by wl_init_complete_cb().

void console_init_silent ( void  )

References is_initialized.

void console_poll ( void  )

References buf, console_gets(), and console_schedule_cmd().

Referenced by poll().

int console_schedule_cmd ( char *  cmd,
int  interactive 
)

References ARRAY_SIZE, buf, cb, CMD_INPROGRESS, cmd_list, ctx, i, MAX_ARGS, NULL, printk(), s, state, and str.

Referenced by console_poll().

int io_getc ( char *  c)

struct { ... } cmd_list[16]
uint8_t is_initialized = 0
static