pic32 minor cleanups
This commit is contained in:
parent
5af6540980
commit
c33d51e762
9 changed files with 125 additions and 66 deletions
|
@ -14,8 +14,36 @@ CONTIKI_TARGET_DIRS = . dev dev/mrf24j40 apps net
|
|||
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
|
||||
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER__
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_1__
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_23__
|
||||
|
||||
ifndef PIC32_TIMER_CLOCK
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_1__ -D PIC32_TIMER_CLOCK=1
|
||||
endif
|
||||
ifeq ($(PIC32_TIMER_CLOCK),1)
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_1__ -D PIC32_TIMER_CLOCK=1
|
||||
endif
|
||||
ifeq ($(PIC32_TIMER_CLOCK),2)
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_2__ -D PIC32_TIMER_CLOCK=2
|
||||
endif
|
||||
ifeq ($(PIC32_TIMER_CLOCK),3)
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_3__ -D PIC32_TIMER_CLOCK=3
|
||||
endif
|
||||
ifeq ($(PIC32_TIMER_CLOCK),4)
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_4__ -D PIC32_TIMER_CLOCK=4
|
||||
endif
|
||||
ifeq ($(PIC32_TIMER_CLOCK),5)
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_5__ -D PIC32_TIMER_CLOCK=5
|
||||
endif
|
||||
|
||||
ifndef PIC32_TIMER_RTIMER
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_23__ -D PIC32_TIMER_RTIMER=23
|
||||
endif
|
||||
ifeq ($(PIC32_TIMER_RTIMER),23)
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_23__ -D PIC32_TIMER_RTIMER=23
|
||||
endif
|
||||
ifeq ($(PIC32_TIMER_RTIMER),45)
|
||||
CONTIKI_PLAT_DEFS += -D __USE_TIMER_45__ -D PIC32_TIMER_RTIMER=45
|
||||
endif
|
||||
|
||||
CONTIKI_PLAT_DEFS += -D __USE_UART__
|
||||
CONTIKI_PLAT_DEFS += -D __USE_UART_PORT1A__
|
||||
CONTIKI_PLAT_DEFS += -D __USE_UART_PORT1B__
|
||||
|
|
|
@ -115,10 +115,10 @@ main(int argc, char **argv)
|
|||
dbg_setup_uart(UART_DEBUG_BAUDRATE);
|
||||
|
||||
PRINTF("Initialising Node: %d\n", SEEDEYE_ID);
|
||||
|
||||
printf("CPU Clock: %uMhz\n", pic32_clock_get_system_clock() / 1000000);
|
||||
printf("Peripheral Clock: %uMhz\n", pic32_clock_get_peripheral_clock() / 1000000);
|
||||
|
||||
|
||||
PRINTF("CPU Clock: %uMhz\n", pic32_clock_get_system_clock() / 1000000);
|
||||
PRINTF("Peripheral Clock: %uMhz\n", pic32_clock_get_peripheral_clock() / 1000000);
|
||||
|
||||
random_init(SEEDEYE_ID);
|
||||
|
||||
process_init();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* (http://www.cnit.it).
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
|
@ -51,8 +51,8 @@
|
|||
#define MRF24J40_PAN_COORDINATOR
|
||||
#endif /* SEEDEYE_ID == 1 */
|
||||
|
||||
#define UART_DEBUG_BAUDRATE 230400
|
||||
#define UART_SLIP_BAUDRATE 230400
|
||||
#define UART_DEBUG_BAUDRATE 115200
|
||||
#define UART_SLIP_BAUDRATE 115200
|
||||
|
||||
#define PLATFORM_HAS_BATTERY 1
|
||||
#define PLATFORM_HAS_BUTTON 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue