Solution for Bluetooth SIG hands-on training course
Dependencies: BLE_API mbed-dev-bin nRF51822-bluetooth-mdw
Fork of microbit-dal-bluetooth-mdw_starter by
Diff: source/core/MicroBitFiber.cpp
- Revision:
- 41:da05ec75cd5d
- Parent:
- 25:27299423d813
--- a/source/core/MicroBitFiber.cpp Wed Jul 13 12:18:20 2016 +0100 +++ b/source/core/MicroBitFiber.cpp Wed Jul 13 12:18:21 2016 +0100 @@ -62,7 +62,7 @@ */ static EventModel *messageBus = NULL; -// Array of components which are iterated during idle thread execution, isIdleCallbackNeeded is polled during a systemTick. +// Array of components which are iterated during idle thread execution. static MicroBitComponent* idleThreadComponents[MICROBIT_IDLE_COMPONENTS]; /** @@ -874,21 +874,8 @@ * Adds a component to the array of idle thread components, which are processed * when the run queue is empty. * - * The system timer will poll isIdleCallbackNeeded on each component to determine - * if the scheduler should schedule the idle_task imminently. - * * @param component The component to add to the array. - * * @return MICROBIT_OK on success or MICROBIT_NO_RESOURCES if the fiber components array is full. - * - * @code - * MicroBitI2C i2c(I2C_SDA0, I2C_SCL0); - * - * // heap allocated - otherwise it will be paged out! - * MicroBitAccelerometer* accelerometer = new MicroBitAccelerometer(i2c); - * - * fiber_add_idle_component(accelerometer); - * @endcode */ int fiber_add_idle_component(MicroBitComponent *component) { @@ -906,22 +893,10 @@ } /** - * Remove a component from the array of idle thread components - * - * @param component The component to remove from the idle component array. - * - * @return MICROBIT_OK on success. MICROBIT_INVALID_PARAMETER is returned if the given component has not been previously added. + * remove a component from the array of idle thread components * - * @code - * MicroBitI2C i2c(I2C_SDA0, I2C_SCL0); - * - * // heap allocated - otherwise it will be paged out! - * MicroBitAccelerometer* accelerometer = new MicroBitAccelerometer(i2c); - * - * fiber_add_idle_component(accelerometer); - * - * fiber_remove_idle_component(accelerometer); - * @endcode + * @param component the component to remove from the idle component array. + * @return MICROBIT_OK on success. MICROBIT_INVALID_PARAMETER is returned if the given component has not been previously added. */ int fiber_remove_idle_component(MicroBitComponent *component) {