2019-04-29 21:39:56 +08:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
* @file LibJPEG/LibJPEG_Decoding/Src/jdatasrc_conf.c
|
|
|
|
* @author MCD Application Team
|
|
|
|
******************************************************************************
|
|
|
|
* @attention
|
|
|
|
*
|
2021-12-14 16:25:05 +08:00
|
|
|
* Copyright (c) 2016 STMicroelectronics.
|
|
|
|
* All rights reserved.
|
2019-04-29 21:39:56 +08:00
|
|
|
*
|
2021-12-14 16:25:05 +08:00
|
|
|
* This software is licensed under terms that can be found in the LICENSE file
|
|
|
|
* in the root directory of this software component.
|
|
|
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
2019-04-29 21:39:56 +08:00
|
|
|
*
|
|
|
|
******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
|
|
#include "jdata_conf.h"
|
|
|
|
|
|
|
|
/* Private typedef -----------------------------------------------------------*/
|
|
|
|
/* Private define ------------------------------------------------------------*/
|
|
|
|
/* Private macro -------------------------------------------------------------*/
|
|
|
|
/* Private variables ---------------------------------------------------------*/
|
|
|
|
/* Private function prototypes -----------------------------------------------*/
|
|
|
|
/* Private functions ---------------------------------------------------------*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The modules that use fread() and fwrite() always invoke them through
|
|
|
|
* these macros. On some systems you may need to twiddle the argument casts.
|
|
|
|
* CAUTION: argument order is different from underlying functions!
|
|
|
|
*/
|
|
|
|
size_t read_file (JFILE *file, uint8_t *buf, uint32_t sizeofbuf)
|
|
|
|
{
|
|
|
|
static size_t BytesReadfile ;
|
|
|
|
f_read (file, buf , sizeofbuf, &BytesReadfile);
|
|
|
|
return BytesReadfile;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t write_file (JFILE *file, uint8_t *buf, uint32_t sizeofbuf)
|
|
|
|
{
|
|
|
|
static size_t BytesWritefile ;
|
|
|
|
f_write (file, buf , sizeofbuf, &BytesWritefile);
|
|
|
|
return BytesWritefile;
|
|
|
|
}
|
|
|
|
|