plptools
Loading...
Searching...
No Matches
sistypes.h
Go to the documentation of this file.
1
/*
2
* This file is part of plptools.
3
*
4
* Copyright (C) 2002 Daniel Brahneborg <basic.chello@se>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* along with this program; if not, see <https://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef _SISTYPES_H
21
#define _SISTYPES_H
22
23
#include <stdint.h>
24
#include <sys/types.h>
25
29
enum
SisRC
{
30
SIS_OK
= 0,
31
SIS_TRUNCATED
,
32
SIS_TRUNCATEDDATA
,
33
SIS_CORRUPTED
,
34
SIS_FAILED
,
35
SIS_ABORTED
,
36
SIS_DIFFERENT_APP
,
37
SIS_VER_EARLIER
,
38
SIS_SAME_OR_LATER
,
39
SIS_OTHER_VARIANT
40
};
41
42
extern
uint16_t
read16
(uint8_t* p);
43
44
extern
uint32_t
read32
(uint8_t* p);
45
46
extern
void
write16
(uint8_t* p,
int
val);
47
48
extern
void
createCRCTable
();
49
50
extern
uint16_t
updateCrc
(uint16_t crc, uint8_t value);
51
52
extern
int
logLevel
;
53
58
struct
LangTableEntry
59
{
60
uint16_t
m_no
;
61
char
m_code
[3];
62
const
char
*
m_name
;
63
};
64
65
extern
LangTableEntry
langTable
[];
66
67
#endif
createCRCTable
void createCRCTable()
Definition:
sistypes.cpp:27
SisRC
SisRC
Return Codes.
Definition:
sistypes.h:29
SIS_OK
@ SIS_OK
Definition:
sistypes.h:30
SIS_ABORTED
@ SIS_ABORTED
Definition:
sistypes.h:35
SIS_TRUNCATEDDATA
@ SIS_TRUNCATEDDATA
Definition:
sistypes.h:32
SIS_VER_EARLIER
@ SIS_VER_EARLIER
Definition:
sistypes.h:37
SIS_DIFFERENT_APP
@ SIS_DIFFERENT_APP
Definition:
sistypes.h:36
SIS_TRUNCATED
@ SIS_TRUNCATED
Definition:
sistypes.h:31
SIS_CORRUPTED
@ SIS_CORRUPTED
Definition:
sistypes.h:33
SIS_FAILED
@ SIS_FAILED
Definition:
sistypes.h:34
SIS_SAME_OR_LATER
@ SIS_SAME_OR_LATER
Definition:
sistypes.h:38
SIS_OTHER_VARIANT
@ SIS_OTHER_VARIANT
Definition:
sistypes.h:39
updateCrc
uint16_t updateCrc(uint16_t crc, uint8_t value)
Definition:
sistypes.cpp:41
langTable
LangTableEntry langTable[]
Definition:
sistypes.cpp:73
read32
uint32_t read32(uint8_t *p)
Definition:
sistypes.cpp:62
write16
void write16(uint8_t *p, int val)
Definition:
sistypes.cpp:67
logLevel
int logLevel
Definition:
sistypes.cpp:25
read16
uint16_t read16(uint8_t *p)
Definition:
sistypes.cpp:57
LangTableEntry
Holder of a language entry, translating from language numbers to names.
Definition:
sistypes.h:59
LangTableEntry::m_name
const char * m_name
Definition:
sistypes.h:62
LangTableEntry::m_no
uint16_t m_no
Definition:
sistypes.h:60
LangTableEntry::m_code
char m_code[3]
Definition:
sistypes.h:61
lib
sistypes.h
Generated by
1.9.5