Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 1 | |
| 2 | #include <isolator/hei_isolator.hpp> |
Zane Shelley | 61565dc | 2019-09-18 21:57:10 -0500 | [diff] [blame^] | 3 | #include <register/hei_hardware_register.hpp> |
Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 4 | |
| 5 | namespace libhei |
| 6 | { |
| 7 | |
| 8 | ReturnCode 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 | |
| 21 | void Isolator::uninitialize() |
| 22 | { |
| 23 | // BEGIN temporary code |
| 24 | HEI_INF( "Isolator::uninitialize()" ); |
| 25 | // END temporary code |
| 26 | } |
| 27 | |
Zane Shelley | b406de4 | 2019-09-09 16:10:38 -0500 | [diff] [blame] | 28 | ReturnCode Isolator::isolate( const std::vector<Chip> & i_chipList, |
| 29 | IsolationData & o_isoData ) const |
Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 30 | { |
| 31 | ReturnCode rc; |
| 32 | |
| 33 | // Flush the isolation data to ensure a clean slate. |
| 34 | o_isoData.clear(); |
| 35 | |
Zane Shelley | 61565dc | 2019-09-18 21:57:10 -0500 | [diff] [blame^] | 36 | // Analyze active error on each chip. |
Zane Shelley | b406de4 | 2019-09-09 16:10:38 -0500 | [diff] [blame] | 37 | for ( auto const & chip : i_chipList ) |
| 38 | { |
Zane Shelley | 61565dc | 2019-09-18 21:57:10 -0500 | [diff] [blame^] | 39 | // 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 Shelley | b406de4 | 2019-09-09 16:10:38 -0500 | [diff] [blame] | 44 | HEI_INF( "Isolator::isolate(%p,%u)", chip.getChip(), |
| 45 | chip.getType() ); |
Zane Shelley | 61565dc | 2019-09-18 21:57:10 -0500 | [diff] [blame^] | 46 | // END temporary code |
| 47 | |
| 48 | // Clean up the hardware accessor chip to prevent accidental hardware |
| 49 | // access. |
| 50 | HardwareRegister::clearAccessor(); |
Zane Shelley | b406de4 | 2019-09-09 16:10:38 -0500 | [diff] [blame] | 51 | } |
Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 52 | |
| 53 | return rc; |
| 54 | } |
| 55 | |
| 56 | } // end namespace libhei |