scd_logger.c source file More...
#include <string.h>
#include "scd_logger.h"
#include "scd_values.h"
Go to the source code of this file.
Functions | |
void | ResetLogger (log_struct_t *logger) |
Reset the log buffer and position. | |
uint8_t | LogByte1 (log_struct_t *logger, SCD_LOG_BYTE type, uint8_t byte_a) |
Log one byte of data. | |
uint8_t | LogByte2 (log_struct_t *logger, SCD_LOG_BYTE type, uint8_t byte_a, uint8_t byte_b) |
Log two bytes of data. | |
uint8_t | LogByte3 (log_struct_t *logger, SCD_LOG_BYTE type, uint8_t byte_a, uint8_t byte_b, uint8_t byte_c) |
Log three bytes of data. | |
uint8_t | LogByte4 (log_struct_t *logger, SCD_LOG_BYTE type, uint8_t byte_a, uint8_t byte_b, uint8_t byte_c, uint8_t byte_d) |
Log four bytes of data. |
scd_logger.c source file
This file implements functions to update the SCD log structure
Copyright (C) 2012 Omar Choudary (omar.choudary@cl.cam.ac.uk)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file scd_logger.c.
uint8_t LogByte1 | ( | log_struct_t * | logger, | |
SCD_LOG_BYTE | type, | |||
uint8_t | byte_a | |||
) |
Log one byte of data.
Function used to log one byte of data.
logger | the log structure | |
type | the kind of data to be logged | |
byte_a | the byte to be logged |
Definition at line 61 of file scd_logger.c.
uint8_t LogByte2 | ( | log_struct_t * | logger, | |
SCD_LOG_BYTE | type, | |||
uint8_t | byte_a, | |||
uint8_t | byte_b | |||
) |
Log two bytes of data.
Function used to log two bytes of data.
logger | the log structure | |
type | the kind of data to be logged | |
byte_a | the first byte to be logged | |
byte_b | the second byte to be logged |
Definition at line 86 of file scd_logger.c.
uint8_t LogByte3 | ( | log_struct_t * | logger, | |
SCD_LOG_BYTE | type, | |||
uint8_t | byte_a, | |||
uint8_t | byte_b, | |||
uint8_t | byte_c | |||
) |
Log three bytes of data.
Function used to log three bytes of data.
logger | the log structure | |
type | the kind of data to be logged | |
byte_a | the first byte to be logged | |
byte_b | the second byte to be logged | |
byte_c | the third byte to be logged |
Definition at line 115 of file scd_logger.c.
uint8_t LogByte4 | ( | log_struct_t * | logger, | |
SCD_LOG_BYTE | type, | |||
uint8_t | byte_a, | |||
uint8_t | byte_b, | |||
uint8_t | byte_c, | |||
uint8_t | byte_d | |||
) |
Log four bytes of data.
Function used to log four bytes of data.
logger | the log structure | |
type | the kind of data to be logged | |
byte_a | the first byte to be logged | |
byte_b | the second byte to be logged | |
byte_c | the third byte to be logged | |
byte_d | the fourth byte to be logged |
Definition at line 145 of file scd_logger.c.
void ResetLogger | ( | log_struct_t * | logger | ) |
Reset the log buffer and position.
Function to reset the log structure
logger | the log structure |
Definition at line 43 of file scd_logger.c.