comparison pwm.cpp @ 1:7b2d0a758e63

Add pcb and finish i2c slave
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Tue, 12 Jan 2016 22:28:22 +0100
parents 2b5078b37907
children
comparison
equal deleted inserted replaced
0:2b5078b37907 1:7b2d0a758e63
72 * equivalents, with DDRX at the next address after PORTX. This is valid for 72 * equivalents, with DDRX at the next address after PORTX. This is valid for
73 * all the chips I have looked at; however, it is highly recommended that you 73 * all the chips I have looked at; however, it is highly recommended that you
74 * check any new chips which you want to use this library with. 74 * check any new chips which you want to use this library with.
75 */ 75 */
76 void pwm_init(volatile uint8_t *ports[], 76 void pwm_init(volatile uint8_t *ports[],
77 uint8_t pins[], 77 uint8_t pins[],
78 uint8_t count, 78 uint8_t count,
79 uint32_t period) { 79 uint32_t period) {
80 80
81 _count = (count <= PWM_MAX_PINS ? count : PWM_MAX_PINS); 81 _count = (count <= PWM_MAX_PINS ? count : PWM_MAX_PINS);
82 82
83 //Store values 83 //Store values
84 for (uint8_t i = 0; i < _count; i++){ 84 for (uint8_t i = 0; i < _count; i++){