Merge branch 'master' of https://github.com/rogerclarkmelbourne/Arduino_stm32
This commit is contained in:
commit
cd9e17deea
|
@ -6,7 +6,7 @@ menu.bootloader_version=Bootloader version
|
|||
menu.upload_method=Upload method
|
||||
|
||||
##############################################################
|
||||
mapleMini.name=LeafLabs Maple Mini Rev 2 to Flash
|
||||
mapleMini.name=Maple Mini
|
||||
|
||||
mapleMini.build.board=MAPLE_MINI
|
||||
mapleMini.build.core=maple
|
||||
|
@ -37,7 +37,7 @@ mapleMini.menu.bootloader_version.bootloader20.upload.maximum_size=122880
|
|||
mapleMini.menu.bootloader_version.bootloader20.upload.altID=2
|
||||
|
||||
##############################################################
|
||||
maple.name=LeafLabs Maple Rev 3+ to Flash
|
||||
maple.name=Maple (Rev 3)
|
||||
|
||||
maple.upload.tool=maple_upload
|
||||
maple.upload.protocol=maple_dfu
|
||||
|
@ -60,7 +60,7 @@ maple.build.vect=VECT_TAB_ADDR=0x8005000
|
|||
|
||||
|
||||
##############################################################
|
||||
mapleRET6.name=LeafLabs Maple RET6 to Flash
|
||||
mapleRET6.name=Maple (RET6)
|
||||
|
||||
mapleRET6.build.board=MAPLE_RET6
|
||||
mapleRET6.build.core=maple
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/******************************************************************************
|
||||
* The MIT License
|
||||
*
|
||||
|
@ -410,3 +411,102 @@ static void enable_bas_gen_irq(timer_dev *dev) {
|
|||
}
|
||||
nvic_irq_enable(irq_num);
|
||||
}
|
||||
|
||||
|
||||
/* Note.
|
||||
*
|
||||
* 2015/07/06 Roger Clark
|
||||
*
|
||||
* The IRQ handlers were initially in timer_f1.c however this seems to cause problems
|
||||
* in which the compiler / linker doesn't always link all the required handlers.
|
||||
* The work around was to move the handlers into this file
|
||||
*/
|
||||
|
||||
/*
|
||||
* IRQ handlers
|
||||
*
|
||||
* Defer to the timer_private dispatch API.
|
||||
*
|
||||
* FIXME: The names of these handlers are inaccurate since XL-density
|
||||
* devices came out. Update these to match the STM32F2 names, maybe
|
||||
* using some weak symbol magic to preserve backwards compatibility if
|
||||
* possible. Once that's done, we can just move the IRQ handlers into
|
||||
* the top-level libmaple/timer.c, and there will be no need for this
|
||||
* file.
|
||||
*/
|
||||
|
||||
void __irq_tim1_brk(void) {
|
||||
dispatch_adv_brk(TIMER1);
|
||||
#if STM32_HAVE_TIMER(9)
|
||||
dispatch_tim_9_12(TIMER9);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim1_up(void) {
|
||||
dispatch_adv_up(TIMER1);
|
||||
#if STM32_HAVE_TIMER(10)
|
||||
dispatch_tim_10_11_13_14(TIMER10);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim1_trg_com(void) {
|
||||
dispatch_adv_trg_com(TIMER1);
|
||||
#if STM32_HAVE_TIMER(11)
|
||||
dispatch_tim_10_11_13_14(TIMER11);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim1_cc(void) {
|
||||
dispatch_adv_cc(TIMER1);
|
||||
}
|
||||
|
||||
void __irq_tim2(void) {
|
||||
dispatch_general(TIMER2);
|
||||
}
|
||||
|
||||
void __irq_tim3(void) {
|
||||
dispatch_general(TIMER3);
|
||||
}
|
||||
|
||||
void __irq_tim4(void) {
|
||||
dispatch_general(TIMER4);
|
||||
}
|
||||
|
||||
#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
|
||||
void __irq_tim5(void) {
|
||||
dispatch_general(TIMER5);
|
||||
}
|
||||
|
||||
void __irq_tim6(void) {
|
||||
dispatch_basic(TIMER6);
|
||||
}
|
||||
|
||||
void __irq_tim7(void) {
|
||||
dispatch_basic(TIMER7);
|
||||
}
|
||||
|
||||
void __irq_tim8_brk(void) {
|
||||
dispatch_adv_brk(TIMER8);
|
||||
#if STM32_HAVE_TIMER(12)
|
||||
dispatch_tim_9_12(TIMER12);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim8_up(void) {
|
||||
dispatch_adv_up(TIMER8);
|
||||
#if STM32_HAVE_TIMER(13)
|
||||
dispatch_tim_10_11_13_14(TIMER13);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim8_trg_com(void) {
|
||||
dispatch_adv_trg_com(TIMER8);
|
||||
#if STM32_HAVE_TIMER(14)
|
||||
dispatch_tim_10_11_13_14(TIMER14);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim8_cc(void) {
|
||||
dispatch_adv_cc(TIMER8);
|
||||
}
|
||||
#endif /* defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY) */
|
|
@ -30,95 +30,12 @@
|
|||
* @brief STM32F1 timer.
|
||||
*/
|
||||
|
||||
#include <libmaple/timer.h>
|
||||
#include <libmaple/stm32.h>
|
||||
#include "timer_private.h"
|
||||
|
||||
/*
|
||||
* IRQ handlers
|
||||
*
|
||||
* Defer to the timer_private dispatch API.
|
||||
*
|
||||
* FIXME: The names of these handlers are inaccurate since XL-density
|
||||
* devices came out. Update these to match the STM32F2 names, maybe
|
||||
* using some weak symbol magic to preserve backwards compatibility if
|
||||
* possible. Once that's done, we can just move the IRQ handlers into
|
||||
* the top-level libmaple/timer.c, and there will be no need for this
|
||||
* file.
|
||||
* 2015/07/06
|
||||
* Note. The IRQ handlers which were initially in this file have been moved to timer.c
|
||||
* to resolve a linker issue in where some IRQ handlers were not being linked even though
|
||||
* they were being used.
|
||||
* This file has been retains for historical reasons, but can be moved at some time in the future
|
||||
* when full testing of the code in the new location has been completed.
|
||||
*/
|
||||
|
||||
void __irq_tim1_brk(void) {
|
||||
dispatch_adv_brk(TIMER1);
|
||||
#if STM32_HAVE_TIMER(9)
|
||||
dispatch_tim_9_12(TIMER9);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim1_up(void) {
|
||||
dispatch_adv_up(TIMER1);
|
||||
#if STM32_HAVE_TIMER(10)
|
||||
dispatch_tim_10_11_13_14(TIMER10);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim1_trg_com(void) {
|
||||
dispatch_adv_trg_com(TIMER1);
|
||||
#if STM32_HAVE_TIMER(11)
|
||||
dispatch_tim_10_11_13_14(TIMER11);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim1_cc(void) {
|
||||
dispatch_adv_cc(TIMER1);
|
||||
}
|
||||
|
||||
void __irq_tim2(void) {
|
||||
dispatch_general(TIMER2);
|
||||
}
|
||||
|
||||
void __irq_tim3(void) {
|
||||
dispatch_general(TIMER3);
|
||||
}
|
||||
|
||||
void __irq_tim4(void) {
|
||||
dispatch_general(TIMER4);
|
||||
}
|
||||
|
||||
#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
|
||||
void __irq_tim5(void) {
|
||||
dispatch_general(TIMER5);
|
||||
}
|
||||
|
||||
void __irq_tim6(void) {
|
||||
dispatch_basic(TIMER6);
|
||||
}
|
||||
|
||||
void __irq_tim7(void) {
|
||||
dispatch_basic(TIMER7);
|
||||
}
|
||||
|
||||
void __irq_tim8_brk(void) {
|
||||
dispatch_adv_brk(TIMER8);
|
||||
#if STM32_HAVE_TIMER(12)
|
||||
dispatch_tim_9_12(TIMER12);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim8_up(void) {
|
||||
dispatch_adv_up(TIMER8);
|
||||
#if STM32_HAVE_TIMER(13)
|
||||
dispatch_tim_10_11_13_14(TIMER13);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim8_trg_com(void) {
|
||||
dispatch_adv_trg_com(TIMER8);
|
||||
#if STM32_HAVE_TIMER(14)
|
||||
dispatch_tim_10_11_13_14(TIMER14);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __irq_tim8_cc(void) {
|
||||
dispatch_adv_cc(TIMER8);
|
||||
}
|
||||
#endif /* defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY) */
|
||||
|
|
|
@ -74,11 +74,12 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#warning these are just here to get SPI to compile they need to be changed and moved!
|
||||
#define SS (1)
|
||||
#define MOSI 2
|
||||
#define MISO 3
|
||||
#define SCK 4
|
||||
|
||||
#define SS BOARD_SPI1_NSS_PIN
|
||||
#define MOSI BOARD_SPI1_MOSI_PIN
|
||||
#define MISO BOARD_SPI1_MISO_PIN
|
||||
#define SCK BOARD_SPI1_SCK_PIN
|
||||
|
||||
|
||||
typedef unsigned int word;
|
||||
// typedef uint16 word;// definition from Arduino website, now appears to be incorrect for 32 bit devices
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# For more info:
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=STM32 Boards (stm32duino)
|
||||
name=STM32 Boards (STM32duino.com)
|
||||
version=0.1.2
|
||||
|
||||
compiler.warning_flags=-w -DDEBUG_LEVEL=DEBUG_NONE
|
||||
|
|
|
@ -58,8 +58,7 @@ int DNSClient::inet_aton(const char* aIPAddrString, IPAddress& aResult)
|
|||
{
|
||||
// See if we've been given a valid IP address
|
||||
const char* p =aIPAddrString;
|
||||
while (*p &&
|
||||
( (*p == '.') || (*p >= '0') || (*p <= '9') ))
|
||||
while (*p && ( (*p == '.') || ((*p >= '0') && (*p <= '9')) ))
|
||||
{
|
||||
p++;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) )
|
||||
#define htons(x) ( ((x)<< 8 & 0xFF00) | ((x)>> 8 & 0x00FF) )
|
||||
#define ntohs(x) htons(x)
|
||||
|
||||
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -39,7 +39,8 @@ else
|
|||
dfuse_addr=""
|
||||
fi
|
||||
|
||||
DFU_UTIL=/usr/local/bin/dfu-util
|
||||
#DFU_UTIL=/usr/local/bin/dfu-util
|
||||
DFU_UTIL=${DIR}/dfu-util/dfu-util
|
||||
if [ ! -x ${DFU_UTIL} ]; then
|
||||
DFU_UTIL=/opt/local/bin/dfu-util
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue