Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thermometer.c #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Projects/ble/Thermometer/Source/thermometer.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
its documentation for any purpose.

YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
Expand Down Expand Up @@ -444,16 +444,18 @@ uint16 Thermometer_ProcessEvent( uint8 task_id, uint16 events )

if ( events & SYS_EVENT_MSG )
{
uint8 *pMsg;

//uint8 *pMsg;
//Adress from Heap Memory
uint8 *pMsg = (uint8*)malloc(16);
if(pMsg){
if ( (pMsg = osal_msg_receive( thermometerTaskId )) != NULL )
{
thermometer_ProcessOSALMsg( (osal_event_hdr_t *)pMsg );

// Release the OSAL message
VOID osal_msg_deallocate( pMsg );
}

}
// return unprocessed events
return (events ^ SYS_EVENT_MSG);
}
Expand Down