added debugging
Fork of BLE_nRF8001 by
BLE_nRF8001/utility/aci_setup.h@0:075ea2812998, 2014-10-17 (annotated)
- Committer:
- RedBearLab
- Date:
- Fri Oct 17 22:40:32 2014 +0800
- Revision:
- 0:075ea2812998
BLE_nRF8001 library first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RedBearLab | 0:075ea2812998 | 1 | /* Copyright (c) 2014, Nordic Semiconductor ASA |
RedBearLab | 0:075ea2812998 | 2 | * |
RedBearLab | 0:075ea2812998 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
RedBearLab | 0:075ea2812998 | 4 | * of this software and associated documentation files (the "Software"), to deal |
RedBearLab | 0:075ea2812998 | 5 | * in the Software without restriction, including without limitation the rights |
RedBearLab | 0:075ea2812998 | 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
RedBearLab | 0:075ea2812998 | 7 | * copies of the Software, and to permit persons to whom the Software is |
RedBearLab | 0:075ea2812998 | 8 | * furnished to do so, subject to the following conditions: |
RedBearLab | 0:075ea2812998 | 9 | * |
RedBearLab | 0:075ea2812998 | 10 | * The above copyright notice and this permission notice shall be included in all |
RedBearLab | 0:075ea2812998 | 11 | * copies or substantial portions of the Software. |
RedBearLab | 0:075ea2812998 | 12 | * |
RedBearLab | 0:075ea2812998 | 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
RedBearLab | 0:075ea2812998 | 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
RedBearLab | 0:075ea2812998 | 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
RedBearLab | 0:075ea2812998 | 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
RedBearLab | 0:075ea2812998 | 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
RedBearLab | 0:075ea2812998 | 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
RedBearLab | 0:075ea2812998 | 19 | * SOFTWARE. |
RedBearLab | 0:075ea2812998 | 20 | */ |
RedBearLab | 0:075ea2812998 | 21 | |
RedBearLab | 0:075ea2812998 | 22 | |
RedBearLab | 0:075ea2812998 | 23 | #ifndef H_ACI_SETUP |
RedBearLab | 0:075ea2812998 | 24 | #define H_ACI_SETUP |
RedBearLab | 0:075ea2812998 | 25 | |
RedBearLab | 0:075ea2812998 | 26 | #define SETUP_SUCCESS 0 |
RedBearLab | 0:075ea2812998 | 27 | #define SETUP_FAIL_COMMAND_QUEUE_NOT_EMPTY 1 |
RedBearLab | 0:075ea2812998 | 28 | #define SETUP_FAIL_EVENT_QUEUE_NOT_EMPTY 2 |
RedBearLab | 0:075ea2812998 | 29 | #define SETUP_FAIL_TIMEOUT 3 |
RedBearLab | 0:075ea2812998 | 30 | #define SETUP_FAIL_NOT_SETUP_EVENT 4 |
RedBearLab | 0:075ea2812998 | 31 | #define SETUP_FAIL_NOT_COMMAND_RESPONSE 5 |
RedBearLab | 0:075ea2812998 | 32 | |
RedBearLab | 0:075ea2812998 | 33 | /** @brief Setup the nRF8001 device |
RedBearLab | 0:075ea2812998 | 34 | * @details |
RedBearLab | 0:075ea2812998 | 35 | * Performs ACI Setup by transmitting the setup messages generated by nRFgo Studio to the |
RedBearLab | 0:075ea2812998 | 36 | * nRF8001, and should be called when the nRF8001 starts or resets. |
RedBearLab | 0:075ea2812998 | 37 | * Once all messages are sent, the nRF8001 will send a Device Started Event. |
RedBearLab | 0:075ea2812998 | 38 | * The function requires that the Command queue is empty when it is invoked, and will fail |
RedBearLab | 0:075ea2812998 | 39 | * otherwise. |
RedBearLab | 0:075ea2812998 | 40 | * @returns An integer indicating the reason the function terminated |
RedBearLab | 0:075ea2812998 | 41 | */ |
RedBearLab | 0:075ea2812998 | 42 | uint8_t do_aci_setup(aci_state_t *aci_stat); |
RedBearLab | 0:075ea2812998 | 43 | |
RedBearLab | 0:075ea2812998 | 44 | #endif |