Skip to content
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

drop PICO_IDLE() #21

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions docs/user_manual/chap_api_tftp.tex
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ \subsubsection*{Errors}
\subsection*{Example}
\begin{verbatim}
for(;left; left -= countdown) {
usleep(2000); //PICO_IDLE();
usleep(2000);
pico_stack_tick();
if (countdown)
continue;
Expand Down Expand Up @@ -876,7 +876,7 @@ \subsubsection*{Errors}
\subsection*{Example}
\begin{verbatim}
for(;left; left -= countdown) {
usleep(2000); //PICO_IDLE();
usleep(2000);
pico_stack_tick();
if (countdown)
continue;
Expand Down
7 changes: 0 additions & 7 deletions include/arch/pico_arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@ static inline unsigned long PICO_TIME_MS(void)
{
return __str9_tick;
}

static inline void PICO_IDLE(void)
{
unsigned long tick_now = __str9_tick;
while(tick_now == __str9_tick) ;
}

7 changes: 0 additions & 7 deletions include/arch/pico_atsamd21j18.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,3 @@ static inline unsigned long PICO_TIME_MS(void)
{
return sam_tick;
}

static inline void PICO_IDLE(void)
{
unsigned long tick_now = sam_tick;
while(tick_now == sam_tick) ;
}

7 changes: 0 additions & 7 deletions include/arch/pico_avr.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,3 @@ static inline unsigned long PICO_TIME_MS(void)
{
return __avr_tick;
}

static inline void PICO_IDLE(void)
{
unsigned long tick_now = __avr_tick;
while(tick_now == __avr_tick) ;
}

6 changes: 0 additions & 6 deletions include/arch/pico_dos.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,4 @@ static inline unsigned long PICO_TIME(void)
return (PICO_TIME_MS() / 1000);
}

static inline void PICO_IDLE(void)
{
union REGS regs;
int86(0x28, &regs, &regs); /* DOS 2+ IDLE INTERRUPT */
}

#endif /* PICO_SUPPORT_DOS_WATCOM */
7 changes: 0 additions & 7 deletions include/arch/pico_esp8266.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,4 @@ static inline pico_time PICO_TIME(void)
return PICO_TIME_MS() / 1000;
}

static inline void PICO_IDLE(void)
{
uint32_t now = esp_tick;
while (now == esp_tick)
;
}

#endif
12 changes: 0 additions & 12 deletions include/arch/pico_generic_gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ static inline pico_time PICO_TIME()
#endif
}

static inline void PICO_IDLE(void)
{
pico_time now = PICO_TIME_MS();
while(now == PICO_TIME_MS()) ;
}

#else /* NO RTOS SUPPORT */

#ifdef MEM_MEAS
Expand Down Expand Up @@ -105,12 +99,6 @@ static inline pico_time PICO_TIME(void)
return (pico_time)(PICO_TIME_MS() / 1000);
}

static inline void PICO_IDLE(void)
{
unsigned int now = pico_ms_tick;
while(now == pico_ms_tick) ;
}

#endif /* IFNDEF RTOS */

#endif /* PICO_GCC */
Expand Down
8 changes: 0 additions & 8 deletions include/arch/pico_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,4 @@ static inline unsigned long PICO_TIME_MS(void)
return (unsigned long)jiffies_to_msecs(jiffies);
}

static inline void PICO_IDLE(void)
{
unsigned long now = jiffies;
while (now == jiffies) {
;
}
}

#endif
4 changes: 0 additions & 4 deletions include/arch/pico_mbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ static inline pico_time PICO_TIME_MS(void)
#endif
}

static inline void PICO_IDLE(void)
{
/* TODO needs implementation */
}
/*
static inline void PICO_DEBUG(const char * formatter, ... )
{
Expand Down
1 change: 0 additions & 1 deletion include/arch/pico_msp430.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ extern void free(void *);

#define PICO_TIME() msp430_time_s()
#define PICO_TIME_MS() msp430_time_ms()
#define PICO_IDLE() do {} while(0)

#define pico_free(x) free(x)

Expand Down
1 change: 0 additions & 1 deletion include/arch/pico_none.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#define pico_free(x) do {} while(0)
#define PICO_TIME() 666
#define PICO_TIME_MS() 666000
#define PICO_IDLE() do {} while(0)

#endif /* PICO_SUPPORT_ARCHNONE */

13 changes: 0 additions & 13 deletions include/arch/pico_pic24.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,4 @@ static inline unsigned long PICO_TIME_MS(void)
return tick;
}

static inline void PICO_IDLE(void)
{
unsigned long tick_now;
/* Disable timer interrupts */
TIMBASE_INT_E = 0;
tick_now = (unsigned long)pico_tick;
/* Enable timer interrupts */
TIMBASE_INT_E = 1;
/* Doesn't matter that this call isn't interrupt safe, */
/* we just check for the value to change */
while(tick_now == __pic24_tick) ;
}

#endif
6 changes: 0 additions & 6 deletions include/arch/pico_pic32.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,5 @@ static inline pico_time PICO_TIME(void)
return (pico_time)(PICO_TIME_MS() / 1000);
}

static inline void PICO_IDLE(void)
{
unsigned int now = pico_ms_tick;
while(now == pico_ms_tick) ;
}

#endif /* PICO_PIC32 */

5 changes: 0 additions & 5 deletions include/arch/pico_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,5 @@ extern int pico_sem_wait(void *sem, int timeout);
extern void *pico_thread_create(void *(*routine)(void *), void *arg);
#endif /* PICO_SUPPORT_THREADING */

static inline void PICO_IDLE(void)
{
usleep(5000);
}

#endif /* PICO_SUPPORT_POSIX */

5 changes: 0 additions & 5 deletions test/pico_faulty.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ static inline uint32_t PICO_TIME_MS(void)
#endif
}

static inline void PICO_IDLE(void)
{
usleep(5000);
}

void memory_stats(void);

#endif /* PICO_SUPPORT_POSIX */
Expand Down
4 changes: 2 additions & 2 deletions test/test_tftp_app_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void start_rx(struct pico_tftp_session *session, int *synchro, const char *filen
}

for(; left; left -= countdown) {
usleep(2000); /* PICO_IDLE(); */
usleep(2000);
pico_stack_tick();
if (countdown)
continue;
Expand Down Expand Up @@ -132,7 +132,7 @@ void start_tx(struct pico_tftp_session *session, int *synchro, const char *filen
}

for(; left; left -= countdown) {
usleep(2000); /* PICO_IDLE(); */
usleep(2000);
pico_stack_tick();
if (countdown)
continue;
Expand Down