
this is using the mbed os version 5-13-1
source/compiler_abstraction.h@129:590bdc2dcf5b, 2019-07-19 (annotated)
- Committer:
- ocomeni
- Date:
- Fri Jul 19 16:49:26 2019 +0000
- Branch:
- PassingRegression
- Revision:
- 129:590bdc2dcf5b
- Parent:
- 92:ec9550034276
Implementation of Access token acquisition; 1. make request with credentials - DONE; 2. get response - DONE; 3. extract Id and refresh tokens from response - DONE; 4. integrate with code - DONE; Testing ongoing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ocomeni | 92:ec9550034276 | 1 | /* |
ocomeni | 92:ec9550034276 | 2 | * Copyright (c) Nordic Semiconductor ASA |
ocomeni | 92:ec9550034276 | 3 | * All rights reserved. |
ocomeni | 92:ec9550034276 | 4 | * |
ocomeni | 92:ec9550034276 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
ocomeni | 92:ec9550034276 | 6 | * are permitted provided that the following conditions are met: |
ocomeni | 92:ec9550034276 | 7 | * |
ocomeni | 92:ec9550034276 | 8 | * 1. Redistributions of source code must retain the above copyright notice, this |
ocomeni | 92:ec9550034276 | 9 | * list of conditions and the following disclaimer. |
ocomeni | 92:ec9550034276 | 10 | * |
ocomeni | 92:ec9550034276 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, this |
ocomeni | 92:ec9550034276 | 12 | * list of conditions and the following disclaimer in the documentation and/or |
ocomeni | 92:ec9550034276 | 13 | * other materials provided with the distribution. |
ocomeni | 92:ec9550034276 | 14 | * |
ocomeni | 92:ec9550034276 | 15 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of other |
ocomeni | 92:ec9550034276 | 16 | * contributors to this software may be used to endorse or promote products |
ocomeni | 92:ec9550034276 | 17 | * derived from this software without specific prior written permission. |
ocomeni | 92:ec9550034276 | 18 | * |
ocomeni | 92:ec9550034276 | 19 | * |
ocomeni | 92:ec9550034276 | 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
ocomeni | 92:ec9550034276 | 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
ocomeni | 92:ec9550034276 | 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
ocomeni | 92:ec9550034276 | 23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
ocomeni | 92:ec9550034276 | 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
ocomeni | 92:ec9550034276 | 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
ocomeni | 92:ec9550034276 | 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
ocomeni | 92:ec9550034276 | 27 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
ocomeni | 92:ec9550034276 | 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
ocomeni | 92:ec9550034276 | 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
ocomeni | 92:ec9550034276 | 30 | * |
ocomeni | 92:ec9550034276 | 31 | */ |
ocomeni | 92:ec9550034276 | 32 | #ifndef _COMPILER_ABSTRACTION_H |
ocomeni | 92:ec9550034276 | 33 | #define _COMPILER_ABSTRACTION_H |
ocomeni | 92:ec9550034276 | 34 | |
ocomeni | 92:ec9550034276 | 35 | /*lint ++flb "Enter library region" */ |
ocomeni | 92:ec9550034276 | 36 | |
ocomeni | 92:ec9550034276 | 37 | #if defined ( __CC_ARM ) |
ocomeni | 92:ec9550034276 | 38 | |
ocomeni | 92:ec9550034276 | 39 | #ifndef __ASM |
ocomeni | 92:ec9550034276 | 40 | #define __ASM __asm |
ocomeni | 92:ec9550034276 | 41 | #endif |
ocomeni | 92:ec9550034276 | 42 | |
ocomeni | 92:ec9550034276 | 43 | #ifndef __INLINE |
ocomeni | 92:ec9550034276 | 44 | #define __INLINE __inline |
ocomeni | 92:ec9550034276 | 45 | #endif |
ocomeni | 92:ec9550034276 | 46 | |
ocomeni | 92:ec9550034276 | 47 | #ifndef __WEAK |
ocomeni | 92:ec9550034276 | 48 | #define __WEAK __weak |
ocomeni | 92:ec9550034276 | 49 | #endif |
ocomeni | 92:ec9550034276 | 50 | |
ocomeni | 92:ec9550034276 | 51 | #ifndef __ALIGN |
ocomeni | 92:ec9550034276 | 52 | #define __ALIGN(n) __align(n) |
ocomeni | 92:ec9550034276 | 53 | #endif |
ocomeni | 92:ec9550034276 | 54 | |
ocomeni | 92:ec9550034276 | 55 | #define GET_SP() __current_sp() |
ocomeni | 92:ec9550034276 | 56 | |
ocomeni | 92:ec9550034276 | 57 | #elif defined ( __ICCARM__ ) |
ocomeni | 92:ec9550034276 | 58 | |
ocomeni | 92:ec9550034276 | 59 | #ifndef __ASM |
ocomeni | 92:ec9550034276 | 60 | #define __ASM __asm |
ocomeni | 92:ec9550034276 | 61 | #endif |
ocomeni | 92:ec9550034276 | 62 | |
ocomeni | 92:ec9550034276 | 63 | #ifndef __INLINE |
ocomeni | 92:ec9550034276 | 64 | #define __INLINE inline |
ocomeni | 92:ec9550034276 | 65 | #endif |
ocomeni | 92:ec9550034276 | 66 | |
ocomeni | 92:ec9550034276 | 67 | #ifndef __WEAK |
ocomeni | 92:ec9550034276 | 68 | #define __WEAK __weak |
ocomeni | 92:ec9550034276 | 69 | #endif |
ocomeni | 92:ec9550034276 | 70 | |
ocomeni | 92:ec9550034276 | 71 | /* Not defined for IAR since it requires a new line to work, and C preprocessor does not allow that. */ |
ocomeni | 92:ec9550034276 | 72 | #ifndef __ALIGN |
ocomeni | 92:ec9550034276 | 73 | #define __ALIGN(n) |
ocomeni | 92:ec9550034276 | 74 | #endif |
ocomeni | 92:ec9550034276 | 75 | |
ocomeni | 92:ec9550034276 | 76 | #define GET_SP() __get_SP() |
ocomeni | 92:ec9550034276 | 77 | |
ocomeni | 92:ec9550034276 | 78 | #elif defined ( __GNUC__ ) |
ocomeni | 92:ec9550034276 | 79 | |
ocomeni | 92:ec9550034276 | 80 | #ifndef __ASM |
ocomeni | 92:ec9550034276 | 81 | #define __ASM __asm |
ocomeni | 92:ec9550034276 | 82 | #endif |
ocomeni | 92:ec9550034276 | 83 | |
ocomeni | 92:ec9550034276 | 84 | #ifndef __INLINE |
ocomeni | 92:ec9550034276 | 85 | #define __INLINE inline |
ocomeni | 92:ec9550034276 | 86 | #endif |
ocomeni | 92:ec9550034276 | 87 | |
ocomeni | 92:ec9550034276 | 88 | #ifndef __WEAK |
ocomeni | 92:ec9550034276 | 89 | #define __WEAK __attribute__((weak)) |
ocomeni | 92:ec9550034276 | 90 | #endif |
ocomeni | 92:ec9550034276 | 91 | |
ocomeni | 92:ec9550034276 | 92 | #ifndef __ALIGN |
ocomeni | 92:ec9550034276 | 93 | #define __ALIGN(n) __attribute__((aligned(n))) |
ocomeni | 92:ec9550034276 | 94 | #endif |
ocomeni | 92:ec9550034276 | 95 | |
ocomeni | 92:ec9550034276 | 96 | #define GET_SP() gcc_current_sp() |
ocomeni | 92:ec9550034276 | 97 | |
ocomeni | 92:ec9550034276 | 98 | static inline unsigned int gcc_current_sp(void) |
ocomeni | 92:ec9550034276 | 99 | { |
ocomeni | 92:ec9550034276 | 100 | register unsigned sp __ASM("sp"); |
ocomeni | 92:ec9550034276 | 101 | return sp; |
ocomeni | 92:ec9550034276 | 102 | } |
ocomeni | 92:ec9550034276 | 103 | |
ocomeni | 92:ec9550034276 | 104 | #elif defined ( __TASKING__ ) |
ocomeni | 92:ec9550034276 | 105 | |
ocomeni | 92:ec9550034276 | 106 | #ifndef __ASM |
ocomeni | 92:ec9550034276 | 107 | #define __ASM __asm |
ocomeni | 92:ec9550034276 | 108 | #endif |
ocomeni | 92:ec9550034276 | 109 | |
ocomeni | 92:ec9550034276 | 110 | #ifndef __INLINE |
ocomeni | 92:ec9550034276 | 111 | #define __INLINE inline |
ocomeni | 92:ec9550034276 | 112 | #endif |
ocomeni | 92:ec9550034276 | 113 | |
ocomeni | 92:ec9550034276 | 114 | #ifndef __WEAK |
ocomeni | 92:ec9550034276 | 115 | #define __WEAK __attribute__((weak)) |
ocomeni | 92:ec9550034276 | 116 | #endif |
ocomeni | 92:ec9550034276 | 117 | |
ocomeni | 92:ec9550034276 | 118 | #ifndef __ALIGN |
ocomeni | 92:ec9550034276 | 119 | #define __ALIGN(n) __align(n) |
ocomeni | 92:ec9550034276 | 120 | #endif |
ocomeni | 92:ec9550034276 | 121 | |
ocomeni | 92:ec9550034276 | 122 | #define GET_SP() __get_MSP() |
ocomeni | 92:ec9550034276 | 123 | |
ocomeni | 92:ec9550034276 | 124 | #endif |
ocomeni | 92:ec9550034276 | 125 | |
ocomeni | 92:ec9550034276 | 126 | /*lint --flb "Leave library region" */ |
ocomeni | 92:ec9550034276 | 127 | |
ocomeni | 92:ec9550034276 | 128 | #endif |
ocomeni | 92:ec9550034276 | 129 |