Skip to content

Fix inconsistent function signature in CDC.cpp #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cores/arduino/HardwareSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
class HardwareSerial : public Stream
{
public:
virtual void begin(unsigned long);
virtual void begin(uint32_t);
virtual void end();
virtual int available(void) = 0;
virtual int peek(void) = 0;
Expand Down
4 changes: 4 additions & 0 deletions cores/arduino/Reset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
extern "C" {
#endif

#if !defined(__clang__) || defined(__mips__)
__attribute__ ((long_call, section (".ramfunc")))
#else
__attribute__ ((section (".ramfunc")))
#endif
void banzai() {
// Disable all interrupts
__disable_irq();
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/USB/CDC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ int32_t Serial_::readBreak() {
return ret;
}

unsigned long Serial_::baud() {
uint32_t Serial_::baud() {
return _usbLineInfo.dwDTERate;
}

Expand Down
13 changes: 11 additions & 2 deletions system/CMSIS/CMSIS/Include/core_cmFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ static __INLINE void __set_FPSCR(uint32_t fpscr)
#elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
/* GNU gcc specific functions */

/* C++17 removes register keyword */
#if __cplusplus >= 201703L
# define DEPRECATED_REGISTER
#else
# define DEPRECATED_REGISTER register
#endif

/** \brief Enable IRQ Interrupts

This function enables IRQ interrupts by clearing the I-bit in the CPSR.
Expand Down Expand Up @@ -402,7 +409,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_xPSR(void)
*/
__attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
{
register uint32_t result;
DEPRECATED_REGISTER uint32_t result;

__ASM volatile ("MRS %0, psp\n" : "=r" (result) );
return(result);
Expand All @@ -429,7 +436,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOf
*/
__attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
{
register uint32_t result;
DEPRECATED_REGISTER uint32_t result;

__ASM volatile ("MRS %0, msp\n" : "=r" (result) );
return(result);
Expand Down Expand Up @@ -591,6 +598,8 @@ __attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fps

#endif /* (__CORTEX_M == 0x04) */

#undef DEPRECATED_REGISTER


#elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
/* TASKING carm specific functions */
Expand Down