1*d00ab9e3SMatthias Ringwald /* 2*d00ab9e3SMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 3*d00ab9e3SMatthias Ringwald * 4*d00ab9e3SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5*d00ab9e3SMatthias Ringwald * modification, are permitted provided that the following conditions 6*d00ab9e3SMatthias Ringwald * are met: 7*d00ab9e3SMatthias Ringwald * 8*d00ab9e3SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9*d00ab9e3SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10*d00ab9e3SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11*d00ab9e3SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12*d00ab9e3SMatthias Ringwald * documentation and/or other materials provided with the distribution. 13*d00ab9e3SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14*d00ab9e3SMatthias Ringwald * contributors may be used to endorse or promote products derived 15*d00ab9e3SMatthias Ringwald * from this software without specific prior written permission. 16*d00ab9e3SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17*d00ab9e3SMatthias Ringwald * personal benefit and not for any commercial purpose or for 18*d00ab9e3SMatthias Ringwald * monetary gain. 19*d00ab9e3SMatthias Ringwald * 20*d00ab9e3SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21*d00ab9e3SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*d00ab9e3SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*d00ab9e3SMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 24*d00ab9e3SMatthias Ringwald * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25*d00ab9e3SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26*d00ab9e3SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27*d00ab9e3SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28*d00ab9e3SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29*d00ab9e3SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30*d00ab9e3SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31*d00ab9e3SMatthias Ringwald * SUCH DAMAGE. 32*d00ab9e3SMatthias Ringwald * 33*d00ab9e3SMatthias Ringwald * Please inquire about commercial licensing options at 34*d00ab9e3SMatthias Ringwald * [email protected] 35*d00ab9e3SMatthias Ringwald * 36*d00ab9e3SMatthias Ringwald */ 37*d00ab9e3SMatthias Ringwald 38*d00ab9e3SMatthias Ringwald /* 39*d00ab9e3SMatthias Ringwald * Adapter to use da14581-based chipsets with BTstack 40*d00ab9e3SMatthias Ringwald * 41*d00ab9e3SMatthias Ringwald */ 42*d00ab9e3SMatthias Ringwald 43*d00ab9e3SMatthias Ringwald #ifndef BTSTACK_CHIPSET_DA145XX_H 44*d00ab9e3SMatthias Ringwald #define BTSTACK_CHIPSET_DA145XX_H 45*d00ab9e3SMatthias Ringwald 46*d00ab9e3SMatthias Ringwald #if defined __cplusplus 47*d00ab9e3SMatthias Ringwald extern "C" { 48*d00ab9e3SMatthias Ringwald #endif 49*d00ab9e3SMatthias Ringwald 50*d00ab9e3SMatthias Ringwald #include "btstack_chipset.h" 51*d00ab9e3SMatthias Ringwald #include "btstack_uart_block.h" 52*d00ab9e3SMatthias Ringwald 53*d00ab9e3SMatthias Ringwald /** 54*d00ab9e3SMatthias Ringwald * @brief get chipset instance 55*d00ab9e3SMatthias Ringwald */ 56*d00ab9e3SMatthias Ringwald const btstack_chipset_t * btstack_chipset_da145xx_instance(void); 57*d00ab9e3SMatthias Ringwald 58*d00ab9e3SMatthias Ringwald /** 59*d00ab9e3SMatthias Ringwald * @brief Download firmware via btstack_uart_t implementation 60*d00ab9e3SMatthias Ringwald * @param uart_driver -- already initialized 61*d00ab9e3SMatthias Ringwald * @param done callback. 0 = Success 62*d00ab9e3SMatthias Ringwald */ 63*d00ab9e3SMatthias Ringwald void btstack_chipset_da145xx_download_firmware_with_uart(const btstack_uart_t * uart_driver, const uint8_t * fw, uint16_t fw_size, void (*done)(int result)); 64*d00ab9e3SMatthias Ringwald 65*d00ab9e3SMatthias Ringwald /** 66*d00ab9e3SMatthias Ringwald * @brief Download firmware via btstack_uart_block_t implementation 67*d00ab9e3SMatthias Ringwald * @param uart_driver -- already initialized 68*d00ab9e3SMatthias Ringwald * @param done callback. 0 = Success 69*d00ab9e3SMatthias Ringwald * @deprecated please use btstack_chipset_da145xx_download_firmware_with_uart instead 70*d00ab9e3SMatthias Ringwald */ 71*d00ab9e3SMatthias Ringwald void btstack_chipset_da145xx_download_firmware(const btstack_uart_block_t * uart_driver, const uint8_t * fw, uint16_t fw_size, void (*done)(int result)); 72*d00ab9e3SMatthias Ringwald 73*d00ab9e3SMatthias Ringwald #if defined __cplusplus 74*d00ab9e3SMatthias Ringwald } 75*d00ab9e3SMatthias Ringwald #endif 76*d00ab9e3SMatthias Ringwald 77*d00ab9e3SMatthias Ringwald #endif // BTSTACK_CHIPSET_DA14581_H 78