firmware  v0.1.2
Chromation Spectrometer Dev-Kit
S13131-Hardware.h
Go to the documentation of this file.
1 
5 #ifndef _S13131_HARDWARE_H
6 #define _S13131_HARDWARE_H
7 #include <stdint.h>
8 #include <avr/io.h> // includes iom328p.h for hardware i/o values
9 #include "S13131.h"
10 
11 // ---Registers---
12 s13131_ptr S13131_ddr = &DDRD;
13 s13131_ptr S13131_port = &PORTD;
14 s13131_ptr S13131_pin = &PIND;
15 s13131_ptr S13131_TCCR0A = &TCCR0A; // PWM timer 0 ctrl reg A
16 s13131_ptr S13131_TCCR0B = &TCCR0B; // PWM timer 0 ctrl reg B
17 s13131_ptr S13131_TIFR0 = &TIFR0; // PWM timer 0 interrupt flags
18 s13131_ptr S13131_OCR0A = &OCR0A; // PWM period: fcpu/OCR0A
19 s13131_ptr S13131_OCR0B = &OCR0B; // PWM duty cycle: OCR0B/OCR0A
20 
21 // ---Pins---
22 s13131_pin S13131_Clk = PD5; // PWM (ZIF pin 4 - LIS_CLK)
23 s13131_pin S13131_St = PD6; // Start (ZIF pin 5 - LIS_RST)
24 s13131_pin S13131_Eos = PD7; // End of scan (ZIF pin 6 - LIS_SYNC)
25 
26 // ---Bits---
27 s13131_bit S13131_WGM00 = WGM00; // PWM
28 s13131_bit S13131_WGM01 = WGM01; // PWM
29 s13131_bit S13131_WGM02 = WGM02; // PWM
30 s13131_bit S13131_CS00 = CS00; // PWM
31 s13131_bit S13131_CS01 = CS01; // PWM
32 s13131_bit S13131_CS02 = CS02; // PWM
33 s13131_bit S13131_COM0B0 = COM0B0; // PWM
34 s13131_bit S13131_COM0B1 = COM0B1; // PWM
35 s13131_bit S13131_OCF0A = OCF0A; // PWM
36 s13131_bit S13131_OCF0B = OCF0B; // PWM
37 #endif // _S13131_HARDWARE_H