Integrating the ublox LISA C200 modem

Fork of SprintUSBModemHTTPClientTest by Donatien Garnier

Committer:
sam_grove
Date:
Thu Sep 26 00:44:20 2013 -0500
Revision:
5:3f93dd1d4cb3
Exported program and replaced contents of the repo with the source
to build and debug using keil mdk. Libs NOT upto date are lwip, lwip-sys
and socket. these have newer versions under mbed_official but were starting
from a know working point

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 5:3f93dd1d4cb3 1 /* mbed Microcontroller Library - cmsis_nvic for LCP1768
sam_grove 5:3f93dd1d4cb3 2 * Copyright (c) 2009-2011 ARM Limited. All rights reserved.
sam_grove 5:3f93dd1d4cb3 3 *
sam_grove 5:3f93dd1d4cb3 4 * CMSIS-style functionality to support dynamic vectors
sam_grove 5:3f93dd1d4cb3 5 */
sam_grove 5:3f93dd1d4cb3 6 #include "cmsis_nvic.h"
sam_grove 5:3f93dd1d4cb3 7
sam_grove 5:3f93dd1d4cb3 8 #define NVIC_RAM_VECTOR_ADDRESS (0x10000000) // Location of vectors in RAM
sam_grove 5:3f93dd1d4cb3 9 #define NVIC_FLASH_VECTOR_ADDRESS (0x0) // Initial vector position in flash
sam_grove 5:3f93dd1d4cb3 10
sam_grove 5:3f93dd1d4cb3 11 void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
sam_grove 5:3f93dd1d4cb3 12 uint32_t *vectors = (uint32_t*)SCB->VTOR;
sam_grove 5:3f93dd1d4cb3 13 uint32_t i;
sam_grove 5:3f93dd1d4cb3 14
sam_grove 5:3f93dd1d4cb3 15 // Copy and switch to dynamic vectors if the first time called
sam_grove 5:3f93dd1d4cb3 16 if (SCB->VTOR == NVIC_FLASH_VECTOR_ADDRESS) {
sam_grove 5:3f93dd1d4cb3 17 uint32_t *old_vectors = vectors;
sam_grove 5:3f93dd1d4cb3 18 vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
sam_grove 5:3f93dd1d4cb3 19 for (i=0; i<NVIC_NUM_VECTORS; i++) {
sam_grove 5:3f93dd1d4cb3 20 vectors[i] = old_vectors[i];
sam_grove 5:3f93dd1d4cb3 21 }
sam_grove 5:3f93dd1d4cb3 22 SCB->VTOR = (uint32_t)NVIC_RAM_VECTOR_ADDRESS;
sam_grove 5:3f93dd1d4cb3 23 }
sam_grove 5:3f93dd1d4cb3 24 vectors[IRQn + NVIC_USER_IRQ_OFFSET] = vector;
sam_grove 5:3f93dd1d4cb3 25 }
sam_grove 5:3f93dd1d4cb3 26
sam_grove 5:3f93dd1d4cb3 27 uint32_t NVIC_GetVector(IRQn_Type IRQn) {
sam_grove 5:3f93dd1d4cb3 28 uint32_t *vectors = (uint32_t*)SCB->VTOR;
sam_grove 5:3f93dd1d4cb3 29 return vectors[IRQn + NVIC_USER_IRQ_OFFSET];
sam_grove 5:3f93dd1d4cb3 30 }
sam_grove 5:3f93dd1d4cb3 31