STSW-STLKT01: Projects/SensorTile/Applications/DataLog/Src/datalog_application.c File Reference

STSW-STLKT01

datalog_application.c File Reference

This file provides a set of functions to handle the datalog application. More...

#include "datalog_application.h" #include "main.h"
#include "usbd_cdc_interface.h"
#include "string.h"
#include "SensorTile.h"
#include <math.h>
#include "ff_gen_drv.h"
#include "sd_diskio.h"

Go to the source code of this file.

Functions

void DATALOG_SD_Init (void)
 Start SD-Card demo. More...
 
uint8_t DATALOG_SD_Log_Enable (void)
 Start SD-Card demo. More...
 
uint8_t DATALOG_SD_writeBuf (char *s, uint32_t size)
 
void DATALOG_SD_Log_Disable (void)
 Disable SDCard Log. More...
 
void DATALOG_SD_DeInit (void)
 
void DATALOG_SD_NewLine (void)
 Write New Line to file. More...
 
DrvStatusTypeDef getSensorsData (T_SensorsData *mptr)
 
void floatToInt (float in, int32_t *out_int, int32_t *out_dec, int32_t dec_prec)
 Splits a float into two integer values. More...
 

Variables

FRESULT res
 
uint32_t byteswritten
 
uint32_t bytesread
 
FATFS SDFatFs
 
FIL MyFile
 
char SDPath [4]
 
volatile uint8_t SD_Log_Enabled = 0
 
char newLine [] = "\r\n"
 
void * LSM6DSM_X_0_handle
 
void * LSM6DSM_G_0_handle
 
void * LSM303AGR_M_0_handle
 
void * LSM303AGR_X_0_handle
 
void * LPS22HB_P_0_handle
 
void * LPS22HB_T_0_handle
 
void * HTS221_H_0_handle
 
void * HTS221_T_0_handle
 

Detailed Description

This file provides a set of functions to handle the datalog application.

Author
Central Labs
Version
V2.0.0
Date
27-April-2017
Attention

© COPYRIGHT(c) 2014 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2

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.

Definition in file datalog_application.c.

Function Documentation

◆ DATALOG_SD_Init()

void DATALOG_SD_Init ( void  )

Start SD-Card demo.

Parameters
None
Return values
None

Definition at line 66 of file datalog_application.c.

◆ DATALOG_SD_Log_Disable()

void DATALOG_SD_Log_Disable ( void  )

Disable SDCard Log.

Parameters
None
Return values
None

Definition at line 135 of file datalog_application.c.

◆ DATALOG_SD_Log_Enable()

uint8_t DATALOG_SD_Log_Enable ( void  )

Start SD-Card demo.

Parameters
None
Return values
None

Definition at line 90 of file datalog_application.c.

◆ DATALOG_SD_NewLine()

void DATALOG_SD_NewLine ( void  )

Write New Line to file.

Parameters
None
Return values
None

Definition at line 153 of file datalog_application.c.

◆ floatToInt()

void floatToInt ( float  in,
int32_t *  out_int,
int32_t *  out_dec,
int32_t  dec_prec 
)

Splits a float into two integer values.

Parameters
inthe float value as input
out_intthe pointer to the integer part as output
out_decthe pointer to the decimal part as output
dec_precthe decimal precision to be used
Return values
None

Definition at line 219 of file datalog_application.c.

Generated by   doxygen 1.8.13