GNU Radio 3.5.3.1 C++ API
fcd.h
Go to the documentation of this file.
1
/***************************************************************************
2
* This file is part of Qthid.
3
*
4
* Copyright (C) 2010 Howard Long, G6LVB
5
* CopyRight (C) 2011 Alexandru Csete, OZ9AEC
6
* Mario Lorenz, DL5MLO
7
*
8
* Qthid is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* Qthid is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with Qthid. If not, see <http://www.gnu.org/licenses/>.
20
*
21
***************************************************************************/
22
23
#ifndef FCD_H
24
#define FCD_H 1
25
26
#include <
fcd_api.h
>
27
28
#ifdef FCD
29
#define EXTERN
30
#define ASSIGN (x) =x
31
#else
32
#define EXTERN extern
33
#define ASSIGN(x)
34
#endif
35
36
#include <inttypes.h>
37
38
/** \brief FCD mode enumeration. */
39
typedef
enum
{
40
FCD_MODE_NONE
,
/*!< No FCD detected. */
41
FCD_MODE_BL
,
/*!< FCD present in bootloader mode. */
42
FCD_MODE_APP
/*!< FCD present in aplpication mode. */
43
}
FCD_MODE_ENUM
;
// The current mode of the FCD: none inserted, in bootloader mode or in normal application mode
44
45
/** \brief FCD capabilities that depend on both hardware and firmware. */
46
typedef
struct
{
47
unsigned
char
hasBiasT
;
/*!< Whether FCD has hardware bias tee (1=yes, 0=no) */
48
unsigned
char
hasCellBlock
;
/*!< Whether FCD has cellular blocking. */
49
}
FCD_CAPS_STRUCT
;
50
51
#ifdef __cplusplus
52
extern
"C"
{
53
#endif
54
55
/* Application functions */
56
EXTERN
FCD_API
FCD_MODE_ENUM
fcdGetMode
(
void
);
57
EXTERN
FCD_API
FCD_MODE_ENUM
fcdGetFwVerStr
(
char
*str);
58
EXTERN
FCD_API
FCD_MODE_ENUM
fcdGetCaps
(
FCD_CAPS_STRUCT
*fcd_caps);
59
EXTERN
FCD_API
FCD_MODE_ENUM
fcdGetCapsStr
(
char
*caps_str);
60
EXTERN
FCD_API
FCD_MODE_ENUM
fcdAppReset
(
void
);
61
EXTERN
FCD_API
FCD_MODE_ENUM
fcdAppSetFreqkHz
(
int
nFreq);
62
EXTERN
FCD_API
FCD_MODE_ENUM
fcdAppSetFreq
(
int
nFreq);
63
64
EXTERN
FCD_API
FCD_MODE_ENUM
fcdAppSetParam
(uint8_t u8Cmd, uint8_t *pu8Data, uint8_t u8len);
65
EXTERN
FCD_API
FCD_MODE_ENUM
fcdAppGetParam
(uint8_t u8Cmd, uint8_t *pu8Data, uint8_t u8len);
66
67
68
/* Bootloader functions */
69
EXTERN
FCD_API
FCD_MODE_ENUM
fcdBlReset
(
void
);
70
EXTERN
FCD_API
FCD_MODE_ENUM
fcdBlErase
(
void
);
71
EXTERN
FCD_API
FCD_MODE_ENUM
fcdBlWriteFirmware
(
char
*pc, int64_t n64Size);
72
EXTERN
FCD_API
FCD_MODE_ENUM
fcdBlVerifyFirmware
(
char
*pc, int64_t n64Size);
73
74
75
#ifdef __cplusplus
76
}
77
#endif
78
79
#endif // FCD_H
gr-fcd
lib
fcd
fcd.h
Generated by
1.8.1.1