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


#include <eCxx/eCxx_DDX.h>
#include <eCxx/eCxx_InputDevice.h>

#include "NodeMCU_Common.h"


//
// Instantiate the digital configure, read, and write wrapper class objects
//
static const eCxx::PinDDX<eCxx::NodeMCU::BuiltinLED> pinDDX_LED;

#ifdef ECXX_ESP01
static const eCxx::PinDDX<eCxx::NodeMCU::UART1_Tx  > pinDDX_SW;
#else
static const eCxx::PinDDX<eCxx::NodeMCU::TWI_SCL   > pinDDX_SW;
#endif


//
// Include common source code for direct digital configure, read, and write wrapper test application
//
#include "../CommonCode/PinDDX_Common.h"


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

    // Initialize the pins
    eCxx_user_init_initPins();
}


//
// The task function
//
void eCxx_user_task()
{
    // Execute the user task
    eCxx_user_task_execute();
}
