takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

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 /**
00036  * Count the amount of channels enabled in a list.
00037  *
00038  * @param list to scan
00039  * @return amount of bits set in the channel masks
00040  */
00041 int channel_list_count_channels(const uint32_t* list);
00042 
00043 
00044 #ifdef __cplusplus
00045 }
00046 #endif
00047 #endif // !__CHANNEL_LIST_H__