Ejemplo n.º 1
0
void TSS1_Mute (TSS_CONTROL_ID u8ControlId)
{
	  /* Write your code here ... */
	    UINT8 u8Event; /* 8 bits local variable used to store the event information */
	    TSS_KEYPAD_BUFFER_READ(u8Event,Mute);
	    	if(MuteActive == FALSE)
	    		MuteActive = TRUE;
	    	else
	    		MuteActive = FALSE;
	  
	return;
}
Ejemplo n.º 2
0
void TSS1_Delta  (TSS_CONTROL_ID u8ControlId)
{
	  /* Write your code here ... */
	    UINT8 u8Event; /* 8 bits local variable used to store the event information */
	 
	    while (!TSS_KEYPAD_BUFFER_EMPTY(Delta))  /* While unread events are in the buffer */
	    {
	      TSS_KEYPAD_BUFFER_READ(u8Event,Delta); /* Read the buffer and store the event in the u8Event variable */
	      CurrentPatch = PATCH_DELTA;
	      LoadPatch(CurrentPatch);
	    }   
	  
	return;
}
Ejemplo n.º 3
0
/*
** ===================================================================
**     Event       :  TSS1_fCallBack0 (module Events)
**
**     Component   :  TSS1 [TSS_Library]
**     Description :
**         Callback definition for Control 0. This event is enabled
**         only if Control 0 is enabled.
**         The default CallBack Name is automatically generated with
**         automatic prefix update by current Component Name. User can
**         define own name, but then the automatic name update is not
**         functional.
**     Parameters  :
**         NAME            - DESCRIPTION
**         u8ControlId     - Valid unique Identifier of
**                           the Control which generated the CallBack
**                           function. This Id can be used for finding
**                           of Callback's source Control.
**     Returns     : Nothing
** ===================================================================
*/
void TSS1_fCallBack0(TSS_CONTROL_ID u8ControlId)
{
  UINT8 u8Event; /* 8 bits local variable used to store the event information */

  while (!TSS_KEYPAD_BUFFER_EMPTY(TSS1_cKey0))  /* While unread events are in the buffer */
  {
    TSS_KEYPAD_BUFFER_READ(u8Event,TSS1_cKey0); /* Read the buffer and store the event in the u8Event variable */

    /* Write your code here ... */
    //uart_SendStringLn("touch");
    (void) u8Event;
  }

  (void) u8ControlId;
  return;
}
Ejemplo n.º 4
0
void TSS1_ToneVolumeSelect (TSS_CONTROL_ID u8ControlId)
{
	  /* Write your code here ... */
	    UINT8 u8Event; /* 8 bits local variable used to store the event information */
	 
	    while (!TSS_KEYPAD_BUFFER_EMPTY(ToneVolumeSelect))  /* While unread events are in the buffer */
	    {
	      TSS_KEYPAD_BUFFER_READ(u8Event,ToneVolumeSelect); /* Read the buffer and store the event in the u8Event variable */

	      if(CurrentWheel == WHEEL_GREEN)
	    	  CurrentWheel = WHEEL_YELLOW;
	      else
	    	  CurrentWheel = WHEEL_GREEN;
	      	  
	    }   
	  
	return;
}
Ejemplo n.º 5
0
/*FUNCTION*----------------------------------------------------------------
*
* Function Name    : hmi_tss_keypad_callback
* Returned Value   : void
* Comments         :
*   This function is callback for TSS buttons.
*
*END*--------------------------------------------------------------------*/
void hmi_tss_keypad_callback(TSS_CONTROL_ID u8ControlId)
{    /* get provider structure from TSS private data */
    HMI_PROVIDER_STRUCT_PTR     provider_struct = (HMI_PROVIDER_STRUCT_PTR)TSS_GetControlPrivateData(u8ControlId.ControlNumber);
    /* get context data */
    HMI_TSS_CONTEXT_STRUCT_PTR  context_struct = (HMI_TSS_CONTEXT_STRUCT_PTR)provider_struct->CONTEXT_PTR;
    /* get keypad structure pointer */
    TSS_CSKeypad               *keypad_structure = ((TSS_CSKeypad *)TSS_GetControlStruct(context_struct->CONTROL_NUMBER));
    uint8_t                      u8Event;    /* 8 bits local variable used to store the event information */
    uint8_t                      flag;       /* push / release flag */

    /* check if client is attached to provider */
    if (context_struct == NULL || context_struct->CLIENT_HANDLE == NULL)
    {
        return;
    }
    /* While unread events are in the buffer */
    while (!TSS_KEYPAD_BUFFER_EMPTY( *keypad_structure))
    {
        /* Read the buffer and store the event in the u8Event variable */
        TSS_KEYPAD_BUFFER_READ(u8Event, * keypad_structure);

        if (u8Event & TSS_KEYPAD_BUFFER_RELEASE_FLAG)
        {
            u8Event = (uint8_t)(u8Event & TSS_KEYPAD_BUFFER_KEY_MASK);    /* Get key index */
            flag = HMI_VALUE_RELEASE;
        }
        else
        {
            flag = HMI_VALUE_PUSH;
        }
        /* check if key index is registered in provider */
        if (u8Event >= context_struct->TSS_COUNT)
        {
            return;
        }
        context_struct->CLIENT_HANDLE->ON_CHANGE(context_struct->CLIENT_HANDLE, context_struct->TSS_TABLE[u8Event].UID, flag);
    }
}