/*
 * Copyright (C) 2020-2021 Aloysius Indrayanto
 *
 * This file is part of the eCxx library, see LICENSE file for the license details.
 */


#include <eCxx/eCxx.h>

#include "AVR_Common.h"


//
// TWISlave address
//
static constexpr eCxx::uint8_t twiSlaveAddress = 0x7F;


//
// Include common source code for TWISlave test application
//
#include "../CommonCode/TWISlave_Common.h"


//
// The init function
//
void eCxx_user_init()
{
    // Initialize application
    initBasicAVRApp();

    // Initialize TWI in slave mode and handle the communication callbacks
    initTWISlaveAndHandleCallback();
}


//
// The task function
//
void eCxx_user_task()
{
    // Process event
    App::processEvent();
}
