Skip to content

Commit

Permalink
modificado: RPI_SmartServo/Framework/modules/adc.c
Browse files Browse the repository at this point in the history
	modificado: RPI_SmartServo/Framework/modules/adc.h
	modificado: RPI_SmartServo/Framework/modules/pid.c
	modificado: RPI_SmartServo/Framework/modules/pid.h
	modificado: RPI_SmartServo/Framework/modules/pwm.c
	modificado: RPI_SmartServo/Framework/modules/pwm.h
	modificado: RPI_SmartServo/Framework/modules/registers.c
	modificado: RPI_SmartServo/Framework/modules/registers.h
	modificado: RPI_SmartServo/Makefile
	modificado: RPI_SmartServo/config.h
	modificado: RPI_SmartServo/main.c
	RPI_SmartServo/Framework/modules/ads1115.c
	RPI_SmartServo/Framework/modules/ads1115.h
	RPI_SmartServo/Framework/modules/i2c.c
	RPI_SmartServo/Framework/modules/i2c.h
	RPI_SmartServo/Framework/modules/timer.c
	RPI_SmartServo/Framework/modules/timer.h
ads1116, i2c and timer modules added.
some changes in adc.
  • Loading branch information
jlamperez committed Mar 4, 2016
1 parent cc5a553 commit 99629aa
Show file tree
Hide file tree
Showing 31 changed files with 24,218 additions and 24,099 deletions.
1,222 changes: 611 additions & 611 deletions AVR_OpenServo_V3-dev/ATmega328_OpenServo.eep

Large diffs are not rendered by default.

1,222 changes: 611 additions & 611 deletions AVR_OpenServo_V3-dev/ATmega328_OpenServo.hex

Large diffs are not rendered by default.

14,162 changes: 7,081 additions & 7,081 deletions AVR_OpenServo_V3-dev/ATmega328_OpenServo.lss

Large diffs are not rendered by default.

2,188 changes: 1,094 additions & 1,094 deletions AVR_OpenServo_V3-dev/ATmega328_OpenServo.map

Large diffs are not rendered by default.

798 changes: 399 additions & 399 deletions AVR_OpenServo_V3-dev/step.c

Large diffs are not rendered by default.

156 changes: 78 additions & 78 deletions AVR_OpenServo_V3-dev/step.h
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
/*
Copyright (c) 2006 Michael P. Thompson <[email protected]>
Portions of this code
Copyright (c) 2007 Barry Carter <[email protected]>
Copyright (c) 2008 Jay Ragsdale <[email protected]>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
$Id$
*/

/*This is my attempt at porting the OpenServo_v3_dev branch to the tiny84 for use with the OpenStepper module.*/

#ifndef _OS_STEP_H_
#define _OS_STEP_H_ 1

#if STEP_ENABLED
#include <avr/io.h>
#include "registers.h"
#include "config.h"

void step_registers_defaults(void);
void step_init(void);
void step_update(uint16_t position, int16_t pwm);
void step_stop(void);

inline static void step_enable(void)
{
uint8_t flags_lo = registers_read_byte(REG_FLAGS_LO);

// Enable step sequencing to the stepper motor.
registers_write_byte(REG_FLAGS_LO, flags_lo | (1<<FLAGS_LO_PWM_ENABLED));
}


inline static void step_disable(void)
{
uint8_t flags_lo = registers_read_byte(REG_FLAGS_LO);

// Disable step sequencing to the stepper motor.
registers_write_byte(REG_FLAGS_LO, flags_lo & ~(1<<FLAGS_LO_PWM_ENABLED));

// Stop now!
step_stop();
}
#endif // keep these available as they are used in pwm-std.c

#if STEP_ENABLED || STEP_ENABLE_BRIDGE_PIN
inline static void step_enable_bridge(void)
{
STEP_ENABLE_PORT |= (1<<STEP_ENABLE_PIN);
}

inline static void step_disable_bridge(void)
{
STEP_ENABLE_PORT &= ~(1<<STEP_ENABLE_PIN);
}
#endif
#endif // _OS_STEP_H_
/*
Copyright (c) 2006 Michael P. Thompson <[email protected]>
Portions of this code
Copyright (c) 2007 Barry Carter <[email protected]>
Copyright (c) 2008 Jay Ragsdale <[email protected]>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
$Id$
*/

/*This is my attempt at porting the OpenServo_v3_dev branch to the tiny84 for use with the OpenStepper module.*/

#ifndef _OS_STEP_H_
#define _OS_STEP_H_ 1

#if STEP_ENABLED
#include <avr/io.h>
#include "registers.h"
#include "config.h"

void step_registers_defaults(void);
void step_init(void);
void step_update(uint16_t position, int16_t pwm);
void step_stop(void);

inline static void step_enable(void)
{
uint8_t flags_lo = registers_read_byte(REG_FLAGS_LO);

// Enable step sequencing to the stepper motor.
registers_write_byte(REG_FLAGS_LO, flags_lo | (1<<FLAGS_LO_PWM_ENABLED));
}


inline static void step_disable(void)
{
uint8_t flags_lo = registers_read_byte(REG_FLAGS_LO);

// Disable step sequencing to the stepper motor.
registers_write_byte(REG_FLAGS_LO, flags_lo & ~(1<<FLAGS_LO_PWM_ENABLED));

// Stop now!
step_stop();
}
#endif // keep these available as they are used in pwm-std.c

#if STEP_ENABLED || STEP_ENABLE_BRIDGE_PIN
inline static void step_enable_bridge(void)
{
STEP_ENABLE_PORT |= (1<<STEP_ENABLE_PIN);
}

inline static void step_disable_bridge(void)
{
STEP_ENABLE_PORT &= ~(1<<STEP_ENABLE_PIN);
}
#endif
#endif // _OS_STEP_H_
2 changes: 1 addition & 1 deletion AVR_OpenServo_V3/ATmega328_OpenServo.eep
Original file line number Diff line number Diff line change
@@ -1 +1 @@
:00000001FF
:00000001FF
Loading

0 comments on commit 99629aa

Please sign in to comment.