ad98xx readme and missing deps
This commit is contained in:
parent
c5e6e28e6f
commit
569436d880
3 changed files with 33 additions and 0 deletions
12
ad9850/README.md
Normal file
12
ad9850/README.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
AD98xx
|
||||||
|
--------
|
||||||
|
|
||||||
|
This library doesn't use SPI, just regular GPIO: this is simpler (imho) to implement and understand, and gives
|
||||||
|
you freedom to use whichever pin you prefer.
|
||||||
|
|
||||||
|
Notes
|
||||||
|
-------
|
||||||
|
Support for ad9833 is completely lacking (despite some code you might find).
|
||||||
|
|
||||||
|
I am uncertain about ad9850/1: the two are similar, and I have some difficulties understanding which do I
|
||||||
|
have. However, I think the implementation is correct.
|
17
ad9850/gpio_utils.c
Normal file
17
ad9850/gpio_utils.c
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <libopencm3/stm32/gpio.h>
|
||||||
|
|
||||||
|
#include "gpio_utils.h"
|
||||||
|
|
||||||
|
void gpio_pulseHigh( uint32_t gpioport, uint16_t gpios) {
|
||||||
|
gpio_set(gpioport, gpios);
|
||||||
|
for (int x = 0; x < 1000; x++) __asm__("nop");
|
||||||
|
gpio_clear(gpioport, gpios);
|
||||||
|
}
|
||||||
|
|
||||||
|
void gpio_pulseLow( uint32_t gpioport, uint16_t gpios) {
|
||||||
|
gpio_clear(gpioport, gpios);
|
||||||
|
for (int x = 0; x < 1000; x++) __asm__("nop");
|
||||||
|
gpio_set(gpioport, gpios);
|
||||||
|
}
|
4
ad9850/gpio_utils.h
Normal file
4
ad9850/gpio_utils.h
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
void gpio_pulseHigh( uint32_t gpioport, uint16_t gpios);
|
||||||
|
void gpio_pulseLow( uint32_t gpioport, uint16_t gpios);
|
Loading…
Reference in a new issue