/*
 *
 * Copyright (C) 2012-2019, Samsung Electronics Co., Ltd.
 *
 * Board initial configuration
 */

#include "board.h"
#include "dbg.h"

boardInfo_t board;

/* Initialize board info */
TEE_Result tuiHalBoardInit(void)
{
    dbgPrintf(">> %s\n", __func__);

    TEE_MemFill(&board, 0, sizeof(board));

    board.i2c.state = DEV_UNCONFIGURED;
    board.i2c.bus.clock_freq = 400000;  /* I2C Bitrate */
    board.i2c.bus.slave_address = TOUCH_IC_SLAVE_ADDR;

    /* Touch GPIO */
    board.gpio.state = DEV_UNCONFIGURED;
    board.gpio.irq_num = TOUCH_INT_NUM;

    /* Touch pad */
    board.touch.state = DEV_UNCONFIGURED;
    board.touch.irq_num = TOUCH_INT_NUM;
    board.touch.bus.device = &board.i2c;

    dbgPrintf("<< %s\n", __func__);
    return TEE_SUCCESS;
}
