mirror of
https://gitlab.com/c3d/db48x.git
synced 2024-09-27 15:20:29 +02:00
license: Change to GPL v3, disconnect from DMCP
The dmcp code is moved to a submodule, with its own BDS 3-clause license. The DB48X code uses DMCP, but is not derived from it. The GPL license will provide better protection against derivatives with proprietary additions that are not contributed back to the community. Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
parent
59c4ef6057
commit
225de7d7f5
11 changed files with 165 additions and 1817 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -4,3 +4,6 @@
|
|||
[submodule "dmcp5"]
|
||||
path = dmcp5
|
||||
url = git@github.com:c3d/DMCP5_SDK.git
|
||||
[submodule "dmcp"]
|
||||
path = dmcp
|
||||
url = git@github.com:c3d/SDKdemo.git
|
||||
|
|
183
LICENSE.txt
183
LICENSE.txt
|
@ -1,30 +1,165 @@
|
|||
BSD 3-Clause License
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (c) 2015-2022, SwissMicros
|
||||
Copyright (c) 2022, Christophe de Dinechin
|
||||
All rights reserved.
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
0. Additional Definitions.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
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.
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
|
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@
|
|||
TARGET = DB48X
|
||||
PLATFORM = dmcp
|
||||
VARIANT = DM42
|
||||
SDK = dmcp
|
||||
SDK = dmcp/dmcp
|
||||
PGM = pgm
|
||||
|
||||
######################################
|
||||
|
|
1
dmcp
Submodule
1
dmcp
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 93bd92cb11a2ddc5c0fca2b41e00f293522f1c52
|
1022
dmcp/dmcp.h
1022
dmcp/dmcp.h
File diff suppressed because it is too large
Load diff
154
dmcp/ff_ifc.h
154
dmcp/ff_ifc.h
|
@ -1,154 +0,0 @@
|
|||
/*
|
||||
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2015-2022, SwissMicros
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
The software and related material is released as “NOMAS” (NOt MAnufacturer Supported).
|
||||
|
||||
1. Info is released to assist customers using, exploring and extending the product
|
||||
2. Do NOT contact the manufacturer with questions, seeking support, etc. regarding
|
||||
NOMAS material as no support is implied or committed-to by the Manufacturer
|
||||
3. The Manufacturer may reply and/or update materials if and when needed solely
|
||||
at their discretion
|
||||
|
||||
*/
|
||||
#ifndef __FF_IFC_H__
|
||||
#define __FF_IFC_H__
|
||||
|
||||
|
||||
|
||||
/* These types MUST be 16-bit or 32-bit */
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT;
|
||||
|
||||
/* This type MUST be 8-bit */
|
||||
typedef unsigned char BYTE;
|
||||
|
||||
/* These types MUST be 16-bit */
|
||||
typedef short SHORT;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned short WCHAR;
|
||||
|
||||
/* These types MUST be 32-bit */
|
||||
typedef long LONG;
|
||||
typedef unsigned long DWORD;
|
||||
|
||||
/* This type MUST be 64-bit (Remove this for ANSI C (C89) compatibility) */
|
||||
typedef unsigned long long QWORD;
|
||||
|
||||
typedef char TCHAR;
|
||||
#define _T(x) x
|
||||
#define _TEXT(x) x
|
||||
|
||||
typedef DWORD FSIZE_t;
|
||||
|
||||
typedef struct __FATFS FATFS;
|
||||
|
||||
|
||||
typedef struct {
|
||||
FATFS* fs;
|
||||
WORD id;
|
||||
BYTE attr;
|
||||
BYTE stat;
|
||||
DWORD sclust;
|
||||
FSIZE_t objsize;
|
||||
UINT lockid;
|
||||
} _FDID;
|
||||
|
||||
typedef struct {
|
||||
_FDID obj;
|
||||
BYTE flag;
|
||||
BYTE err;
|
||||
FSIZE_t fptr;
|
||||
DWORD clust;
|
||||
DWORD sect;
|
||||
DWORD dir_sect;
|
||||
BYTE* dir_ptr;
|
||||
DWORD* cltbl;
|
||||
BYTE buf[512];
|
||||
} FIL;
|
||||
|
||||
|
||||
/* File access mode and open method flags (3rd argument of f_open) */
|
||||
#define FA_READ 0x01
|
||||
#define FA_WRITE 0x02
|
||||
#define FA_OPEN_EXISTING 0x00
|
||||
#define FA_CREATE_NEW 0x04
|
||||
#define FA_CREATE_ALWAYS 0x08
|
||||
#define FA_OPEN_ALWAYS 0x10
|
||||
#define FA_OPEN_APPEND 0x30
|
||||
|
||||
|
||||
|
||||
/* File function return code (FRESULT) */
|
||||
|
||||
typedef enum {
|
||||
FR_OK = 0, /* (0) Succeeded */
|
||||
FR_DISK_ERR, /* (1) A hard error occurred in the low level disk I/O layer */
|
||||
FR_INT_ERR, /* (2) Assertion failed */
|
||||
FR_NOT_READY, /* (3) The physical drive cannot work */
|
||||
FR_NO_FILE, /* (4) Could not find the file */
|
||||
FR_NO_PATH, /* (5) Could not find the path */
|
||||
FR_INVALID_NAME, /* (6) The path name format is invalid */
|
||||
FR_DENIED, /* (7) Access denied due to prohibited access or directory full */
|
||||
FR_EXIST, /* (8) Access denied due to prohibited access */
|
||||
FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */
|
||||
FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */
|
||||
FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */
|
||||
FR_NOT_ENABLED, /* (12) The volume has no work area */
|
||||
FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */
|
||||
FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any problem */
|
||||
FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */
|
||||
FR_LOCKED, /* (16) The operation is rejected according to the file sharing policy */
|
||||
FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */
|
||||
FR_TOO_MANY_OPEN_FILES, /* (18) Number of open files > _FS_LOCK */
|
||||
FR_INVALID_PARAMETER /* (19) Given parameter is invalid */
|
||||
} FRESULT;
|
||||
|
||||
|
||||
|
||||
FRESULT f_open (FIL* fp, const TCHAR* path, BYTE mode); /* Open or create a file */
|
||||
FRESULT f_close (FIL* fp); /* Close an open file object */
|
||||
FRESULT f_read (FIL* fp, void* buff, UINT btr, UINT* br); /* Read data from the file */
|
||||
FRESULT f_write (FIL* fp, const void* buff, UINT btw, UINT* bw); /* Write data to the file */
|
||||
FRESULT f_lseek (FIL* fp, FSIZE_t ofs); /* Move file pointer of the file object */
|
||||
FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new); /* Rename/Move a file or directory */
|
||||
FRESULT f_unlink (const TCHAR* path); /* Delete an existing file or directory */
|
||||
|
||||
#define f_size(fp) ((fp)->obj.objsize)
|
||||
#define f_tell(fp) ((fp)->fptr)
|
||||
#define f_eof(fp) ((int)((fp)->fptr == (fp)->obj.objsize))
|
||||
|
||||
#ifndef EOF
|
||||
#define EOF (-1)
|
||||
#endif
|
||||
|
||||
#endif
|
238
dmcp/lft_ifc.h
238
dmcp/lft_ifc.h
|
@ -1,238 +0,0 @@
|
|||
/*
|
||||
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2015-2022, SwissMicros
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
The software and related material is released as “NOMAS” (NOt MAnufacturer Supported).
|
||||
|
||||
1. Info is released to assist customers using, exploring and extending the product
|
||||
2. Do NOT contact the manufacturer with questions, seeking support, etc. regarding
|
||||
NOMAS material as no support is implied or committed-to by the Manufacturer
|
||||
3. The Manufacturer may reply and/or update materials if and when needed solely
|
||||
at their discretion
|
||||
|
||||
*/
|
||||
|
||||
#define LIBRARY_FN_BASE 0x08000201
|
||||
|
||||
#define __sysfn_malloc (*(typeof(malloc)*)(LIBRARY_FN_BASE+0))
|
||||
#define __sysfn_free (*(typeof(free)*)(LIBRARY_FN_BASE+4))
|
||||
#define __sysfn_calloc (*(typeof(calloc)*)(LIBRARY_FN_BASE+8))
|
||||
#define __sysfn_realloc (*(typeof(realloc)*)(LIBRARY_FN_BASE+12))
|
||||
#define __sysfn__write (*(typeof(_write)*)(LIBRARY_FN_BASE+16))
|
||||
#define LCD_clear (*(typeof(LCD_clear)*)(LIBRARY_FN_BASE+20))
|
||||
#define LCD_power_on (*(typeof(LCD_power_on)*)(LIBRARY_FN_BASE+24))
|
||||
#define LCD_power_off (*(typeof(LCD_power_off)*)(LIBRARY_FN_BASE+28))
|
||||
#define LCD_write_line (*(typeof(LCD_write_line)*)(LIBRARY_FN_BASE+32))
|
||||
#define bitblt24 (*(typeof(bitblt24)*)(LIBRARY_FN_BASE+36))
|
||||
#define lcd_line_addr (*(typeof(lcd_line_addr)*)(LIBRARY_FN_BASE+40))
|
||||
#define lcd_clear_buf (*(typeof(lcd_clear_buf)*)(LIBRARY_FN_BASE+44))
|
||||
#define lcd_refresh (*(typeof(lcd_refresh)*)(LIBRARY_FN_BASE+48))
|
||||
#define lcd_forced_refresh (*(typeof(lcd_forced_refresh)*)(LIBRARY_FN_BASE+52))
|
||||
#define lcd_refresh_lines (*(typeof(lcd_refresh_lines)*)(LIBRARY_FN_BASE+56))
|
||||
#define lcd_fill_rect (*(typeof(lcd_fill_rect)*)(LIBRARY_FN_BASE+60))
|
||||
#define lcd_draw_img (*(typeof(lcd_draw_img)*)(LIBRARY_FN_BASE+64))
|
||||
#define lcd_draw_img_direct (*(typeof(lcd_draw_img_direct)*)(LIBRARY_FN_BASE+68))
|
||||
#define lcd_draw_img_part (*(typeof(lcd_draw_img_part)*)(LIBRARY_FN_BASE+72))
|
||||
#define lcd_fillLine (*(typeof(lcd_fillLine)*)(LIBRARY_FN_BASE+76))
|
||||
#define lcd_fillLines (*(typeof(lcd_fillLines)*)(LIBRARY_FN_BASE+80))
|
||||
#define lcd_set_buf_cleared (*(typeof(lcd_set_buf_cleared)*)(LIBRARY_FN_BASE+84))
|
||||
#define lcd_get_buf_cleared (*(typeof(lcd_get_buf_cleared)*)(LIBRARY_FN_BASE+88))
|
||||
#define lcd_writeNl (*(typeof(lcd_writeNl)*)(LIBRARY_FN_BASE+92))
|
||||
#define lcd_prevLn (*(typeof(lcd_prevLn)*)(LIBRARY_FN_BASE+96))
|
||||
#define lcd_writeClr (*(typeof(lcd_writeClr)*)(LIBRARY_FN_BASE+100))
|
||||
#define lcd_setLine (*(typeof(lcd_setLine)*)(LIBRARY_FN_BASE+104))
|
||||
#define lcd_setXY (*(typeof(lcd_setXY)*)(LIBRARY_FN_BASE+108))
|
||||
#define lcd_lineHeight (*(typeof(lcd_lineHeight)*)(LIBRARY_FN_BASE+112))
|
||||
#define lcd_baseHeight (*(typeof(lcd_baseHeight)*)(LIBRARY_FN_BASE+116))
|
||||
#define lcd_fontWidth (*(typeof(lcd_fontWidth)*)(LIBRARY_FN_BASE+120))
|
||||
#define lcd_writeText (*(typeof(lcd_writeText)*)(LIBRARY_FN_BASE+124))
|
||||
#define lcd_textWidth (*(typeof(lcd_textWidth)*)(LIBRARY_FN_BASE+128))
|
||||
#define lcd_charWidth (*(typeof(lcd_charWidth)*)(LIBRARY_FN_BASE+132))
|
||||
#define lcd_textToWidth (*(typeof(lcd_textToWidth)*)(LIBRARY_FN_BASE+136))
|
||||
#define lcd_writeTextWidth (*(typeof(lcd_writeTextWidth)*)(LIBRARY_FN_BASE+140))
|
||||
#define lcd_textForWidth (*(typeof(lcd_textForWidth)*)(LIBRARY_FN_BASE+144))
|
||||
#define lcd_nextFontNr (*(typeof(lcd_nextFontNr)*)(LIBRARY_FN_BASE+148))
|
||||
#define lcd_prevFontNr (*(typeof(lcd_prevFontNr)*)(LIBRARY_FN_BASE+152))
|
||||
#define lcd_switchFont (*(typeof(lcd_switchFont)*)(LIBRARY_FN_BASE+156))
|
||||
#define lcd_toggleFontT (*(typeof(lcd_toggleFontT)*)(LIBRARY_FN_BASE+160))
|
||||
#define lcd_draw_menu_bg (*(typeof(lcd_draw_menu_bg)*)(LIBRARY_FN_BASE+164))
|
||||
#define lcd_draw_menu_key (*(typeof(lcd_draw_menu_key)*)(LIBRARY_FN_BASE+168))
|
||||
#define lcd_draw_menu_keys (*(typeof(lcd_draw_menu_keys)*)(LIBRARY_FN_BASE+172))
|
||||
#define lcd_print (*(typeof(lcd_print)*)(LIBRARY_FN_BASE+176))
|
||||
#define lcd_for_calc (*(typeof(lcd_for_calc)*)(LIBRARY_FN_BASE+180))
|
||||
#define get_wday_shortcut (*(typeof(get_wday_shortcut)*)(LIBRARY_FN_BASE+184))
|
||||
#define get_month_shortcut (*(typeof(get_month_shortcut)*)(LIBRARY_FN_BASE+188))
|
||||
#define julian_day (*(typeof(julian_day)*)(LIBRARY_FN_BASE+192))
|
||||
#define julian_to_date (*(typeof(julian_to_date)*)(LIBRARY_FN_BASE+196))
|
||||
#define get_hw_id (*(typeof(get_hw_id)*)(LIBRARY_FN_BASE+200))
|
||||
#define rtc_read (*(typeof(rtc_read)*)(LIBRARY_FN_BASE+204))
|
||||
#define rtc_write (*(typeof(rtc_write)*)(LIBRARY_FN_BASE+208))
|
||||
#define rtc_read_century (*(typeof(rtc_read_century)*)(LIBRARY_FN_BASE+212))
|
||||
#define rtc_write_century (*(typeof(rtc_write_century)*)(LIBRARY_FN_BASE+216))
|
||||
#define rtc_read_min (*(typeof(rtc_read_min)*)(LIBRARY_FN_BASE+220))
|
||||
#define rtc_read_sec (*(typeof(rtc_read_sec)*)(LIBRARY_FN_BASE+224))
|
||||
#define rtc_wakeup_delay (*(typeof(rtc_wakeup_delay)*)(LIBRARY_FN_BASE+228))
|
||||
#define read_power_voltage (*(typeof(read_power_voltage)*)(LIBRARY_FN_BASE+232))
|
||||
#define get_lowbat_state (*(typeof(get_lowbat_state)*)(LIBRARY_FN_BASE+236))
|
||||
#define get_vbat (*(typeof(get_vbat)*)(LIBRARY_FN_BASE+240))
|
||||
#define start_buzzer_freq (*(typeof(start_buzzer_freq)*)(LIBRARY_FN_BASE+244))
|
||||
#define stop_buzzer (*(typeof(stop_buzzer)*)(LIBRARY_FN_BASE+248))
|
||||
#define beep_volume_up (*(typeof(beep_volume_up)*)(LIBRARY_FN_BASE+252))
|
||||
#define beep_volume_down (*(typeof(beep_volume_down)*)(LIBRARY_FN_BASE+256))
|
||||
#define get_beep_volume (*(typeof(get_beep_volume)*)(LIBRARY_FN_BASE+260))
|
||||
#define mark_region (*(typeof(mark_region)*)(LIBRARY_FN_BASE+264))
|
||||
#define no_region (*(typeof(no_region)*)(LIBRARY_FN_BASE+268))
|
||||
#define set_reset_magic (*(typeof(set_reset_magic)*)(LIBRARY_FN_BASE+272))
|
||||
#define is_reset_state_file (*(typeof(is_reset_state_file)*)(LIBRARY_FN_BASE+276))
|
||||
#define get_reset_state_file (*(typeof(get_reset_state_file)*)(LIBRARY_FN_BASE+280))
|
||||
#define set_reset_state_file (*(typeof(set_reset_state_file)*)(LIBRARY_FN_BASE+284))
|
||||
#define usb_powered (*(typeof(usb_powered)*)(LIBRARY_FN_BASE+288))
|
||||
#define aux_buf_ptr (*(typeof(aux_buf_ptr)*)(LIBRARY_FN_BASE+292))
|
||||
#define write_buf_ptr (*(typeof(write_buf_ptr)*)(LIBRARY_FN_BASE+296))
|
||||
#define print_byte (*(typeof(print_byte)*)(LIBRARY_FN_BASE+300))
|
||||
#define printer_get_delay (*(typeof(printer_get_delay)*)(LIBRARY_FN_BASE+304))
|
||||
#define printer_set_delay (*(typeof(printer_set_delay)*)(LIBRARY_FN_BASE+308))
|
||||
#define printer_advance_buf (*(typeof(printer_advance_buf)*)(LIBRARY_FN_BASE+312))
|
||||
#define printer_busy_for (*(typeof(printer_busy_for)*)(LIBRARY_FN_BASE+316))
|
||||
#define rtc_check_unset (*(typeof(rtc_check_unset)*)(LIBRARY_FN_BASE+320))
|
||||
#define run_set_time (*(typeof(run_set_time)*)(LIBRARY_FN_BASE+324))
|
||||
#define run_set_date (*(typeof(run_set_date)*)(LIBRARY_FN_BASE+328))
|
||||
#define disp_disk_info (*(typeof(disp_disk_info)*)(LIBRARY_FN_BASE+332))
|
||||
#define file_selection_screen (*(typeof(file_selection_screen)*)(LIBRARY_FN_BASE+336))
|
||||
#define power_check_screen (*(typeof(power_check_screen)*)(LIBRARY_FN_BASE+340))
|
||||
#define handle_menu (*(typeof(handle_menu)*)(LIBRARY_FN_BASE+344))
|
||||
#define rb_str (*(typeof(rb_str)*)(LIBRARY_FN_BASE+348))
|
||||
#define sel_str (*(typeof(sel_str)*)(LIBRARY_FN_BASE+352))
|
||||
#define opt_str (*(typeof(opt_str)*)(LIBRARY_FN_BASE+356))
|
||||
#define date_str (*(typeof(date_str)*)(LIBRARY_FN_BASE+360))
|
||||
#define time_str (*(typeof(time_str)*)(LIBRARY_FN_BASE+364))
|
||||
#define read_file_items (*(typeof(read_file_items)*)(LIBRARY_FN_BASE+368))
|
||||
#define sort_file_items (*(typeof(sort_file_items)*)(LIBRARY_FN_BASE+372))
|
||||
#define create_screenshot (*(typeof(create_screenshot)*)(LIBRARY_FN_BASE+376))
|
||||
#define key_empty (*(typeof(key_empty)*)(LIBRARY_FN_BASE+380))
|
||||
#define key_push (*(typeof(key_push)*)(LIBRARY_FN_BASE+384))
|
||||
#define key_tail (*(typeof(key_tail)*)(LIBRARY_FN_BASE+388))
|
||||
#define key_pop (*(typeof(key_pop)*)(LIBRARY_FN_BASE+392))
|
||||
#define key_pop_last (*(typeof(key_pop_last)*)(LIBRARY_FN_BASE+396))
|
||||
#define key_pop_all (*(typeof(key_pop_all)*)(LIBRARY_FN_BASE+400))
|
||||
#define key_to_nr (*(typeof(key_to_nr)*)(LIBRARY_FN_BASE+404))
|
||||
#define wait_for_key_press (*(typeof(wait_for_key_press)*)(LIBRARY_FN_BASE+408))
|
||||
#define runner_get_key (*(typeof(runner_get_key)*)(LIBRARY_FN_BASE+412))
|
||||
#define runner_get_key_delay (*(typeof(runner_get_key_delay)*)(LIBRARY_FN_BASE+416))
|
||||
#define wait_for_key_release (*(typeof(wait_for_key_release)*)(LIBRARY_FN_BASE+420))
|
||||
#define runner_key_tout_value (*(typeof(runner_key_tout_value)*)(LIBRARY_FN_BASE+424))
|
||||
#define runner_key_tout_init (*(typeof(runner_key_tout_init)*)(LIBRARY_FN_BASE+428))
|
||||
#define toggle_slow_autorepeat (*(typeof(toggle_slow_autorepeat)*)(LIBRARY_FN_BASE+432))
|
||||
#define is_slow_autorepeat (*(typeof(is_slow_autorepeat)*)(LIBRARY_FN_BASE+436))
|
||||
#define reset_auto_off (*(typeof(reset_auto_off)*)(LIBRARY_FN_BASE+440))
|
||||
#define is_auto_off (*(typeof(is_auto_off)*)(LIBRARY_FN_BASE+444))
|
||||
#define is_menu_auto_off (*(typeof(is_menu_auto_off)*)(LIBRARY_FN_BASE+448))
|
||||
#define sys_auto_off_cnt (*(typeof(sys_auto_off_cnt)*)(LIBRARY_FN_BASE+452))
|
||||
#define print_dmy_date (*(typeof(print_dmy_date)*)(LIBRARY_FN_BASE+456))
|
||||
#define print_clk24_time (*(typeof(print_clk24_time)*)(LIBRARY_FN_BASE+460))
|
||||
#define check_create_dir (*(typeof(check_create_dir)*)(LIBRARY_FN_BASE+464))
|
||||
#define set_fat_label (*(typeof(set_fat_label)*)(LIBRARY_FN_BASE+468))
|
||||
#define file_exists (*(typeof(file_exists)*)(LIBRARY_FN_BASE+472))
|
||||
#define sys_disk_ok (*(typeof(sys_disk_ok)*)(LIBRARY_FN_BASE+476))
|
||||
#define sys_disk_write_enable (*(typeof(sys_disk_write_enable)*)(LIBRARY_FN_BASE+480))
|
||||
#define sys_disk_check_valid (*(typeof(sys_disk_check_valid)*)(LIBRARY_FN_BASE+484))
|
||||
#define sys_is_disk_write_enable (*(typeof(sys_is_disk_write_enable)*)(LIBRARY_FN_BASE+488))
|
||||
#define sys_clear_write_buf_used (*(typeof(sys_clear_write_buf_used)*)(LIBRARY_FN_BASE+492))
|
||||
#define sys_write_buf_used (*(typeof(sys_write_buf_used)*)(LIBRARY_FN_BASE+496))
|
||||
#define sys_timer_disable (*(typeof(sys_timer_disable)*)(LIBRARY_FN_BASE+500))
|
||||
#define sys_timer_start (*(typeof(sys_timer_start)*)(LIBRARY_FN_BASE+504))
|
||||
#define sys_timer_active (*(typeof(sys_timer_active)*)(LIBRARY_FN_BASE+508))
|
||||
#define sys_timer_timeout (*(typeof(sys_timer_timeout)*)(LIBRARY_FN_BASE+512))
|
||||
#define sys_delay (*(typeof(sys_delay)*)(LIBRARY_FN_BASE+516))
|
||||
#define sys_tick_count (*(typeof(sys_tick_count)*)(LIBRARY_FN_BASE+520))
|
||||
#define sys_current_ms (*(typeof(sys_current_ms)*)(LIBRARY_FN_BASE+524))
|
||||
#define sys_critical_start (*(typeof(sys_critical_start)*)(LIBRARY_FN_BASE+528))
|
||||
#define sys_critical_end (*(typeof(sys_critical_end)*)(LIBRARY_FN_BASE+532))
|
||||
#define sys_sleep (*(typeof(sys_sleep)*)(LIBRARY_FN_BASE+536))
|
||||
#define sys_free_mem (*(typeof(sys_free_mem)*)(LIBRARY_FN_BASE+540))
|
||||
#define sys_reset (*(typeof(sys_reset)*)(LIBRARY_FN_BASE+544))
|
||||
#define sys_last_key (*(typeof(sys_last_key)*)(LIBRARY_FN_BASE+548))
|
||||
#define run_help (*(typeof(run_help)*)(LIBRARY_FN_BASE+552))
|
||||
#define draw_power_off_image (*(typeof(draw_power_off_image)*)(LIBRARY_FN_BASE+556))
|
||||
#define reset_off_image_cycle (*(typeof(reset_off_image_cycle)*)(LIBRARY_FN_BASE+560))
|
||||
#define f_open (*(typeof(f_open)*)(LIBRARY_FN_BASE+564))
|
||||
#define f_close (*(typeof(f_close)*)(LIBRARY_FN_BASE+568))
|
||||
#define f_read (*(typeof(f_read)*)(LIBRARY_FN_BASE+572))
|
||||
#define f_write (*(typeof(f_write)*)(LIBRARY_FN_BASE+576))
|
||||
#define f_lseek (*(typeof(f_lseek)*)(LIBRARY_FN_BASE+580))
|
||||
#define run_help_file (*(typeof(run_help_file)*)(LIBRARY_FN_BASE+584))
|
||||
#define set_buzzer (*(typeof(set_buzzer)*)(LIBRARY_FN_BASE+588))
|
||||
#define __sysfn_read_key (*(typeof(read_key)*)(LIBRARY_FN_BASE+592))
|
||||
#define get_tim1_timer (*(typeof(get_tim1_timer)*)(LIBRARY_FN_BASE+596))
|
||||
#define update_bmp_file_header (*(typeof(update_bmp_file_header)*)(LIBRARY_FN_BASE+600))
|
||||
#define make_date_filename (*(typeof(make_date_filename)*)(LIBRARY_FN_BASE+604))
|
||||
#define reverse_byte (*(typeof(reverse_byte)*)(LIBRARY_FN_BASE+608))
|
||||
#define f_rename (*(typeof(f_rename)*)(LIBRARY_FN_BASE+612))
|
||||
#define file_size (*(typeof(file_size)*)(LIBRARY_FN_BASE+616))
|
||||
#define start_timer2 (*(typeof(start_timer2)*)(LIBRARY_FN_BASE+620))
|
||||
#define start_timer3 (*(typeof(start_timer3)*)(LIBRARY_FN_BASE+624))
|
||||
#define stop_timer2 (*(typeof(stop_timer2)*)(LIBRARY_FN_BASE+628))
|
||||
#define stop_timer3 (*(typeof(stop_timer3)*)(LIBRARY_FN_BASE+632))
|
||||
#define __sysfn_suspended_bg_key_read (*(typeof(suspended_bg_key_read)*)(LIBRARY_FN_BASE+636))
|
||||
#define __sysfn_resume_bg_key_read (*(typeof(resume_bg_key_read)*)(LIBRARY_FN_BASE+640))
|
||||
#define lcd_refresh_dma (*(typeof(lcd_refresh_dma)*)(LIBRARY_FN_BASE+644))
|
||||
#define lcd_refresh_wait (*(typeof(lcd_refresh_wait)*)(LIBRARY_FN_BASE+648))
|
||||
#define lcd_textToBox (*(typeof(lcd_textToBox)*)(LIBRARY_FN_BASE+652))
|
||||
#define item_sel_init (*(typeof(item_sel_init)*)(LIBRARY_FN_BASE+656))
|
||||
#define item_sel_reinit (*(typeof(item_sel_reinit)*)(LIBRARY_FN_BASE+660))
|
||||
#define item_sel_header (*(typeof(item_sel_header)*)(LIBRARY_FN_BASE+664))
|
||||
#define item_sel_engine (*(typeof(item_sel_engine)*)(LIBRARY_FN_BASE+668))
|
||||
#define sys_flashing_init (*(typeof(sys_flashing_init)*)(LIBRARY_FN_BASE+672))
|
||||
#define sys_flashing_finish (*(typeof(sys_flashing_finish)*)(LIBRARY_FN_BASE+676))
|
||||
#define sys_flash_erase_block (*(typeof(sys_flash_erase_block)*)(LIBRARY_FN_BASE+680))
|
||||
#define sys_flash_write_block (*(typeof(sys_flash_write_block)*)(LIBRARY_FN_BASE+684))
|
||||
#define msg_box (*(typeof(msg_box)*)(LIBRARY_FN_BASE+688))
|
||||
#define write_buf_size (*(typeof(write_buf_size)*)(LIBRARY_FN_BASE+692))
|
||||
#define get_rtc_ticks (*(typeof(get_rtc_ticks)*)(LIBRARY_FN_BASE+696))
|
||||
#define rtc_update_ticks (*(typeof(rtc_update_ticks)*)(LIBRARY_FN_BASE+700))
|
||||
#define rtc_set_alarm (*(typeof(rtc_set_alarm)*)(LIBRARY_FN_BASE+704))
|
||||
#define rtc_cancel_alarm (*(typeof(rtc_cancel_alarm)*)(LIBRARY_FN_BASE+708))
|
||||
#define rtc_update_time_sec (*(typeof(rtc_update_time_sec)*)(LIBRARY_FN_BASE+712))
|
||||
#define run_help_file_style (*(typeof(run_help_file_style)*)(LIBRARY_FN_BASE+716))
|
||||
#define print_buffer (*(typeof(print_buffer)*)(LIBRARY_FN_BASE+720))
|
||||
#define print_is_ready (*(typeof(print_is_ready)*)(LIBRARY_FN_BASE+724))
|
||||
#define run_menu_item_sys (*(typeof(run_menu_item_sys)*)(LIBRARY_FN_BASE+728))
|
||||
#define lcd_fill_ptrn (*(typeof(lcd_fill_ptrn)*)(LIBRARY_FN_BASE+732))
|
||||
#define usb_acm_on (*(typeof(usb_acm_on)*)(LIBRARY_FN_BASE+736))
|
||||
#define usb_turn_off (*(typeof(usb_turn_off)*)(LIBRARY_FN_BASE+740))
|
||||
#define usb_is_on (*(typeof(usb_is_on)*)(LIBRARY_FN_BASE+744))
|
||||
#define acm_puts (*(typeof(acm_puts)*)(LIBRARY_FN_BASE+748))
|
||||
#define switch_usb_powered_freq (*(typeof(switch_usb_powered_freq)*)(LIBRARY_FN_BASE+752))
|
||||
#define qspi_user_write (*(typeof(qspi_user_write)*)(LIBRARY_FN_BASE+756))
|
||||
#define qspi_user_addr (*(typeof(qspi_user_addr)*)(LIBRARY_FN_BASE+760))
|
||||
#define qspi_user_size (*(typeof(qspi_user_size)*)(LIBRARY_FN_BASE+764))
|
||||
#define f_unlink (*(typeof(f_unlink)*)(LIBRARY_FN_BASE+768))
|
|
@ -1,75 +0,0 @@
|
|||
/**
|
||||
*/
|
||||
|
||||
.syntax unified
|
||||
.cpu cortex-m4
|
||||
.fpu softvfp
|
||||
.thumb
|
||||
|
||||
|
||||
/* == Following section addresses are defined in ld script == */
|
||||
|
||||
/* = initialized data should be copied from flash to RAM before pgm start = */
|
||||
/* .data section start addr in flash */
|
||||
.word _sidata
|
||||
/* .data section start addr in RAM */
|
||||
.word _sdata
|
||||
/* .data section end addr in RAM */
|
||||
.word _edata
|
||||
|
||||
/* = .bss section should be zeroed before pgm start = */
|
||||
/* .bss section start addr in RAM */
|
||||
.word _sbss
|
||||
/* .bss section end addr */
|
||||
.word _ebss
|
||||
|
||||
/** **/
|
||||
|
||||
|
||||
/**
|
||||
Program entry point
|
||||
*/
|
||||
|
||||
.section .text.Program_Entry
|
||||
.weak Program_Entry
|
||||
.type Program_Entry, %function
|
||||
Program_Entry:
|
||||
|
||||
/* Copy the data segment initializers from flash to SRAM */
|
||||
ldr r0, =_sidata
|
||||
ldr r1, =_sdata
|
||||
ldr r2, =_edata
|
||||
b CopyDataInit0
|
||||
|
||||
CopyDataInit:
|
||||
ldr r3, [r0], #4
|
||||
str r3, [r1], #4
|
||||
CopyDataInit0:
|
||||
cmp r1, r2
|
||||
bcc CopyDataInit
|
||||
|
||||
/* Zero fill the bss segment. */
|
||||
movs r0, #0
|
||||
ldr r1, =_sbss
|
||||
ldr r2, = _ebss
|
||||
b FillZerobss0
|
||||
|
||||
FillZerobss:
|
||||
str r0, [r1], #4
|
||||
FillZerobss0:
|
||||
cmp r1, r2
|
||||
bcc FillZerobss
|
||||
|
||||
|
||||
/* Call static constructors */
|
||||
bl __libc_init_array
|
||||
/* Call the application entry point.*/
|
||||
bl program_main
|
||||
bl post_main
|
||||
|
||||
/* Just for sure as post_main shouldn't return. */
|
||||
LoopForever:
|
||||
b LoopForever
|
||||
|
||||
.size Program_Entry, .-Program_Entry
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
/*
|
||||
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2015-2022, SwissMicros
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
The software and related material is released as “NOMAS” (NOt MAnufacturer
|
||||
Supported).
|
||||
|
||||
1. Info is released to assist customers using, exploring and extending the
|
||||
product
|
||||
2. Do NOT contact the manufacturer with questions, seeking support, etc.
|
||||
regarding NOMAS material as no support is implied or committed-to by the
|
||||
Manufacturer
|
||||
3. The Manufacturer may reply and/or update materials if and when needed
|
||||
solely at their discretion
|
||||
|
||||
*/
|
||||
|
||||
#include <dmcp.h>
|
||||
#include <errno.h>
|
||||
#include <main.h>
|
||||
#include <qspi_crc.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/times.h>
|
||||
#include <time.h>
|
||||
|
||||
void Program_Entry();
|
||||
|
||||
#ifndef PROGRAM_KEYMAP_ID
|
||||
# define PROGRAM_KEYMAP_ID 0xffffffff
|
||||
#endif
|
||||
|
||||
const prog_info_t prog_info = {
|
||||
PROG_INFO_MAGIC, // uint32_t pgm_magic;
|
||||
0, // uint32_t pgm_size;
|
||||
(void *) Program_Entry, // void * pgm_entry;
|
||||
PLATFORM_IFC_CNR, // uint32_t ifc_cnr;
|
||||
PLATFORM_IFC_VER, // uint32_t ifc_ver;
|
||||
QSPI_DATA_SIZE, // uint32_t qspi_size;
|
||||
QSPI_DATA_CRC, // uint32_t qspi_crc;
|
||||
PROGRAM_NAME, // char pgm_name[16];
|
||||
PROGRAM_VERSION, // char pgm_version[16];
|
||||
PROGRAM_KEYMAP_ID // uint32_t required_keymap_id;
|
||||
};
|
||||
|
||||
|
||||
int _read(int file, char *ptr, int len)
|
||||
{
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
int _write(int file, char *ptr, int len)
|
||||
{
|
||||
// Routed to OS, where it is printed to ITM
|
||||
#ifdef USER_WRITE
|
||||
return USER_WRITE(file, ptr, len);
|
||||
#else
|
||||
return __sysfn__write(file, ptr, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int _close(int file)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int _fstat(int file, struct stat *st)
|
||||
{
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _isatty(int file)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int _lseek(int file, int ptr, int dir)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _kill(int pid, int sig)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _getpid(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void free(void *ptr)
|
||||
{
|
||||
__sysfn_free(ptr);
|
||||
}
|
||||
|
||||
|
||||
void *malloc(size_t size)
|
||||
{
|
||||
return __sysfn_malloc(size);
|
||||
}
|
||||
|
||||
|
||||
void *calloc(size_t count, size_t nbytes)
|
||||
{
|
||||
return __sysfn_calloc(count, nbytes);
|
||||
}
|
||||
|
||||
void *realloc(void *ptr, size_t size)
|
||||
{
|
||||
return __sysfn_realloc(ptr, size);
|
||||
}
|
||||
|
||||
|
||||
void *__wrap__malloc_r(struct _reent *pr, size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void *_calloc_r(struct _reent *pr, size_t nmemb, size_t size)
|
||||
{
|
||||
return calloc(nmemb, size);
|
||||
}
|
||||
|
||||
void *_realloc_r(struct _reent *pr, void *ptr, size_t size)
|
||||
{
|
||||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
void _free_r(struct _reent *pr, void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
||||
void post_main()
|
||||
{
|
||||
// Just start DMCP
|
||||
set_reset_magic(RUN_DMCP_MAGIC);
|
||||
sys_reset();
|
||||
}
|
||||
|
||||
void __attribute__((__noreturn__)) _exit(int status)
|
||||
{
|
||||
set_reset_magic(RUN_DMCP_MAGIC);
|
||||
sys_reset();
|
||||
while(1);
|
||||
}
|
116
dmcp/sys/sdb.h
116
dmcp/sys/sdb.h
|
@ -1,116 +0,0 @@
|
|||
/*
|
||||
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2015-2019, SwissMicros
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
The software and related material is released as “NOMAS” (NOt MAnufacturer Supported).
|
||||
|
||||
1. Info is released to assist customers using, exploring and extending the product
|
||||
2. Do NOT contact the manufacturer with questions, seeking support, etc. regarding
|
||||
NOMAS material as no support is implied or committed-to by the Manufacturer
|
||||
3. The Manufacturer may reply and/or update materials if and when needed solely
|
||||
at their discretion
|
||||
|
||||
*/
|
||||
#ifndef __SYS_SDB_H__
|
||||
#define __SYS_SDB_H__
|
||||
|
||||
// === IFC START ===
|
||||
// System data block
|
||||
|
||||
typedef int get_flag_fn_t();
|
||||
typedef void set_flag_fn_t(int val);
|
||||
|
||||
typedef int run_menu_item_fn_t(uint8_t line_id);
|
||||
typedef const char * menu_line_str_fn_t(uint8_t line_id, char * s, const int slen);
|
||||
|
||||
typedef void void_fn_t();
|
||||
|
||||
|
||||
typedef struct {
|
||||
volatile uint32_t calc_state;
|
||||
FIL * ppgm_fp;
|
||||
const char * key_to_alpha_table;
|
||||
|
||||
run_menu_item_fn_t * run_menu_item_app;
|
||||
menu_line_str_fn_t * menu_line_str_app;
|
||||
|
||||
void_fn_t * after_fat_format;
|
||||
|
||||
get_flag_fn_t * is_flag_dmy;
|
||||
set_flag_fn_t * set_flag_dmy;
|
||||
get_flag_fn_t * is_flag_clk24;
|
||||
set_flag_fn_t * set_flag_clk24;
|
||||
get_flag_fn_t * is_beep_mute;
|
||||
set_flag_fn_t * set_beep_mute;
|
||||
|
||||
disp_stat_t * pds_t20;
|
||||
disp_stat_t * pds_t24;
|
||||
disp_stat_t * pds_fReg;
|
||||
|
||||
} sys_sdb_t;
|
||||
|
||||
|
||||
#define calc_state (sdb.calc_state)
|
||||
#define ppgm_fp (sdb.ppgm_fp)
|
||||
|
||||
#define key_to_alpha_table (sdb.key_to_alpha_table)
|
||||
|
||||
#define run_menu_item_app (sdb.run_menu_item_app)
|
||||
#define menu_line_str_app (sdb.menu_line_str_app)
|
||||
|
||||
#define after_fat_format (sdb.after_fat_format)
|
||||
|
||||
#define is_flag_dmy (sdb.is_flag_dmy)
|
||||
#define set_flag_dmy (sdb.set_flag_dmy)
|
||||
#define is_flag_clk24 (sdb.is_flag_clk24)
|
||||
#define set_flag_clk24 (sdb.set_flag_clk24)
|
||||
#define is_beep_mute (sdb.is_beep_mute)
|
||||
#define set_beep_mute (sdb.set_beep_mute)
|
||||
|
||||
// === IFC END ===
|
||||
|
||||
|
||||
extern sys_sdb_t sdb;
|
||||
|
||||
#if 0
|
||||
// === IFC START ===
|
||||
|
||||
#define t20 (sdb.pds_t20)
|
||||
#define t24 (sdb.pds_t24)
|
||||
#define fReg (sdb.pds_fReg)
|
||||
|
||||
#define sdb (*((sys_sdb_t*)0x10002000))
|
||||
|
||||
// === IFC END ===
|
||||
#endif
|
||||
|
||||
#endif
|
2
dmcp5
2
dmcp5
|
@ -1 +1 @@
|
|||
Subproject commit 2e1baad3b61dfcb05e9df506eb120f0d377affa0
|
||||
Subproject commit 91cb47248cf9008b8f71fa8286eb02d86ad577f7
|
Loading…
Reference in a new issue