Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers channel_list.h Source File

channel_list.h

00001 /*
00002  * Copyright (c) 2015-2018, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef __CHANNEL_LIST_H__
00019 #define __CHANNEL_LIST_H__
00020 
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00025 /**
00026  * Get channel number using channel index.
00027  *
00028  * @param list to scan
00029  * @param channel index
00030  *
00031  * @return channel number
00032  */
00033 uint8_t channel_list_get_channel(const uint32_t *list, int current_index);
00034 /**
00035  * set matching bit on in in channel mask.
00036  *
00037  * @param list channel mask
00038  * @param channel channel number
00039  * @param active set the channel on if true, disable channel if false.
00040  *
00041  * @return channel number
00042  */
00043 void channel_list_set_channel(uint32_t *list, int channel, bool active);
00044 
00045 /**
00046  * Count the amount of channels enabled in a list.
00047  *
00048  * @param list to scan
00049  * @return amount of bits set in the channel masks
00050  */
00051 int channel_list_count_channels(const uint32_t *list);
00052 
00053 
00054 #ifdef __cplusplus
00055 }
00056 #endif
00057 #endif // !__CHANNEL_LIST_H__