/**
 * @file mux.h
 *
 * @brief This file contains function prototypes and data definitions that
 * helps to create and unpack a TC frame
 *
 * @copyright Copyright 2024 Antaris, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef GEN2_MUX_H
#define GEN2_MUX_H

#include "stdio.h"
#include <string.h>
#include "stdint.h"
#include "obc_tc_tm.h"

typedef enum
{
	PAYLOAD_SSD_1 = 1,
	PAYLOAD_SSD_2,
	PAYLOAD_SSD_3,
	PAYLOAD_SSD_4,
}payload_ssd_id;

typedef enum
{
	PAYLOAD_ID_1 = 1,
	PAYLOAD_ID_2,
	PAYLOAD_ID_3,
}payload_brd_id;

typedef enum
{
	EDGE_ID_1 = 1,
	EDGE_ID_2,
	EDGE_ID_3,
}edge_board_id;

typedef enum
{
	EDGE_BRD_SSD_1 = 1,
	EDGE_BRD_SSD_2,
	EDGE_BRD_SSD_3,
	EDGE_BRD_SSD_4,
}edge_board_ssd_id;

typedef enum
{
	IO_BRD_1 = 1,
	IO_BRD_2,
}io_board_id;

typedef enum
{
	CORE_BRD_1 = 1,
	CORE_BRD_2,
}core_board_id;

/**
 * @brief This API function use to select Payload server and payload ssd
 * @param[out] ps_brd_ssd_id : This structure handle payload brd id & payload ssd id
 */
uint8_t paylaod_board_select(ps_brd_ssd_id ps_brd_id);

/**
 * @brief This API function use to select Edge server
 * @param[out] es_brd_id : This function handles the edge board id
 */
uint8_t edge_board_select(uint8_t edge_brd_id);

/**
 * @brief This API function use to select edge ssd
 * @param[out] edge_brd_ssd_id : This function handles the edge ssd id
 */
uint8_t edge_board_ssd_select(uint8_t edge_brd_ssd_id);

/**
 * @brief  This API function use to select IO board
 * @param[out] io_brd_id : This function handles the IO board id
 */
uint8_t io_board_select(uint8_t io_brd_id);

/**
 * This function init backplane board I2C
 */
uint8_t back_plane_brd_select();

/*
 * This function pins are common mugs pin.
 */
uint8_t common_mux_pin_select();

/*
 * This function used to power board heat init
 */
uint8_t power_brd_heat_init();

/*
 * This function select the Payload board SSD off
 */
uint8_t payload_board_ssd_off();

#endif
