blob: 64077d1b40116c7524e20e843c484643a712169a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/*
* main.h
*
* Copyright (C) ST-Ericsson SA 2011
* Authors: Srimanta Panda <srimanta.panda@stericsson.com>,
* Ola Borgelin <ola.borgelin@stericsson.com>,
* Karin Hedlund <karin.hedlund@stericsson.com>,
* Markus Andersson <markus.m.andersson@stericsson.com> for ST-Ericsson.
* License terms: 3-clause BSD license
*
*/
/*
* @addtogroup main
* @{
*/
#pragma once
#include "CDAL.h"
#include "Config.h"
#include <string>
#include "Logger.h"
#include <signal.h>
#define PATH_LENGTH 256
#define MODE_STR_LENGTH 6
enum ConnectionType {
USB_CONNECTION, /**< USB connection. */
};
#ifdef _WIN32
#endif
Logger* logger_;
Config* config_;
#ifdef _WIN32
char configFile[PATH_LENGTH] = "./riff/config";
#else
char configFile[PATH_LENGTH] = RIFF_CONFIG_PREFIX "/share/riff/config";
#endif
char flashimage[PATH_LENGTH] = "\0";
char address[PATH_LENGTH] = "0";
char length[PATH_LENGTH] = "0";
char dumpPath[PATH_LENGTH] = "\0";
char mode[MODE_STR_LENGTH];
int exitstatus = 0;
/**
* @brief USB device event callback function.
*
* This function is called when USB device is connected or disconnected.
*
* @param[in] status - Status of the device.
* @param[in] event - Event that was triggered.
* @param[in] device - The device that triggered the event.
*/
void UsbDeviceEventCallback(DeviceStatus_t status, DeviceEvent_t event, Device_t device);
/**
* @brief Handling user commands from commandline
*
* This function is called to handle the commands typed by the user from commandline.
*
* @param[in] argc - number of inparameters
* @param[in] argv[] - inparameters given by user
*/
void handleCmdLineInput(int argc, char* argv[]);
/**
* @brief Checking commandline arguments to the options
*
*/
int checkCmdLineArgument(int argc, int counter, char* argv[], char* var);
/**
* @brief Handles user interupts (CTRL+C)
*
*/
void interrupt(int param);
/* @} */
|