Merge branch 'master' of github.com:r0ket/r0ket

This commit is contained in:
Stefan `Sec` Zehl 2012-01-25 20:51:47 +01:00
commit ad9affa382
6 changed files with 9 additions and 24 deletions

View File

@ -1,5 +1,6 @@
#ifndef _ECC_H_ #ifndef _ECC_H_
#define _ECC_H_H #define _ECC_H_H
#include <sysdefs.h>
#include <stdint.h> #include <stdint.h>
/******************************************************************************/ /******************************************************************************/

View File

@ -39,20 +39,12 @@
#ifndef _SYSDEFS_H_ #ifndef _SYSDEFS_H_
#define _SYSDEFS_H_ #define _SYSDEFS_H_
#include "../sysdefs.h"
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
// Stay compatible with ugly "windows" style
#define BOOL bool
#define TRUE true
#define FALSE false
typedef volatile uint8_t REG8;
typedef volatile uint16_t REG16;
typedef volatile uint32_t REG32;
typedef unsigned char byte_t;
#define pREG8 (REG8 *) #define pREG8 (REG8 *)
#define pREG16 (REG16 *) #define pREG16 (REG16 *)
#define pREG32 (REG32 *) #define pREG32 (REG32 *)

View File

@ -46,7 +46,7 @@ int mesh_sanity(uint8_t * pkt){
if(MO_TYPE(pkt)=='T' && MO_TIME(pkt)<86400) if(MO_TYPE(pkt)=='T' && MO_TIME(pkt)<86400)
return MP_OK; return MP_OK;
if(MO_TYPE(pkt)>='A' && MO_TYPE(pkt)<='Z'){ if(MO_TYPE(pkt)>='A' && MO_TYPE(pkt)<='Z'){
if(MO_TIME(pkt)>1326409200) if(MO_TIME(pkt)>1336159200)
return MP_SEND; return MP_SEND;
if(MO_TIME(pkt)<1324602000) if(MO_TIME(pkt)<1324602000)
return MP_SEND; return MP_SEND;

View File

@ -95,6 +95,7 @@ void m_time(void){
lcdPrint(":"); lcdPrint(":");
lcdPrint(IntToStr(tm->tm_sec,2,F_LONG|F_ZEROS)); lcdPrint(IntToStr(tm->tm_sec,2,F_LONG|F_ZEROS));
lcdNl(); lcdNl();
lcdPrint(" ");
lcdPrint(IntToStr(tm->tm_mday,2,F_LONG)); lcdPrint(IntToStr(tm->tm_mday,2,F_LONG));
lcdPrint("."); lcdPrint(".");
lcdPrint(IntToStr(tm->tm_mon+1,2,0)); lcdPrint(IntToStr(tm->tm_mon+1,2,0));

View File

@ -77,5 +77,5 @@ int main(void) {
} }
int getrelease(void){ int getrelease(void){
return 0x00000108; return 0x00000109;
}; };

View File

@ -36,10 +36,10 @@
*/ */
/**************************************************************************/ /**************************************************************************/
#ifndef _SYSDEFS_H_ #ifndef _GLOBAL_SYSDEFS_H_
#define _SYSDEFS_H_ #define _GLOBAL_SYSDEFS_H_
#include <stdio.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -53,18 +53,9 @@ typedef volatile uint16_t REG16;
typedef volatile uint32_t REG32; typedef volatile uint32_t REG32;
typedef unsigned char byte_t; typedef unsigned char byte_t;
#define pREG8 (REG8 *)
#define pREG16 (REG16 *)
#define pREG32 (REG32 *)
#ifndef NULL
#define NULL ((void *) 0)
#endif
// Save some space // Save some space
#ifndef SIMULATOR #ifndef SIMULATOR
#define memcpy memmove #define memcpy memmove
#endif #endif
#endif #endif