fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
Loading...
Searching...
No Matches
main.c File Reference

Main program entry point. More...

#include <getopt.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tinyfseq.h"
#include "tinylor.h"
#include "sl.h"
#include "audio.h"
#include "crmap.h"
#include "player.h"
#include "queue.h"
#include "serial.h"
#include "std2/errcode.h"
Include dependency graph for main.c:

Macros

#define TINYFSEQ_IMPLEMENTATION
 
#define TINYLOR_IMPL
 
#define SL_IMPL
 

Functions

static void printUsage (void)
 Prints the program usage message to stdout.
 
static void printSerialEnumPorts (void)
 Enumerates available serial ports and prints their reported device names to stdout.
 
static int parseOpts (const int argc, char **const argv)
 Parse command line options and sets global variables for program execution via gOpts.
 
static void freeOpts (void)
 Frees all allocated memory retained by gOpts.
 
int main (const int argc, char **const argv)
 

Variables

struct { 
 
   char *   seqfp 
 Sequence file path. More...
 
   char *   audiofp 
 Audio override file path. More...
 
   char *   cmapfp 
 Channel map file path. More...
 
   unsigned int   waitsec 
 Playback start delay. More...
 
   char *   spname 
 Serial port device name. More...
 
   int   spbaud 
 Serial port baud rate. More...
 
gOpts 
 Global program options.
 

Detailed Description

Main program entry point.

Macro Definition Documentation

◆ SL_IMPL

#define SL_IMPL

◆ TINYFSEQ_IMPLEMENTATION

#define TINYFSEQ_IMPLEMENTATION

◆ TINYLOR_IMPL

#define TINYLOR_IMPL

Function Documentation

◆ freeOpts()

static void freeOpts ( void )
static

Frees all allocated memory retained by gOpts.

Here is the caller graph for this function:

◆ main()

int main ( const int argc,
char **const argv )
Here is the call graph for this function:

◆ parseOpts()

static int parseOpts ( const int argc,
char **const argv )
static

Parse command line options and sets global variables for program execution via gOpts.

Parameters
argcargument count
argvargument vector
Returns
negative on error to indicate the program should exit (with an error code of 1), positive to indicate the program should exit without an error code, and zero to indicate the program should continue execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ printSerialEnumPorts()

static void printSerialEnumPorts ( void )
static

Enumerates available serial ports and prints their reported device names to stdout.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printUsage()

static void printUsage ( void )
static

Prints the program usage message to stdout.

Here is the caller graph for this function:

Variable Documentation

◆ audiofp

char* audiofp

Audio override file path.

◆ cmapfp

char* cmapfp

Channel map file path.

◆ [struct]

struct { ... } gOpts

Global program options.

◆ seqfp

char* seqfp

Sequence file path.

◆ spbaud

int spbaud

Serial port baud rate.

◆ spname

char* spname

Serial port device name.

◆ waitsec

unsigned int waitsec

Playback start delay.