circuitpython/ports/nrf/background.c

69 lines
2.0 KiB
C
Raw Normal View History

2018-07-10 11:49:51 -04:00
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "background.h"
#include "py/runtime.h"
2019-03-20 12:21:36 -04:00
#include "supervisor/filesystem.h"
2021-11-10 12:26:54 -05:00
#include "supervisor/port.h"
#include "supervisor/shared/stack.h"
2021-11-10 12:26:54 -05:00
#include "supervisor/usb.h"
2019-06-06 17:49:32 -04:00
#if CIRCUITPY_DISPLAYIO
#include "shared-module/displayio/__init__.h"
#endif
#if CIRCUITPY_AUDIOBUSIO
#include "common-hal/audiobusio/I2SOut.h"
#endif
#if CIRCUITPY_AUDIOPWMIO
#include "common-hal/audiopwmio/PWMAudioOut.h"
#endif
void port_start_background_tick(void) {
2021-03-15 09:57:36 -04:00
}
void port_finish_background_tick(void) {
2021-03-15 09:57:36 -04:00
}
void port_background_tick(void) {
2021-03-15 09:57:36 -04:00
#if CIRCUITPY_AUDIOPWMIO
audiopwmout_background();
2021-03-15 09:57:36 -04:00
#endif
#if CIRCUITPY_AUDIOBUSIO
i2s_background();
2021-03-15 09:57:36 -04:00
#endif
}
// Allow boards to override this.
MP_WEAK void board_background_task(void) {
}
void port_background_task(void) {
board_background_task();
}