mirror of
https://github.com/g4klx/MMDVM_HS.git
synced 2026-04-05 06:25:09 +00:00
Some minor changes in delay functions
This commit is contained in:
parent
587fe63a47
commit
66fe701251
5 changed files with 22 additions and 12 deletions
15
ADF7021.cpp
15
ADF7021.cpp
|
|
@ -1,6 +1,9 @@
|
|||
/*
|
||||
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
||||
* Copyright (C) 2016, 2017 by Andy Uribe CA6JAU
|
||||
*
|
||||
* Some of the code is based on work of Guus Van Dooren PE1PLM:
|
||||
* https://github.com/ki6zum/gmsk-dstar/blob/master/firmware/dvmega/dvmega.ino
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -29,12 +32,6 @@
|
|||
volatile uint32_t AD7021_control_byte;
|
||||
volatile int AD7021_counter;
|
||||
|
||||
void dlybit(void)
|
||||
{
|
||||
volatile unsigned int delay;
|
||||
for(delay = 0;delay<5;delay++);
|
||||
}
|
||||
|
||||
void Send_AD7021_control()
|
||||
{
|
||||
for(AD7021_counter = 31; AD7021_counter >= 0; AD7021_counter--) {
|
||||
|
|
@ -43,14 +40,14 @@ void Send_AD7021_control()
|
|||
else
|
||||
io.SDATA_pin(LOW);
|
||||
|
||||
io.dlybit();
|
||||
io.SCLK_pin(HIGH);
|
||||
dlybit();
|
||||
io.dlybit();
|
||||
io.SCLK_pin(LOW);
|
||||
dlybit();
|
||||
}
|
||||
|
||||
io.SLE_pin(HIGH);
|
||||
dlybit();
|
||||
io.dlybit();
|
||||
io.SLE_pin(LOW);
|
||||
io.SDATA_pin(LOW);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue