librfn
An ad-hoc utility library
Data Fields
console Struct Reference

Console descriptor. More...

#include <console.h>

Data Fields

fibre_t fibre
 
FILE * out
 
char ringbuf [16]
 
ringbuf_t ring
 
union {
   char   buf [SCRATCH_SIZE]
 
   uint8_t   u8 [SCRATCH_SIZE]
 
   uint16_t   u16 [SCRATCH_SIZE/2]
 
   uint32_t   u32 [SCRATCH_SIZE/4]
 
   void *   p [SCRATCH_SIZE/4]
 
scratch
 
char * bufp
 
int argc
 
char * argv [4]
 
const console_cmd_tcmd
 
pt_t pt
 

Detailed Description

Console descriptor.

This is a relatively large structure (164 bytes on a 32-bit machine) due to the integrated scratch array.

Definition at line 66 of file console.h.

Field Documentation

int argc

Definition at line 90 of file console.h.

char* argv[4]

Definition at line 91 of file console.h.

char buf[SCRATCH_SIZE]

Definition at line 82 of file console.h.

char* bufp

Definition at line 88 of file console.h.

const console_cmd_t* cmd

Definition at line 93 of file console.h.

Definition at line 67 of file console.h.

FILE* out

Definition at line 69 of file console.h.

void* p[SCRATCH_SIZE/4]

Definition at line 86 of file console.h.

pt_t pt

Definition at line 94 of file console.h.

ringbuf_t ring

Definition at line 72 of file console.h.

char ringbuf[16]

Definition at line 71 of file console.h.

union { ... } scratch

Scratch buffer used by commands to store state.

Warning
Arguments passed contain pointers to these scratch buffers. Thus commands must parse their command line before storing state in the scratch buffers.
uint16_t u16[SCRATCH_SIZE/2]

Definition at line 84 of file console.h.

uint32_t u32[SCRATCH_SIZE/4]

Definition at line 85 of file console.h.

uint8_t u8[SCRATCH_SIZE]

Definition at line 83 of file console.h.


The documentation for this struct was generated from the following file: