Add Server and UDP and fix WiFi.hostByName

This commit is contained in:
me-no-dev
2016-12-30 02:44:45 +02:00
parent f6d4843680
commit e383a11291
45 changed files with 682 additions and 166 deletions

View File

@ -26,6 +26,16 @@
#define WSR(reg, newval) asm volatile ("wsr %0, " #reg : : "r" (newval));
#define XSR(reg, swapval) asm volatile ("xsr %0, " #reg : "+r" (swapval));
/** @brief Read current stack pointer address
*
*/
static inline void *get_sp()
{
void *sp;
asm volatile ("mov %0, sp;" : "=r" (sp));
return sp;
}
/* Return true if the CPU is in an interrupt context
(PS.UM == 0)
*/