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


#include <eCxx/eCxx_LEDDriver.h>

#include "AVR_Common.h"


//
// Pin numbers
//
static constexpr eCxx::uint8_t PIN_DATA  = 5;
static constexpr eCxx::uint8_t PIN_CLOCK = 6;
static constexpr eCxx::uint8_t PIN_LATCH = 7;


//
// Include common source code for MAX72XX 7-segment test application
//
#include "../CommonCode/MAX72XXSevSeg_Common.h"


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

    // Initialize the 7-segment and perform initial test
    eCxx_user_init_MAX72XXSevSeg_and_test();
}


//
// The task function
//
void eCxx_user_task()
{
    // Process event and update the 7-segment animation
    eCxx_user_task_updateMAX72XXSevSeg();
}
