/* This file has been autogenerated by Ivory
 * Compiler version  0.1.0.3
 */
#include "UART_in.h"

static void component_entry_aux(void);

void component_entry(const int64_t * periodic_dispatcher)
{
    component_entry_aux();
    
    int64_t n_local0 = (int64_t) 0;
    int64_t *n_ref1 = &n_local0;
    
    callback_periodic_pop(n_ref1);
    return;
}

void component_init(const int64_t * Decrypt_initializer)
{
    int64_t n_local0 = (int64_t) 0;
    int64_t *n_ref1 = &n_local0;
    
    callback_configureStaticKey(n_ref1);
}

void component_entry_aux(void)
{
    //struct ivory_string_UartPacket n_local0 = {};
    //struct ivory_string_UartPacket *n_ref1 = &n_local0;
    //bool n_r2 = UART_hw_UART_in_get_packet(n_ref1);

    struct SMACCM_DATA__UartPacket_i n_local0 = {};
    struct SMACCM_DATA__UartPacket_i *n_ref1 = &n_local0;
    bool n_r2 = Decrypt_read_get_packet(n_ref1);
    
    if (n_r2) {
        callback_input_UART_hw_UART_in_get_packet_handler(n_ref1);
    }
    return;
}
