/*
 * __________________________________________________________________
 *
 * Copyright (C) [2023] by InvenSense, Inc.
 * 
 * Permission to use, copy, modify, and/or distribute this software
 * for any purpose with or without fee is hereby granted.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
 * WARRANTIES  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
 * WARRANTIES OF MERCHANTABILITY  AND FITNESS. IN NO EVENT SHALL
 * THE AUTHOR BE LIABLE  FOR ANY SPECIAL, DIRECT, INDIRECT, OR
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 * __________________________________________________________________
 */

#ifndef __EXAMPLE_SANITY_H__
#define __EXAMPLE_SANITY_H__

#include <stdint.h>
#include "Invn/Drivers/Ixm42xxx/Ixm42xxxDriver_HL.h"
#include "Invn/Drivers/Ixm42xxx/Ixm42xxxExtFunc.h"
#include "invn_algo_agm.h"



#define NUM_COLUMN  24


/**
 * \brief This function is in charge of reseting and initializing Ixm42xxx device. It should
 * be succesfully executed before any access to Ixm42xxx device.
 * 
 * \param[in] icm_serif : Serial interface object.
 * \return 0 on success, negative value on error.
 */
int SetupInvDevice(struct inv_ixm42xxx_serif * icm_serif);

/**
 * \brief This function initializes the agm_fusion algorithm.
 * 
 * \return 0 on success, negative value on error.
 */
int InitInvAgmFusionAlgo();

/**
 * \brief This function plays a test vector and compare the output.
 * 
 * \return 0 on success, negative value on error.
 */
int RunTestVector(const int32_t testVector[][NUM_COLUMN], uint32_t numRows, uint32_t numCol, const char * testName);



#endif /* !__EXAMPLE_SANITY_H__ */
