tflite micro integrate repo
This commit is contained in:
84
components/tflite_micro/KEIL/regarget.c
Normal file
84
components/tflite_micro/KEIL/regarget.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/******************************************************************************/
|
||||
/* RETARGET.C: 'Retarget' layer for target-dependent low level functions */
|
||||
/******************************************************************************/
|
||||
/* This file is part of the uVision/ARM development tools. */
|
||||
/* Copyright (c) 2005 Keil Software. All rights reserved. */
|
||||
/* This software may only be used under the terms of a valid, current, */
|
||||
/* end user licence from KEIL for a compatible version of KEIL software */
|
||||
/* development tools. Nothing else gives you the right to use this software. */
|
||||
/******************************************************************************/
|
||||
|
||||
typedef int FILEHANDLE;
|
||||
__asm(".global __use_no_semihosting_swi");
|
||||
|
||||
|
||||
#ifdef NUCLEO_STM32L496ZG
|
||||
|
||||
#include "mcu_init.h"
|
||||
|
||||
#else
|
||||
int fputc(int ch, FILE *f) {
|
||||
/* Place your implementation of fputc here */
|
||||
/* e.g. readwrite a character to the LPUSART1 and Loop until the end of transmission */
|
||||
}
|
||||
|
||||
int fgetc(FILE *f)
|
||||
{
|
||||
/* Place your implementation of fgetc here */
|
||||
/* e.g. readwrite a character to the LPUSART1 and Loop until the end of transmission */
|
||||
}
|
||||
#endif
|
||||
|
||||
void _ttywrch(int ch)
|
||||
{
|
||||
ch = ch;
|
||||
}
|
||||
|
||||
int ferror(FILE *f)
|
||||
{
|
||||
(void)f;
|
||||
return EOF;
|
||||
}
|
||||
|
||||
void _sys_exit(int return_code)
|
||||
{
|
||||
(void)return_code;
|
||||
while (1) {
|
||||
};
|
||||
}
|
||||
|
||||
FILEHANDLE _sys_open(const char *name, int openmode)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int _sys_close(FILEHANDLE fh)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
|
||||
{
|
||||
//your_device_write(buf, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _sys_istty(FILEHANDLE fh)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _sys_seek(FILEHANDLE fh, long pos)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
long _sys_flen(FILEHANDLE fh)
|
||||
{
|
||||
return -1;
|
||||
}
|
@@ -34,6 +34,7 @@ limitations under the License.
|
||||
// it just returns a static image. For real applications, you should
|
||||
// ensure there's a specialized implementation that accesses hardware APIs.
|
||||
TfLiteStatus GetImage(tflite::ErrorReporter* error_reporter, int image_width,
|
||||
int image_height, int channels, int8_t* image_data);
|
||||
int image_height, int channels, int8_t* image_data,
|
||||
uint8_t * hardware_input);
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_PERSON_DETECTION_EXPERIMENTAL_IMAGE_PROVIDER_H_
|
@@ -15,13 +15,16 @@ limitations under the License.
|
||||
|
||||
#ifndef TENSORFLOW_LITE_MICRO_EXAMPLES_PERSON_DETECTION_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|
||||
#define TENSORFLOW_LITE_MICRO_EXAMPLES_PERSON_DETECTION_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|
||||
|
||||
#include "tensorflow/lite/c/common.h"
|
||||
|
||||
// Initializes all data needed for the example. The name is important, and needs
|
||||
// to be setup() for Arduino compatibility.
|
||||
extern "C" void setup();
|
||||
extern "C" void person_detect_init();
|
||||
|
||||
// Runs one iteration of data gathering and inference. This should be called
|
||||
// repeatedly from the application code. The name needs to be loop() for Arduino
|
||||
// compatibility.
|
||||
extern "C" int loop();
|
||||
extern "C" int person_detect(uint8_t * hardware_input);
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_PERSON_DETECTION_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user