/**
 * Generated by Eclipse Mita 0.1.0.
 * @date 2022-05-14 23:02:01
 */


#include <BCDS_Basics.h>
#include <BSP_BoardType.h>
#include <MitaEvents.h>
#include <BCDS_BSP_Button.h>
#include <BCDS_CmdProcessor.h>
#include <BCDS_Retcode.h>
#include "SensorButton_two.h"
#include "SensorButton_one.h"
#include "MitaExceptions.h"

void ButtonTwo_OnEvent(uint32_t data)
{
	if(data == BSP_XDK_BUTTON_PRESS) {
		Retcode_T retcode = CmdProcessor_enqueueFromIsr(&Mita_EventQueue, HandleEveryButton_twoPressed1, NULL, data);
		if(retcode != RETCODE_OK)
		{
			Retcode_RaiseErrorFromIsr(retcode);
		}
	}
}


Retcode_T SensorButton_two_Setup(void)
{
	return BSP_Button_Connect();
	
	return NO_EXCEPTION;
}

Retcode_T SensorButton_two_Enable(void)
{
	Retcode_T retcode = NO_EXCEPTION;
	
	retcode = BSP_Button_Enable((uint32_t) BSP_XDK_BUTTON_2, ButtonTwo_OnEvent);
	if(retcode != NO_EXCEPTION) return retcode;
	
	return NO_EXCEPTION;
}


