Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-04-21 01:19:48 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-04-21 01:19:48 +0300
commitd16be9efe85af602b8d34bd4b42b5bb706168a86 (patch)
tree9dd141abe0221a4c0e915623f5bdce067477714e /src/Libraries
parent64e172adf08f72d766d0abc26002ad9ef3ac0137 (diff)
Fixed to fan handling, more noexcept
Fixed fan handling so that blip time doesn't get randomly extended Added missing noexcept specifiers, including to C functions because doing so eliminates exception table entries for client C++ functions
Diffstat (limited to 'src/Libraries')
-rw-r--r--src/Libraries/Fatfs/diskio.h18
-rw-r--r--src/Libraries/Fatfs/ff.h90
-rw-r--r--src/Libraries/sha1/sha1.h10
3 files changed, 56 insertions, 62 deletions
diff --git a/src/Libraries/Fatfs/diskio.h b/src/Libraries/Fatfs/diskio.h
index a1ecc3b6..41e84572 100644
--- a/src/Libraries/Fatfs/diskio.h
+++ b/src/Libraries/Fatfs/diskio.h
@@ -1,15 +1,12 @@
/*-----------------------------------------------------------------------
-/ Low level disk interface modlue include file
+/ Low level disk interface module include file
/-----------------------------------------------------------------------*/
#ifndef _DISKIO
#ifdef __cplusplus
unsigned int DiskioGetAndClearMaxRetryCount() noexcept;
-# define NOEXCEPT noexcept
extern "C" {
-#else
-# define NOEXCEPT
#endif
#define _READONLY 0 /* 1: Remove write functions */
@@ -30,18 +27,17 @@ typedef enum {
RES_PARERR /* 4: Invalid Parameter */
} DRESULT;
-
/*---------------------------------------*/
/* Prototypes for disk control functions */
-int assign_drives (int, int) NOEXCEPT;
-DSTATUS disk_initialize (BYTE) NOEXCEPT;
-DSTATUS disk_status (BYTE) NOEXCEPT;
-DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE) NOEXCEPT;
+int assign_drives (int, int) noexcept;
+DSTATUS disk_initialize (BYTE) noexcept;
+DSTATUS disk_status (BYTE) noexcept;
+DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE) noexcept;
#if _READONLY == 0
-DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE) NOEXCEPT;
+DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE) noexcept;
#endif
-DRESULT disk_ioctl (BYTE, BYTE, void*) NOEXCEPT;
+DRESULT disk_ioctl (BYTE, BYTE, void*) noexcept;
/* Disk Status Bits (DSTATUS) */
diff --git a/src/Libraries/Fatfs/ff.h b/src/Libraries/Fatfs/ff.h
index ccb4d6d0..abd31a40 100644
--- a/src/Libraries/Fatfs/ff.h
+++ b/src/Libraries/Fatfs/ff.h
@@ -283,40 +283,40 @@ typedef enum {
/*--------------------------------------------------------------*/
/* FatFs module application interface */
-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_truncate (FIL* fp); /* Truncate the file */
-FRESULT f_sync (FIL* fp); /* Flush cached data of the writing file */
-FRESULT f_opendir (DIR* dp, const TCHAR* path); /* Open a directory */
-FRESULT f_closedir (DIR* dp); /* Close an open directory */
-FRESULT f_readdir (DIR* dp, FILINFO* fno); /* Read a directory item */
-FRESULT f_findfirst (DIR* dp, FILINFO* fno, const TCHAR* path, const TCHAR* pattern); /* Find first file */
-FRESULT f_findnext (DIR* dp, FILINFO* fno); /* Find next file */
-FRESULT f_mkdir (const TCHAR* path); /* Create a sub directory */
-FRESULT f_unlink (const TCHAR* path); /* Delete an existing file or directory */
-FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new); /* Rename/Move a file or directory */
-FRESULT f_stat (const TCHAR* path, FILINFO* fno); /* Get file status */
-FRESULT f_chmod (const TCHAR* path, BYTE attr, BYTE mask); /* Change attribute of a file/dir */
-FRESULT f_utime (const TCHAR* path, const FILINFO* fno); /* Change timestamp of a file/dir */
-FRESULT f_chdir (const TCHAR* path); /* Change current directory */
-FRESULT f_chdrive (const TCHAR* path); /* Change current drive */
-FRESULT f_getcwd (TCHAR* buff, UINT len); /* Get current directory */
-FRESULT f_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs); /* Get number of free clusters on the drive */
-FRESULT f_getlabel (const TCHAR* path, TCHAR* label, DWORD* vsn); /* Get volume label */
-FRESULT f_setlabel (const TCHAR* label); /* Set volume label */
-FRESULT f_forward (FIL* fp, UINT(*func)(const BYTE*,UINT), UINT btf, UINT* bf); /* Forward data to the stream */
-FRESULT f_expand (FIL* fp, FSIZE_t szf, BYTE opt); /* Allocate a contiguous block to the file */
-FRESULT f_mount (FATFS* fs, const TCHAR* path, BYTE opt); /* Mount/Unmount a logical drive */
-FRESULT f_mkfs (const TCHAR* path, BYTE opt, DWORD au, void* work, UINT len); /* Create a FAT volume */
-FRESULT f_fdisk (BYTE pdrv, const DWORD* szt, void* work); /* Divide a physical drive into some partitions */
-FRESULT f_setcp (WORD cp); /* Set current code page */
-int f_putc (TCHAR c, FIL* fp); /* Put a character to the file */
-int f_puts (const TCHAR* str, FIL* cp); /* Put a string to the file */
-int f_printf (FIL* fp, const TCHAR* str, ...); /* Put a formatted string to the file */
-TCHAR* f_gets (TCHAR* buff, int len, FIL* fp); /* Get a string from the file */
+FRESULT f_open (FIL* fp, const TCHAR* path, BYTE mode) noexcept; /* Open or create a file */
+FRESULT f_close (FIL* fp) noexcept; /* Close an open file object */
+FRESULT f_read (FIL* fp, void* buff, UINT btr, UINT* br) noexcept; /* Read data from the file */
+FRESULT f_write (FIL* fp, const void* buff, UINT btw, UINT* bw) noexcept; /* Write data to the file */
+FRESULT f_lseek (FIL* fp, FSIZE_t ofs) noexcept; /* Move file pointer of the file object */
+FRESULT f_truncate (FIL* fp) noexcept; /* Truncate the file */
+FRESULT f_sync (FIL* fp) noexcept; /* Flush cached data of the writing file */
+FRESULT f_opendir (DIR* dp, const TCHAR* path) noexcept; /* Open a directory */
+FRESULT f_closedir (DIR* dp) noexcept; /* Close an open directory */
+FRESULT f_readdir (DIR* dp, FILINFO* fno) noexcept; /* Read a directory item */
+FRESULT f_findfirst (DIR* dp, FILINFO* fno, const TCHAR* path, const TCHAR* pattern) noexcept; /* Find first file */
+FRESULT f_findnext (DIR* dp, FILINFO* fno) noexcept; /* Find next file */
+FRESULT f_mkdir (const TCHAR* path) noexcept; /* Create a sub directory */
+FRESULT f_unlink (const TCHAR* path) noexcept; /* Delete an existing file or directory */
+FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new) noexcept; /* Rename/Move a file or directory */
+FRESULT f_stat (const TCHAR* path, FILINFO* fno) noexcept; /* Get file status */
+FRESULT f_chmod (const TCHAR* path, BYTE attr, BYTE mask) noexcept; /* Change attribute of a file/dir */
+FRESULT f_utime (const TCHAR* path, const FILINFO* fno) noexcept; /* Change timestamp of a file/dir */
+FRESULT f_chdir (const TCHAR* path) noexcept; /* Change current directory */
+FRESULT f_chdrive (const TCHAR* path) noexcept; /* Change current drive */
+FRESULT f_getcwd (TCHAR* buff, UINT len) noexcept; /* Get current directory */
+FRESULT f_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs) noexcept; /* Get number of free clusters on the drive */
+FRESULT f_getlabel (const TCHAR* path, TCHAR* label, DWORD* vsn) noexcept; /* Get volume label */
+FRESULT f_setlabel (const TCHAR* label) noexcept; /* Set volume label */
+FRESULT f_forward (FIL* fp, UINT(*func)(const BYTE*,UINT) noexcept, UINT btf, UINT* bf) noexcept; /* Forward data to the stream */
+FRESULT f_expand (FIL* fp, FSIZE_t szf, BYTE opt) noexcept; /* Allocate a contiguous block to the file */
+FRESULT f_mount (FATFS* fs, const TCHAR* path, BYTE opt) noexcept; /* Mount/Unmount a logical drive */
+FRESULT f_mkfs (const TCHAR* path, BYTE opt, DWORD au, void* work, UINT len) noexcept; /* Create a FAT volume */
+FRESULT f_fdisk (BYTE pdrv, const DWORD* szt, void* work) noexcept; /* Divide a physical drive into some partitions */
+FRESULT f_setcp (WORD cp) noexcept; /* Set current code page */
+int f_putc (TCHAR c, FIL* fp) noexcept; /* Put a character to the file */
+int f_puts (const TCHAR* str, FIL* cp) noexcept; /* Put a string to the file */
+int f_printf (FIL* fp, const TCHAR* str, ...) noexcept; /* Put a formatted string to the file */
+TCHAR* f_gets (TCHAR* buff, int len, FIL* fp) noexcept; /* Get a string from the file */
#define f_eof(fp) ((int)((fp)->fptr == (fp)->obj.objsize))
#define f_error(fp) ((fp)->err)
@@ -325,7 +325,7 @@ TCHAR* f_gets (TCHAR* buff, int len, FIL* fp); /* Get a string from the fil
#if 1 //dc42
// The objsize field is only valid when the sclust field is nonzero
-static inline FSIZE_t f_size(const FIL *fp)
+static inline FSIZE_t f_size(const FIL *fp) noexcept
{
return (fp->obj.sclust == 0) ? 0 : fp->obj.objsize;
}
@@ -351,26 +351,26 @@ static inline FSIZE_t f_size(const FIL *fp)
/* RTC function */
#if !FF_FS_READONLY && !FF_FS_NORTC
-DWORD get_fattime (void) NOEXCEPT;
+DWORD get_fattime (void) noexcept;
#endif
/* LFN support functions */
#if FF_USE_LFN >= 1 /* Code conversion (defined in unicode.c) */
-WCHAR ff_oem2uni (WCHAR oem, WORD cp); /* OEM code to Unicode conversion */
-WCHAR ff_uni2oem (DWORD uni, WORD cp); /* Unicode to OEM code conversion */
-DWORD ff_wtoupper (DWORD uni); /* Unicode upper-case conversion */
+WCHAR ff_oem2uni (WCHAR oem, WORD cp) noexcept; /* OEM code to Unicode conversion */
+WCHAR ff_uni2oem (DWORD uni, WORD cp) noexcept; /* Unicode to OEM code conversion */
+DWORD ff_wtoupper (DWORD uni) noexcept; /* Unicode upper-case conversion */
#endif
#if FF_USE_LFN == 3 /* Dynamic memory allocation */
-void* ff_memalloc (UINT msize); /* Allocate memory block */
-void ff_memfree (void* mblock); /* Free memory block */
+void* ff_memalloc (UINT msize) noexcept; /* Allocate memory block */
+void ff_memfree (void* mblock) noexcept; /* Free memory block */
#endif
/* Sync functions */
#if FF_FS_REENTRANT
-int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj); /* Create a sync object */
-int ff_req_grant (FF_SYNC_t sobj); /* Lock sync object */
-void ff_rel_grant (FF_SYNC_t sobj); /* Unlock sync object */
-int ff_del_syncobj (FF_SYNC_t sobj); /* Delete a sync object */
+int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj) noexcept; /* Create a sync object */
+int ff_req_grant (FF_SYNC_t sobj) noexcept; /* Lock sync object */
+void ff_rel_grant (FF_SYNC_t sobj) noexcept; /* Unlock sync object */
+int ff_del_syncobj (FF_SYNC_t sobj) noexcept; /* Delete a sync object */
#endif
diff --git a/src/Libraries/sha1/sha1.h b/src/Libraries/sha1/sha1.h
index d22e5dca..6e1c0a25 100644
--- a/src/Libraries/sha1/sha1.h
+++ b/src/Libraries/sha1/sha1.h
@@ -31,7 +31,7 @@ extern "C" {
#include <stdint.h>
#include <stdbool.h>
-/*
+/*
* This structure will hold context information for the hashing
* operation
*/
@@ -52,11 +52,9 @@ typedef struct SHA1Context
/*
* Function Prototypes
*/
-void SHA1Reset(SHA1Context* context);
-bool SHA1Result(SHA1Context* context);
-void SHA1Input( SHA1Context* context,
- const uint8_t* message_array,
- uint32_t length);
+void SHA1Reset(SHA1Context* context) noexcept;
+bool SHA1Result(SHA1Context* context) noexcept;
+void SHA1Input(SHA1Context* context, const uint8_t* message_array, uint32_t length) noexcept;
#ifdef __cplusplus
}