// TestSSTComponent.c // // Specifies the main source file of the component. Add initialization and event registrations to // the files COMPONENT_INIT functions. // Include the core framework C APIs. #include "legato.h" // Include your component's API interfaces. #include "interfaces.h" #define MY_INTERFACE_NAME "InterfaceNameDummy" //static void NotifyHandlerFunc(le_msg_MessageRef_t msgRef,void* contextPtr); // This function is called only once on startup. Place your initialization and event registration // here. const char HardwareVer[]="HARDWA"; unsigned char CharBuffer[30]={0}; //le_msg_SessionRef_t _ifgen_sessionRef; le_msg_ProtocolRef_t protocolRef; le_msg_SessionRef_t sessionRef; COMPONENT_INIT { sss LE_INFO("Component TestSSTComponent started."); LE_INFO("InitCommonData Success"); if( ifgen_le_secStore_OpenSession(sessionRef,0 )== LE_OK) { LE_INFO("ifgen_le_secStore_OpenSession Success"); } else { LE_ERROR("ifgen_le_secStore_OpenSession Fail"); return; } LE_INFO("InitCommonData Success"); memset(CharBuffer,'\0',sizeof(CharBuffer)); strcpy((char *)CharBuffer,"SYS_GETHCSRW_NOEMMC"); if(ifgen_le_secStore_Write(sessionRef,HardwareVer,CharBuffer,strlen((char *)CharBuffer))==LE_OK) { LE_INFO("Secure Storage Write Successfull"); } }