MOS Source Code
Loading...
Searching...
No Matches
run_test.c File Reference
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
#include <libgen.h>
#include <simavr/sim_avr.h>
#include <simavr/sim_gdb.h>
#include <simavr/avr_ioport.h>
#include <simavr/sim_elf.h>
#include <simavr/avr_uart.h>
+ Include dependency graph for run_test.c:

Go to the source code of this file.

Functions

static void uart_tx_hook (struct avr_irq_t *irq, uint32_t value, void *param)
 
static bool stdin_can_read ()
 
static void avr_logger (avr_t *avr, const int level, const char *format, va_list ap)
 
static void uart_xon_hook (struct avr_irq_t *irq, uint32_t value, void *param)
 
static void uart_xoff_hook (struct avr_irq_t *irq, uint32_t value, void *param)
 
void init_uart ()
 
static void status_ok_hook (struct avr_irq_t *irq, uint32_t value, void *param)
 
int main (int argc, char *argv[])
 

Variables

static avr_t * g_avr
 
static avr_irq_t * g_uart_irq
 
struct { 
 
   uint8_t   argc 
 
   char   args [3][16] 
 
g_args 
 
static int g_args_idx
 
static bool g_uart_xon
 
static bool g_status_ok
 

Function Documentation

◆ uart_tx_hook()

static void uart_tx_hook ( struct avr_irq_t * irq,
uint32_t value,
void * param )
static

Definition at line 26 of file run_test.c.

Referenced by init_uart().

+ Here is the call graph for this function:

◆ stdin_can_read()

static bool stdin_can_read ( )
static

Definition at line 32 of file run_test.c.

Referenced by uart_xon_hook().

◆ avr_logger()

static void avr_logger ( avr_t * avr,
const int level,
const char * format,
va_list ap )
static

Definition at line 44 of file run_test.c.

Referenced by main().

+ Here is the call graph for this function:

◆ uart_xon_hook()

static void uart_xon_hook ( struct avr_irq_t * irq,
uint32_t value,
void * param )
static

Definition at line 51 of file run_test.c.

Referenced by init_uart().

+ Here is the call graph for this function:

◆ uart_xoff_hook()

static void uart_xoff_hook ( struct avr_irq_t * irq,
uint32_t value,
void * param )
static

Definition at line 89 of file run_test.c.

Referenced by init_uart().

◆ init_uart()

void init_uart ( )

Definition at line 94 of file run_test.c.

Referenced by main().

+ Here is the call graph for this function:

◆ status_ok_hook()

static void status_ok_hook ( struct avr_irq_t * irq,
uint32_t value,
void * param )
static

Definition at line 117 of file run_test.c.

Referenced by main().

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 122 of file run_test.c.

+ Here is the call graph for this function:

Variable Documentation

◆ g_avr

avr_t* g_avr
static

Definition at line 15 of file run_test.c.

Referenced by init_uart(), and main().

◆ g_uart_irq

avr_irq_t* g_uart_irq
static

Definition at line 16 of file run_test.c.

Referenced by init_uart(), and uart_xon_hook().

◆ argc

uint8_t argc

Definition at line 19 of file run_test.c.

Referenced by main().

◆ args

char args[3][16]

Definition at line 20 of file run_test.c.

◆ [struct]

struct { ... } g_args

Referenced by main(), and uart_xon_hook().

◆ g_args_idx

int g_args_idx
static

Definition at line 22 of file run_test.c.

Referenced by uart_xon_hook().

◆ g_uart_xon

bool g_uart_xon
static

Definition at line 23 of file run_test.c.

Referenced by uart_xoff_hook(), and uart_xon_hook().

◆ g_status_ok

bool g_status_ok
static

Definition at line 24 of file run_test.c.

Referenced by main(), and status_ok_hook().