Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
nvm.h
Go to the documentation of this file.
1
/*!
2
3
Copyright 2018(c) Analog Devices, Inc.
4
5
All rights reserved.
6
7
Redistribution and use in source and binary forms, with or without
8
modification, are permitted provided that the following conditions are met:
9
- Redistributions of source code must retain the above copyright
10
notice, this list of conditions and the following disclaimer.
11
- Redistributions in binary form must reproduce the above copyright
12
notice, this list of conditions and the following disclaimer in
13
the documentation and/or other materials provided with the
14
distribution.
15
- Neither the name of Analog Devices, Inc. nor the names of its
16
contributors may be used to endorse or promote products derived
17
from this software without specific prior written permission.
18
- The use of this software may or may not infringe the patent rights
19
of one or more patent holders. This license does not release you
20
from the requirement that you obtain separate licenses from these
21
patent holders to use this software.
22
- Use of the software either in source or binary form, must be run
23
on or directly connected to an Analog Devices Inc. component.
24
25
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
26
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
27
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28
IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
29
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30
LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
31
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
*/
36
/*! @file
37
@ingroup LTPSM_InFlightUpdate
38
Library Header File for NVM
39
*/
40
41
42
#ifndef NVM_H_
43
#define NVM_H_
44
45
#include <stdbool.h>
46
#include <stdint.h>
47
#include <avr/pgmspace.h>
48
#include "../LT_PMBUS/LT_PMBus.h"
49
#include "../LT_SMBUS/LT_SMBusNoPec.h"
50
#include "../LT_SMBUS/LT_SMBusPec.h"
51
#include "../LT_SMBUS/LT_I2CBus.h"
52
#include "
main_record_processor.h
"
53
#include "
hex_file_parser.h
"
54
55
// Give access to c code used by this class
56
extern
LT_SMBusNoPec
*
smbusNoPec__
;
57
extern
LT_SMBusPec
*
smbusPec__
;
58
59
class
NVM
60
{
61
private
:
62
uint8_t numAddrs;
63
64
public
:
65
//! Constructor.
66
NVM
(
LT_SMBusNoPec
*,
//!< reference to no pec smbus object
67
LT_SMBusPec
*
//!< reference to pec smbus object
68
);
69
70
//! Program with hex data.
71
//! @return true if data loaded.
72
bool
programWithData
(
const
unsigned
char
*
//!< array of hex data
73
);
74
75
//! Verifies board NVM with hex data..
76
//! @return true if NVM configuration matches the hex data.
77
bool
verifyWithData
(
const
unsigned
char
*);
78
79
};
80
81
#endif
/* NVM_H_ */
NVM::NVM
NVM(LT_SMBusNoPec *, LT_SMBusPec *)
Constructor.
Definition:
nvm.cpp:90
main_record_processor.h
Copyright 2018(c) Analog Devices, Inc.
LT_SMBusNoPec
Definition:
LT_SMBusNoPec.h:60
NVM::programWithData
bool programWithData(const unsigned char *)
Program with hex data.
Definition:
nvm.cpp:96
LT_SMBusPec
Definition:
LT_SMBusPec.h:61
NVM::verifyWithData
bool verifyWithData(const unsigned char *)
Verifies board NVM with hex data.
Definition:
nvm.cpp:111
hex_file_parser.h
Copyright 2018(c) Analog Devices, Inc.
NVM
Definition:
nvm.h:59
smbusPec__
LT_SMBusPec * smbusPec__
Definition:
nvm.cpp:55
smbusNoPec__
LT_SMBusNoPec * smbusNoPec__
Definition:
nvm.cpp:54
LTSketchbook
libraries
LTPSM_InFlightUpdate
nvm.h
Generated on Thu Mar 19 2020 10:59:35 for Linduino by
1.8.13