1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-24 19:21:35 +01:00

Added Utils::channel_to_mhz to convert channel to mhz frequency.

This commit is contained in:
Matias Fontanini
2011-08-23 12:01:59 -03:00
parent d7f1a59092
commit 730dcdea44
2 changed files with 12 additions and 1 deletions

View File

@@ -248,6 +248,10 @@ bool Tins::Utils::interface_id(const string &iface, uint32_t &id) {
return (((int32_t)id) != -1);
}
uint16_t Tins::Utils::channel_to_mhz(uint16_t channel) {
return 2407 + (channel * 5);
}
uint32_t Tins::Utils::crc32(uint8_t* data, uint32_t data_size) {
uint32_t i, crc = 0;
static uint32_t crc_table[] = {