Skip to content

Commit

Permalink
Added Hasomed precompiled library for MacOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Tang committed Aug 21, 2019
1 parent adda2c2 commit baddeb3
Show file tree
Hide file tree
Showing 14 changed files with 1,641 additions and 1,637 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
#ifndef SMPT_DEFINITIONS_H
#define SMPT_DEFINITIONS_H

/***************************************************************************//**
* \file smpt_definitions.h
* \author Bjoern Kuberski
* \copyright Hasomed GmbH 2013-2017
*
* This is the main science mode include file.
*******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "smpt_definitions_data_types.h"

typedef enum /* Smpt_General */
{
Smpt_Library_Version_Major = 3, /**< Used for interface changes that breaks backward
compatibility */
Smpt_Library_Version_Minor = 2, /**< Used for adding commands, parameters\n
The interface is backward compatible. */
Smpt_Library_Version_Revision = 4 /**< Used for bugfixes, no interface changes */

} Smpt_General; /**< \enum Smpt_General General protocol and library constants */

#ifdef __cplusplus
}
#endif

#endif /* SMPT_DEFINITIONS_H */
#ifndef SMPT_DEFINITIONS_H
#define SMPT_DEFINITIONS_H

/***************************************************************************//**
* \file smpt_definitions.h
* \author Bjoern Kuberski
* \copyright Hasomed GmbH 2013-2017
*
* This is the main science mode include file.
*******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "smpt_definitions_data_types.h"

typedef enum /* Smpt_General */
{
Smpt_Library_Version_Major = 3, /**< Used for interface changes that breaks backward
compatibility */
Smpt_Library_Version_Minor = 2, /**< Used for adding commands, parameters\n
The interface is backward compatible. */
Smpt_Library_Version_Revision = 5 /**< Used for bugfixes, no interface changes */

} Smpt_General; /**< \enum Smpt_General General protocol and library constants */

#ifdef __cplusplus
}
#endif

#endif /* SMPT_DEFINITIONS_H */

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
#ifndef SMPT_MESSAGES_H
#define SMPT_MESSAGES_H

/***************************************************************************//**
* \file smpt_messages.h
* \author Bjoern Kuberski
* \copyright Hasomed GmbH 2013-2017
*
* This file defines functions for error messages. The error function needs to
* be initialized with a callback function using smpt_init_error_callback().
*******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "smpt_definitions.h"

/***************************************************************************//**
* \brief Sets the callback function for the error message
*
* \param[in] error_function The callback function
*******************************************************************************/
SMPT_API void smpt_init_error_callback(void (*error_function)(const char* format));

/***************************************************************************//**
* \brief Calls the error callback function with the error message.
*
* \param[in] format A variable number of arguments (usage like printf()))
*******************************************************************************/
SMPT_API void smpt_error(const char* format, ...);

/***************************************************************************//**
* \brief Prints a debug message to stdout. This function is for internal usage
* only.
*
* \param[in] format A variable number of arguments (usage like printf())
*******************************************************************************/
void smpt_debug(const char* format, ...);

/***************************************************************************//**
* \brief Prints the array to stdout. This function is for internal usage only.
*
* \param[in] array
* \param[in] array_length
*******************************************************************************/
void smpt_print_array(const uint8_t array[], uint32_t array_length);

#ifdef __cplusplus
}
#endif

#endif /* SMPT_MESSAGES_H */
#ifndef SMPT_MESSAGES_H
#define SMPT_MESSAGES_H

/***************************************************************************//**
* \file smpt_messages.h
* \author Bjoern Kuberski
* \copyright Hasomed GmbH 2013-2017
*
* This file defines functions for error messages. The error function needs to
* be initialized with a callback function using smpt_init_error_callback().
*******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "smpt_definitions.h"

/***************************************************************************//**
* \brief Sets the callback function for the error message
*
* \param[in] error_function The callback function
*******************************************************************************/
SMPT_API void smpt_init_error_callback(void (*error_function)(const char* format));

/***************************************************************************//**
* \brief Calls the error callback function with the error message.
*
* \param[in] format A variable number of arguments (usage like printf()))
*******************************************************************************/
SMPT_API void smpt_error(const char* format, ...);

/***************************************************************************//**
* \brief Prints a debug message to stdout. This function is for internal usage
* only.
*
* \param[in] format A variable number of arguments (usage like printf())
*******************************************************************************/
void smpt_debug(const char* format, ...);

/***************************************************************************//**
* \brief Prints the array to stdout. This function is for internal usage only.
*
* \param[in] array
* \param[in] array_length
*******************************************************************************/
void smpt_print_array(const uint8_t array[], uint32_t array_length);

#ifdef __cplusplus
}
#endif

#endif /* SMPT_MESSAGES_H */
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
#ifndef SMPT_PACKET_NUMBER_GENERATOR_H
#define SMPT_PACKET_NUMBER_GENERATOR_H

/***************************************************************************//**
* \file smpt_packet_number_generator.h
* \author Bjoern Kuberski
* \copyright Hasomed GmbH 2016
*
* This file defines a simple packet number generator. It generates packet
* numbers 0-63 in ascending order.
*******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "smpt_definitions.h"

/***************************************************************************//**
* \brief Resets the packet number generator. The next packet number is to 0.
*
* \param[in,out] device The device struct is needed for internal handling.
*******************************************************************************/
void smpt_packet_number_generator_reset(Smpt_device *const device);

/***************************************************************************//**
* \brief Returns the next packet number
*
* \param[in,out] device The device struct is needed for internal handling.
* \returns The next packet number (0-63)
*******************************************************************************/
uint8_t smpt_packet_number_generator_next(Smpt_device *const device);

#ifdef __cplusplus
}
#endif

#endif /* SMPT_PACKET_NUMBER_GENERATOR_H */

#ifndef SMPT_PACKET_NUMBER_GENERATOR_H
#define SMPT_PACKET_NUMBER_GENERATOR_H

/***************************************************************************//**
* \file smpt_packet_number_generator.h
* \author Bjoern Kuberski
* \copyright Hasomed GmbH 2016
*
* This file defines a simple packet number generator. It generates packet
* numbers 0-63 in ascending order.
*******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#include "smpt_definitions.h"

/***************************************************************************//**
* \brief Resets the packet number generator. The next packet number is to 0.
*
* \param[in,out] device The device struct is needed for internal handling.
*******************************************************************************/
void smpt_packet_number_generator_reset(Smpt_device *const device);

/***************************************************************************//**
* \brief Returns the next packet number
*
* \param[in,out] device The device struct is needed for internal handling.
* \returns The next packet number (0-63)
*******************************************************************************/
uint8_t smpt_packet_number_generator_next(Smpt_device *const device);

#ifdef __cplusplus
}
#endif

#endif /* SMPT_PACKET_NUMBER_GENERATOR_H */
Loading

0 comments on commit baddeb3

Please sign in to comment.