jim
16 years ago
6 changed files with
61 additions and
4 deletions
-
firmware/adc.c
-
firmware/adc.h
-
firmware/dac.c
-
firmware/dac.h
-
firmware/zoom.mcp
-
BIN
firmware/zoom.mcw
|
|
@@ -0,0 +1,17 @@ |
|
|
|
#include "config.h"
|
|
|
|
#include "adc.h"
|
|
|
|
|
|
|
|
/* Initialize ADC */
|
|
|
|
void adc_init(void)
|
|
|
|
{
|
|
|
|
// TODO (SPI)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Read the result of the previous
|
|
|
|
conversion and start a new one */
|
|
|
|
uint32_t adc_read(void)
|
|
|
|
{
|
|
|
|
// TODO.
|
|
|
|
// can we separate read/start conversion?
|
|
|
|
// unclear
|
|
|
|
} |
|
|
@@ -0,0 +1,11 @@ |
|
|
|
#ifndef ADC_H
|
|
|
|
#define ADC_H
|
|
|
|
|
|
|
|
/* Initialize ADC */
|
|
|
|
void adc_init(void);
|
|
|
|
|
|
|
|
/* Read the result of the previous
|
|
|
|
conversion and start a new one */
|
|
|
|
uint32_t adc_read(void);
|
|
|
|
|
|
|
|
#endif
|
|
|
@@ -0,0 +1,12 @@ |
|
|
|
#include "config.h"
|
|
|
|
#include "dac.h"
|
|
|
|
|
|
|
|
void dac_init(void)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
void dac_write(uint16_t val)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
} |
|
|
@@ -0,0 +1,9 @@ |
|
|
|
#ifndef DAC_H
|
|
|
|
#define DAC_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
void dac_init(void);
|
|
|
|
void dac_write(uint16_t val);
|
|
|
|
|
|
|
|
#endif
|
|
|
@@ -25,15 +25,23 @@ file_004=no |
|
|
|
file_005=no
|
|
|
|
file_006=no
|
|
|
|
file_007=no
|
|
|
|
file_008=no
|
|
|
|
file_009=no
|
|
|
|
file_010=no
|
|
|
|
file_011=no
|
|
|
|
[FILE_INFO]
|
|
|
|
file_000=zoom.c
|
|
|
|
file_001=config.c
|
|
|
|
file_002=uart.c
|
|
|
|
file_003=util.c
|
|
|
|
file_004=config.h
|
|
|
|
file_005=uart.h
|
|
|
|
file_006=util.h
|
|
|
|
file_007=p33fj256gp710.gld
|
|
|
|
file_004=dac.c
|
|
|
|
file_005=adc.c
|
|
|
|
file_006=config.h
|
|
|
|
file_007=uart.h
|
|
|
|
file_008=util.h
|
|
|
|
file_009=dac.h
|
|
|
|
file_010=adc.h
|
|
|
|
file_011=p33fj256gp710.gld
|
|
|
|
[SUITE_INFO]
|
|
|
|
suite_guid={479DDE59-4D56-455E-855E-FFF59A3DB57E}
|
|
|
|
suite_state=
|
|
|
|