blob: 1ff52a447d1fb12d9b2e3f439b45ef85b6516b7b [file] [log] [blame]
Zane Shelley5a266612019-08-15 16:23:53 -05001
2#include <isolator/hei_isolator.hpp>
Zane Shelley61565dc2019-09-18 21:57:10 -05003#include <register/hei_hardware_register.hpp>
Zane Shelley5a266612019-08-15 16:23:53 -05004
5namespace libhei
6{
7
8ReturnCode Isolator::initialize( void * i_buffer, size_t i_bufferSize,
9 bool i_forceInit )
10{
11 ReturnCode rc;
12
13 // BEGIN temporary code
14 HEI_INF( "Isolator::initialize(%p,%lu,%d)", i_buffer, i_bufferSize,
15 i_forceInit );
16 // END temporary code
17
18 return rc;
19}
20
21void Isolator::uninitialize()
22{
23 // BEGIN temporary code
24 HEI_INF( "Isolator::uninitialize()" );
25 // END temporary code
26}
27
Zane Shelleyb406de42019-09-09 16:10:38 -050028ReturnCode Isolator::isolate( const std::vector<Chip> & i_chipList,
29 IsolationData & o_isoData ) const
Zane Shelley5a266612019-08-15 16:23:53 -050030{
31 ReturnCode rc;
32
33 // Flush the isolation data to ensure a clean slate.
34 o_isoData.clear();
35
Zane Shelley61565dc2019-09-18 21:57:10 -050036 // Analyze active error on each chip.
Zane Shelleyb406de42019-09-09 16:10:38 -050037 for ( auto const & chip : i_chipList )
38 {
Zane Shelley61565dc2019-09-18 21:57:10 -050039 // In order to access hardware, we must tell the HardwareRegisters which
40 // chip to access.
41 HardwareRegister::setAccessor( chip );
42
43 // BEGIN temporary code
Zane Shelleyb406de42019-09-09 16:10:38 -050044 HEI_INF( "Isolator::isolate(%p,%u)", chip.getChip(),
45 chip.getType() );
Zane Shelley61565dc2019-09-18 21:57:10 -050046 // END temporary code
47
48 // Clean up the hardware accessor chip to prevent accidental hardware
49 // access.
50 HardwareRegister::clearAccessor();
Zane Shelleyb406de42019-09-09 16:10:38 -050051 }
Zane Shelley5a266612019-08-15 16:23:53 -050052
53 return rc;
54}
55
56} // end namespace libhei