Add bootloader

This commit is contained in:
2022-12-06 08:55:42 +01:00
parent 9830c36543
commit 4e3b086afd
7 changed files with 43 additions and 9 deletions

View File

@ -189,12 +189,12 @@ PRIVATE BOOL boReadReg( U8 u8Register, PU16 pu16Data, BOOL boIs16bit );
//-------------------------------------------------------------------------------------------------
BOOL ADCD_boInitializeModule( VOID )
{
BOOL boOK = TRUE;
BOOL boOK = TRUE;
boOK &= ( ( m_pstMutexID = osMutexNew( &m_stMutexAttr ) ) == NULL ) ? FALSE : TRUE;
boOK &= ( ( m_pstMutexID = osMutexNew( &m_stMutexAttr ) ) == NULL ) ? FALSE : TRUE;
osMutexAcquire( m_pstMutexID, osWaitForever );
// Conifg ADC Cold
DIPO_vSetOutput( DIPO_eCS_Module );
boOK &= boWriteReg( REG_CONFIG, (U16) CONFIG | CONFIG_FAULTSTATCLEAR, FALSE );
@ -204,10 +204,13 @@ BOOL ADCD_boInitializeModule( VOID )
DIPO_vSetOutput( DIPO_eCS_Water );
boOK &= boWriteReg( REG_CONFIG, (U16) CONFIG | CONFIG_FAULTSTATCLEAR, FALSE );
DIPO_vResetOutput( DIPO_eCS_Water );
/** @todo read back configuration */
osMutexRelease( m_pstMutexID );
return( boOK );
return( boOK );
}
//-------------------------------------------------------------------------------------------------