mirror of https://github.com/ARMmbed/mbed-os.git
Merge remote-tracking branch 'github/master'
commit
10c7a71c92
|
@ -43,13 +43,11 @@ typedef enum {
|
|||
P0_7 = (0 << PORT_SHIFT) | (7 << PIN_SHIFT) | 0x50,
|
||||
P0_8 = (0 << PORT_SHIFT) | (8 << PIN_SHIFT) | 0x60,
|
||||
P0_9 = (0 << PORT_SHIFT) | (9 << PIN_SHIFT) | 0x64,
|
||||
P0_10 = (0 << PORT_SHIFT) | (10 << PIN_SHIFT) | 0x68,
|
||||
P0_11 = (0 << PORT_SHIFT) | (11 << PIN_SHIFT) | 0x74,
|
||||
|
||||
P1_0 = (1 << PORT_SHIFT) | (0 << PIN_SHIFT) | 0x78,
|
||||
P1_1 = (1 << PORT_SHIFT) | (1 << PIN_SHIFT) | 0x7c,
|
||||
P1_2 = (1 << PORT_SHIFT) | (2 << PIN_SHIFT) | 0x80,
|
||||
P1_3 = (1 << PORT_SHIFT) | (3 << PIN_SHIFT) | 0x90,
|
||||
P1_4 = (1 << PORT_SHIFT) | (4 << PIN_SHIFT) | 0x94,
|
||||
P1_5 = (1 << PORT_SHIFT) | (5 << PIN_SHIFT) | 0xa0,
|
||||
P1_6 = (1 << PORT_SHIFT) | (6 << PIN_SHIFT) | 0xa4,
|
||||
|
@ -95,9 +93,7 @@ typedef enum {
|
|||
p16 = P1_0,
|
||||
p17 = P1_1,
|
||||
p18 = P1_2,
|
||||
p19 = P1_3,
|
||||
p20 = P1_4,
|
||||
p21 = P0_10,
|
||||
p22 = P0_2,
|
||||
p23 = P0_11,
|
||||
p24 = P0_2,
|
||||
|
@ -133,12 +129,10 @@ typedef enum {
|
|||
xp16 = P1_0,
|
||||
xp17 = P1_1,
|
||||
xp18 = P1_2,
|
||||
xp19 = P1_3,
|
||||
xp20 = P1_4,
|
||||
xp21 = P1_5,
|
||||
xp22 = P1_8,
|
||||
xp23 = P0_6,
|
||||
xp24 = P0_10,
|
||||
xp25 = P3_0,
|
||||
xp26 = P3_1,
|
||||
xp27 = P3_2,
|
||||
|
@ -167,14 +161,12 @@ typedef enum {
|
|||
|
||||
dp1 = P0_8,
|
||||
dp2 = P0_9,
|
||||
dp3 = P0_10,
|
||||
dp4 = P0_11,
|
||||
dp5 = P0_5,
|
||||
dp6 = P0_6,
|
||||
dp9 = P1_0,
|
||||
dp10 = P1_1,
|
||||
dp11 = P1_2,
|
||||
dp12 = P1_3,
|
||||
dp13 = P1_4,
|
||||
dp14 = P1_5,
|
||||
dp15 = P1_6,
|
||||
|
@ -190,14 +182,12 @@ typedef enum {
|
|||
|
||||
dip1 = P0_8,
|
||||
dip2 = P0_9,
|
||||
dip3 = P0_10,
|
||||
dip4 = P0_11,
|
||||
dip5 = P0_5,
|
||||
dip6 = P0_6,
|
||||
dip9 = P1_0,
|
||||
dip10 = P1_1,
|
||||
dip11 = P1_2,
|
||||
dip12 = P1_3,
|
||||
dip13 = P1_4,
|
||||
dip14 = P1_5,
|
||||
dip15 = P1_6,
|
||||
|
|
|
@ -32,7 +32,6 @@ static const PinMap PinMap_ADC[] = {
|
|||
{P1_0 , ADC0_1, 2},
|
||||
{P1_1 , ADC0_2, 2},
|
||||
{P1_2 , ADC0_3, 2},
|
||||
{P1_3 , ADC0_4, 2},
|
||||
{P1_4 , ADC0_5, 1},
|
||||
{P1_10, ADC0_6, 1},
|
||||
{P1_11, ADC0_7, 1},
|
||||
|
|
|
@ -19,12 +19,10 @@
|
|||
uint32_t gpio_set(PinName pin) {
|
||||
// PIO default value of following ports are not same as others
|
||||
int f = ((pin == P0_0 ) || // RESET
|
||||
(pin == P0_10) || // SWCLK
|
||||
(pin == P0_11) || // R
|
||||
(pin == P1_0 ) || // R
|
||||
(pin == P1_1 ) || // R
|
||||
(pin == P1_2 ) || // R
|
||||
(pin == P1_3 )) ? //
|
||||
(pin == P1_2 )) ? // R
|
||||
(1) : (0);
|
||||
|
||||
pin_function(pin, f);
|
||||
|
|
|
@ -30,7 +30,6 @@ static const PinMap PinMap_PWM[] = {
|
|||
/* CT16B0 */
|
||||
{P0_8 , PWM_1, 0x02}, /* MR0 */
|
||||
{P0_9 , PWM_2, 0x02}, /* MR1 */
|
||||
{P0_10, PWM_3, 0x03}, /* MR2 */
|
||||
|
||||
/* CT16B1 */
|
||||
{P1_9 , PWM_4, 0x01}, /* MR0 */
|
||||
|
@ -44,7 +43,6 @@ static const PinMap PinMap_PWM[] = {
|
|||
/* CT32B1 */
|
||||
{P1_1 , PWM_9 ,0x03}, /* MR0 */
|
||||
{P1_2 , PWM_10,0x03}, /* MR1 */
|
||||
{P1_3 , PWM_11,0x03}, /* MR2 */
|
||||
|
||||
{NC , NC ,0x00}
|
||||
};
|
||||
|
@ -54,10 +52,9 @@ typedef struct {
|
|||
uint8_t mr;
|
||||
} timer_mr;
|
||||
|
||||
static timer_mr pwm_timer_map[11] = {
|
||||
static timer_mr pwm_timer_map[9] = {
|
||||
{0, 0}, /* CT16B0, MR0 */
|
||||
{0, 1}, /* CT16B0, MR1 */
|
||||
{0, 2}, /* CT16B0, MR2 */
|
||||
|
||||
{1, 0}, /* CT16B1, MR0 */
|
||||
{1, 1}, /* CT16B1, MR1 */
|
||||
|
@ -68,7 +65,6 @@ static timer_mr pwm_timer_map[11] = {
|
|||
|
||||
{3, 0}, /* CT32B1, MR0 */
|
||||
{3, 1}, /* CT32B1, MR1 */
|
||||
{3, 2} /* CT32B1, MR2 */
|
||||
};
|
||||
|
||||
static LPC_TMR_TypeDef *Timers[4] = {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
static const PinMap PinMap_SPI_SCLK[] = {
|
||||
{P0_6 , SPI_0, 0x02},
|
||||
{P0_10, SPI_0, 0x02},
|
||||
{P2_11, SPI_0, 0x01},
|
||||
{P2_1 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
|
|
|
@ -22,6 +22,10 @@ PinName parse_pins(const char *str) {
|
|||
static const PinName pin_names[] = {p5, p6, p7, p8, p9, p10, p11, p12, p13, p14
|
||||
, p15, p16, p17, p18, p19, p20, p21, p22, p23
|
||||
, p24, p25, p26, p27, p28, p29, p30};
|
||||
#elif defined(TARGET_LPC1114)
|
||||
static const PinName pin_names[] = {dp1, dp2, dp4, dp5, dp6, dp9, dp10, dp11
|
||||
, dp13, dp14, dp15, dp16, dp17, dp18, dp23
|
||||
, dp24, dp25, dp26, dp27, dp28};
|
||||
#elif defined(TARGET_LPC4088)
|
||||
static const PinName pin_names[] = {p5, p6, p7, p8, p9, p10, p11, p12, p13, p14
|
||||
, p15, p16, p17, p18, p19, p20, NC, NC, p23
|
||||
|
@ -29,7 +33,7 @@ PinName parse_pins(const char *str) {
|
|||
, p33, p34, NC, NC, p37, p38, p39};
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC812) || defined(TARGET_LPC4088)
|
||||
#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC812) || defined(TARGET_LPC4088)|| defined(TARGET_LPC1114)
|
||||
if (str[0] == 'P') { // Pn_n
|
||||
uint32_t port = str[1] - '0';
|
||||
uint32_t pin = str[3] - '0'; // Pn_n
|
||||
|
|
|
@ -14,8 +14,10 @@ void report_iterations(void) {
|
|||
printf("%.2f\n", ((float)(tot)/(float)(initial_stack_p - initial_heap_p))*100.);
|
||||
#endif
|
||||
#ifdef TOOLCHAIN_ARM
|
||||
#ifndef __MICROLIB
|
||||
__heapvalid((__heapprt) fprintf, stdout, 1);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void stack_test(char *latest_heap_pointer) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#if defined(TARGET_LPC1768) || defined(TARGET_LPC4088)
|
||||
#define TIMER_IRQ TIMER3_IRQn
|
||||
#elif defined(TARGET_LPC11U24)
|
||||
#elif defined(TARGET_LPC11U24) || defined(TARGET_LPC1114)
|
||||
#define TIMER_IRQ TIMER_32_1_IRQn
|
||||
#elif defined(TARGET_KL25Z)
|
||||
#define TIMER_IRQ LPTimer_IRQn
|
||||
|
@ -40,7 +40,7 @@ Ticker flipper_2;
|
|||
Sender s1(pc, '1');
|
||||
Sender s2(pc, '2');
|
||||
|
||||
#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC4088) || defined(TARGET_LPC2368)
|
||||
#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC4088) || defined(TARGET_LPC2368) || defined(TARGET_LPC1114)
|
||||
# define LED_NAME LED2
|
||||
#elif defined(TARGET_KL05Z)
|
||||
# define LED_NAME LED2
|
||||
|
|
|
@ -57,17 +57,18 @@ class PyWinUSB(Interface):
|
|||
"""
|
||||
all_devices = hid.find_all_hid_devices()
|
||||
|
||||
# keep devices with good vid/pid
|
||||
# find devices with good vid/pid
|
||||
all_mbed_devices = []
|
||||
for d in all_devices:
|
||||
if (d.vendor_id != vid) or (d.product_id != pid):
|
||||
all_devices.remove(d)
|
||||
if (d.vendor_id == vid) and (d.product_id == pid):
|
||||
all_mbed_devices.append(d)
|
||||
|
||||
if not all_devices:
|
||||
if not all_mbed_devices:
|
||||
logging.debug("No Mbed device connected")
|
||||
return
|
||||
|
||||
boards = []
|
||||
for dev in all_devices:
|
||||
for dev in all_mbed_devices:
|
||||
try:
|
||||
dev.open()
|
||||
report = dev.find_output_reports()
|
||||
|
|
Loading…
Reference in New Issue