File generator_rational.h
File List > gen-rational > src > generator_rational.h
Go to the documentation of this file
#ifndef GENERATOR_RATIONAL_H
#define GENERATOR_RATIONAL_H
/******************************************************************************/
/*************************** Includes *****************************************/
/******************************************************************************/
#include "generator_defs.h"
#include "storage_defs.h"
#include "notation_tv.h"
#include "stdbool.h"
#include "stdlib.h"
#include "string.h"
/******************************************************************************/
/*************************** Defines ******************************************/
/******************************************************************************/
/*************************** Write Keys
* *******************************************/
#define GEN_RATIONAL_STORAGE_UKEY ("GEN_RATIONAL")
/*@@@TODO: add keys*/
/*************************** Config *******************************************/
#define GEN_RATIONAL_CONFIG_IS_NULL (0x1u << 1u)
#define GEN_RATIONAL_CONFIG_BUFFER (0x1u << 2u)
#define GEN_RATIONAL_CONFIG_STR_BUFFER (0x1u << 3u)
/*************************** Generate *****************************************/
#define GEN_RATIONAL_COMBINATION_FAIL (0x1u << 1u)
/******************************************************************************/
/*************************** Typedefs *****************************************/
/******************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct {
uint8_t crossingNumber;
storage_write_funptr_t storage_write;
note_tv_t * tv_n;
char * tv_str_buff;
size_t tv_str_buff_len;
} gen_rational_config_t;
#ifdef __cplusplus
}
#endif
/******************************************************************************/
/*************************** Public Function Declarations *********************/
/******************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
uint8_t gen_rational_config(gen_rational_config_t *config_arg);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C"
{
#endif
uint8_t gen_rational_generate();
#ifdef __cplusplus
}
#endif
#endif /* end GENERATOR_RATIONAL_H */