[Armadeus-commitlog] armadeus branch, master, updated. release-3.4-219-ga52f478
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2011-06-22 16:12:54
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a52f4784714ed961b9697c538e36387f96b46029 (commit)
via ed0899b62e13d89deb6cb4bfb6bf5e99a07cb948 (commit)
via b9f9ac0c43275207ede6f94c0d5221b3652409e3 (commit)
from 18af4bc2ad309cab9a7ba7c8df87d20c624ef066 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a52f4784714ed961b9697c538e36387f96b46029
Merge: ed0899b62e13d89deb6cb4bfb6bf5e99a07cb948 18af4bc2ad309cab9a7ba7c8df87d20c624ef066
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 22 18:12:17 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit ed0899b62e13d89deb6cb4bfb6bf5e99a07cb948
Author: Kevin JOLY <jol...@gm...>
Date: Wed Jun 22 17:55:02 2011 +0200
Rename some functions in mcp25020_ctrl and add GPL licence
Signed-off-by: Kevin JOLY <jol...@gm...>
Signed-off-by: Fabien Marteau <fab...@ar...>
commit b9f9ac0c43275207ede6f94c0d5221b3652409e3
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 22 17:59:58 2011 +0200
[buildroot][package][straton_ios] adding message when close io
-----------------------------------------------------------------------
Summary of changes:
target/demos/mcp25020_ctrl/mcp25020_ctrl.c | 37 ++++++++++++++++++++++------
target/packages/straton_ios/straton_ios.c | 1 +
2 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/target/demos/mcp25020_ctrl/mcp25020_ctrl.c b/target/demos/mcp25020_ctrl/mcp25020_ctrl.c
index fb964a3..e4c3bdd 100644
--- a/target/demos/mcp25020_ctrl/mcp25020_ctrl.c
+++ b/target/demos/mcp25020_ctrl/mcp25020_ctrl.c
@@ -1,3 +1,24 @@
+/*
+ * Drive a Microchip mcp25020 through CAN bus with Armadeus APF
+ *
+ * Copyright (C) 2011 <jol...@gm...>
+ * Armadeus Systems
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -26,7 +47,7 @@
#define LED_ON 0x00
void listen_mode(int can_socket);
-void led_flash(int can_socket, int interval);
+void led_blink(int can_socket, int interval);
void set_led_state(int can_socket, int state);
void sw2_get(int can_socket);
void read_config(int can_socket);
@@ -75,19 +96,19 @@ int main(int argc, char **argv)
if (strcmp(argv[1], "listen") == 0) {
listen_mode(can_socket);/* Entering in listen mode */
- } else if(strcmp(argv[1], "led-flash") == 0) {
+ } else if(strcmp(argv[1], "led-blink") == 0) {
if (argc < 3) {
- printf("led-flash : Please specify the flashing interval in ms (1 to 10000)\n");
+ printf("led-blink : Please specify the blinking interval in ms (1 to 10000)\n");
return EXIT_SUCCESS;
}
if ((atoi(argv[2]) < 1) || (atoi(argv[2]) > 10000)) {
- printf("led-flash : Please specify the flashing interval in ms (1 to 10000)\n");
+ printf("led-blink : Please specify the blinking interval in ms (1 to 10000)\n");
return EXIT_SUCCESS;
}
- led_flash(can_socket, atoi(argv[2]));/* Entering in led flashing mode */
+ led_blink(can_socket, atoi(argv[2]));/* Entering in led blinking mode */
} else if(strcmp(argv[1], "led-state") == 0) {
if (argc < 3) {
@@ -142,7 +163,7 @@ void listen_mode(int can_socket)
}
}
-void led_flash(int can_socket, int interval)
+void led_blink(int can_socket, int interval)
{
struct can_frame frameToSend;
@@ -156,7 +177,7 @@ void led_flash(int can_socket, int interval)
frameToSend.data[2] ^= 0x10; /* Invert the output bit of the LED */
if (write(can_socket, &frameToSend, sizeof(frameToSend)) != sizeof(frameToSend)) {
- perror("led_flash write");
+ perror("led_blink write");
return;
}
@@ -277,7 +298,7 @@ void display_help()
printf("This sofware is a demonstration. It show how to communicate with a MICROCHIP MCP25020 using the can bus with socketCAN\n\n");
printf("USE: can_mcp25020 [TEST]\nTEST are:\n");
printf("\tlisten : Listen on the can bus\n");
- printf("\tled-flash [INTERVAL]: flash the D6 led. You must specify the flashing interval in ms (1 to 10000 ms)\n");
+ printf("\tled-blink [INTERVAL]: blink the D6 led. You must specify the blinking interval in ms (1 to 10000 ms)\n");
printf("\tled-state [ON | OFF]: turn the D6 led on the specified state (ON or OFF)\n");
printf("\tsw2-get : get the value of the switch SW2\n");
printf("\tCONFIG : get the value of several config registers\n\n");
diff --git a/target/packages/straton_ios/straton_ios.c b/target/packages/straton_ios/straton_ios.c
index 3a2196f..7bbc339 100755
--- a/target/packages/straton_ios/straton_ios.c
+++ b/target/packages/straton_ios/straton_ios.c
@@ -47,6 +47,7 @@ error:
}
void straton_ios_close(void) {
+ printf("Straton_ios: close\n");
/* close BUTTON */
as_gpio_close(button);
/* close LED */
hooks/post-receive
--
armadeus
|