PS5 Barcode scanner
Loading...
Searching...
No Matches
main.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include "lib.h"
#include "gps.h"
#include "menu.h"
#include "main.h"
#include "utils.h"
Include dependency graph for main.c:

Functions

void main (void)
 Main program entry.
 
int UpdateBluetoothState (int *stateChange)
 Bluetooth stat machine.
 
int IsScannerGPS (void)
 Checks if the scanner has GPS and it is actively being polled.
 
int IsScannerBluetooth (void)
 Checks if the scanner implements bluetooth.
 
int conv_symbology (int symbo)
 Table lookup to convert symbology type from decode to menu.
 
void set_model_defaults (scannerType *scanner)
 Sets the defaults for the scanner model.
 
void display_splash_screen_no_waitkey (void)
 Displays the splash screen.
 
void display_splash_screen (void)
 Displays the splash screen.
 
void DemoTickHandler (void)
 Installed for the heartbeat callback.
 
void DisplayBluetoothMenu (void)
 Displays bluetooth menu.
 
void Application_Default (void)
 Reset all application specific settings to default.
 
void Bluetooth_VCP_Default (void)
 Reset all Bluetooth settings to default.
 
void Bluetooth_HID_Default (void)
 Reset all Bluetooth settings to default.
 
void BluetoothDefault (void)
 Reset all Bluetooth settings to default depending on selected bluetooth mode.
 
void DisplayBluetoothStatus (int BLState, int rowNo)
 Displays bluetooth status.
 
void CloseBluetoothPorts (void)
 Close all bluettoth ports.
 
void SaveAppSettings (void)
 Saves application settings from the menu.
 
int IsGPSTag (void)
 Checks if GPS tag is desired for real-time bar code transmission.
 
void LoadAppSettings (void)
 Loads application settings for use by the menu.
 
void BltPINCallback (char *pin, int *len)
 

Variables

application_vars app
 
int reset_appl_to_default
 
int reset_read_mode
 
int batt_power
 
int battery_msg_status
 
scannerType scanner
 
char buffer [100]
 
int g_TickCounter
 
int BTState
 
int BTStateChange
 
int com_opened
 
int attempts_left
 
int pressed
 
splash_screen splash_msg
 
volatile unsigned int timer [MAX_TIMERS]
 
char BTLocalName [32] = ""
 
char g_termID [7]
 
int g_GPS_breadcrumbTimer
 
int g_GPS_Test_Mode
 
int g_nBreadCrumbIndex
 
unsigned long g_nGPSStandbyTimeout
 
long gps_bread_crumbs
 
long gps_data_format
 
long time_zone_offset
 
long time_zone_change
 
int g_util_timer
 
int g_util_timeout
 
int g_gps_mode
 
int g_BreadCrumbTime
 
int g_BreadCrumbFlag
 
int g_gpsOptions
 
int g_fSuspendGPS
 
long enabled_barcodes
 
long baudrate_enabled
 
long protocol_enabled
 
long standby_enabled
 
long backlight_enabled
 
long interface_enabled
 
int battery_type
 
char app_version []
 
int g_bltPINCallback
 

Function Documentation

◆ Application_Default()

void Application_Default ( void )

Reset all application specific settings to default.

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

◆ BltPINCallback()

void BltPINCallback ( char * pin,
int * len )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Bluetooth_HID_Default()

void Bluetooth_HID_Default ( void )

Reset all Bluetooth settings to default.

Here is the caller graph for this function:

◆ Bluetooth_VCP_Default()

void Bluetooth_VCP_Default ( void )

Reset all Bluetooth settings to default.

Here is the caller graph for this function:

◆ BluetoothDefault()

void BluetoothDefault ( void )

Reset all Bluetooth settings to default depending on selected bluetooth mode.

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

◆ CloseBluetoothPorts()

void CloseBluetoothPorts ( void )

Close all bluettoth ports.

◆ conv_symbology()

int conv_symbology ( int symbo)

Table lookup to convert symbology type from decode to menu.

Here is the caller graph for this function:

◆ DemoTickHandler()

void DemoTickHandler ( void )

Installed for the heartbeat callback.

Here is the caller graph for this function:

◆ display_splash_screen()

void display_splash_screen ( void )

Displays the splash screen.

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

◆ display_splash_screen_no_waitkey()

void display_splash_screen_no_waitkey ( void )

Displays the splash screen.

Here is the call graph for this function:

◆ DisplayBluetoothMenu()

void DisplayBluetoothMenu ( void )

Displays bluetooth menu.

Here is the call graph for this function:

◆ DisplayBluetoothStatus()

void DisplayBluetoothStatus ( int BLState,
int rowNo )

Displays bluetooth status.

◆ IsGPSTag()

int IsGPSTag ( void )

Checks if GPS tag is desired for real-time bar code transmission.

◆ IsScannerBluetooth()

int IsScannerBluetooth ( void )

Checks if the scanner implements bluetooth.

Here is the caller graph for this function:

◆ IsScannerGPS()

int IsScannerGPS ( void )

Checks if the scanner has GPS and it is actively being polled.

Here is the caller graph for this function:

◆ LoadAppSettings()

void LoadAppSettings ( void )

Loads application settings for use by the menu.

Here is the caller graph for this function:

◆ main()

void main ( void )

Main program entry.

Here is the call graph for this function:

◆ SaveAppSettings()

void SaveAppSettings ( void )

Saves application settings from the menu.

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

◆ set_model_defaults()

void set_model_defaults ( scannerType * scanner)

Sets the defaults for the scanner model.

Here is the caller graph for this function:

◆ UpdateBluetoothState()

int UpdateBluetoothState ( int * stateChange)

Bluetooth stat machine.

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

Variable Documentation

◆ app

application_vars app

◆ app_version

char app_version[]
extern

◆ attempts_left

int attempts_left

◆ backlight_enabled

long backlight_enabled
extern

◆ batt_power

int batt_power
extern

◆ battery_msg_status

int battery_msg_status
extern

◆ battery_type

int battery_type
extern

◆ baudrate_enabled

long baudrate_enabled
extern

◆ BTLocalName

char BTLocalName[32] = ""

◆ BTState

int BTState

◆ BTStateChange

int BTStateChange

◆ buffer

char buffer[100]

◆ com_opened

int com_opened

◆ enabled_barcodes

long enabled_barcodes
extern

◆ g_bltPINCallback

int g_bltPINCallback
extern

◆ g_BreadCrumbFlag

int g_BreadCrumbFlag
extern

◆ g_BreadCrumbTime

int g_BreadCrumbTime
extern

◆ g_fSuspendGPS

int g_fSuspendGPS
extern

◆ g_GPS_breadcrumbTimer

int g_GPS_breadcrumbTimer
extern

◆ g_gps_mode

int g_gps_mode
extern

◆ g_GPS_Test_Mode

int g_GPS_Test_Mode
extern

◆ g_gpsOptions

int g_gpsOptions
extern

◆ g_nBreadCrumbIndex

int g_nBreadCrumbIndex
extern

◆ g_nGPSStandbyTimeout

unsigned long g_nGPSStandbyTimeout
extern

◆ g_termID

char g_termID[7]

◆ g_TickCounter

int g_TickCounter

◆ g_util_timeout

int g_util_timeout
extern

◆ g_util_timer

int g_util_timer
extern

◆ gps_bread_crumbs

long gps_bread_crumbs
extern

◆ gps_data_format

long gps_data_format
extern

◆ interface_enabled

long interface_enabled
extern

◆ pressed

int pressed

◆ protocol_enabled

long protocol_enabled
extern

◆ reset_appl_to_default

int reset_appl_to_default

◆ reset_read_mode

int reset_read_mode

◆ scanner

scannerType scanner

◆ splash_msg

splash_screen splash_msg

◆ standby_enabled

long standby_enabled
extern

◆ time_zone_change

long time_zone_change
extern

◆ time_zone_offset

long time_zone_offset
extern

◆ timer

volatile unsigned int timer[MAX_TIMERS]