btstack_audio.c (23a1bbc334545ae8d516834e2b13961ba2038f4a) btstack_audio.c (e39d945b26cebddb2e28a3ae932371da73f658f1)
1/*
2 * Copyright (C) 2017 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37
38#include "btstack_audio.h"
39
40/*
41 * btstack_audio.c
42 *
43 */
44
1/*
2 * Copyright (C) 2017 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37
38#include "btstack_audio.h"
39
40/*
41 * btstack_audio.c
42 *
43 */
44
45static const btstack_audio_t * btstack_audio_instance;
45static const btstack_audio_sink_t * btstack_audio_sink_instance;
46
46
47static const btstack_audio_source_t * btstack_audio_source_instance;
48
47/**
49/**
48 * @brief Get BTstack Audio Instance
49 * @returns btstack_audio implementation
50 * @brief Get BTstack Audio Sink Instance
51 * @returns btstack_audio_sink implementation
50 */
52 */
51const btstack_audio_t * btstack_audio_get_instance(void){
52 return btstack_audio_instance;
53const btstack_audio_sink_t * btstack_audio_sink_get_instance(void){
54 return btstack_audio_sink_instance;
53}
54
55/**
55}
56
57/**
56 * @brief Get BTstack Audio Instance
57 * @param btstack_audio implementation
58 * @brief Get BTstack Audio Source Instance
59 * @returns btstack_audio_source implementation
58 */
60 */
59void btstack_audio_set_instance(const btstack_audio_t * audio_impl){
60 btstack_audio_instance = audio_impl;
61const btstack_audio_source_t * btstack_audio_source_get_instance(void){
62 return btstack_audio_source_instance;
61}
63}
64
65/**
66 * @brief Get BTstack Audio Sink Instance
67 * @param btstack_audio_sink implementation
68 */
69void btstack_audio_sink_set_instance(const btstack_audio_sink_t * audio_sink_impl){
70 btstack_audio_sink_instance = audio_sink_impl;
71}
72
73/**
74 * @brief Get BTstack Audio Source Instance
75 * @param btstack_audio_source implementation
76 */
77void btstack_audio_source_set_instance(const btstack_audio_source_t * audio_source_impl){
78 btstack_audio_source_instance = audio_source_impl;
79}
80