diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-23 09:44:36 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-23 09:44:36 +0000 |
commit | 4a63f14ecb4bcc4bfc0c0a25c4e1455e599144a4 (patch) | |
tree | d644879326c7152de5fce9a4c28455fc203c0a49 /testhal/STM32F4xx/GPT/main.c | |
parent | 19745e5d5857dad5ed80ad3465434a9cfc5f5b65 (diff) | |
download | ChibiOS-4a63f14ecb4bcc4bfc0c0a25c4e1455e599144a4.tar.gz ChibiOS-4a63f14ecb4bcc4bfc0c0a25c4e1455e599144a4.tar.bz2 ChibiOS-4a63f14ecb4bcc4bfc0c0a25c4e1455e599144a4.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6211 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F4xx/GPT/main.c')
-rw-r--r-- | testhal/STM32F4xx/GPT/main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/testhal/STM32F4xx/GPT/main.c b/testhal/STM32F4xx/GPT/main.c index a95d5fe81..2d01d31ff 100644 --- a/testhal/STM32F4xx/GPT/main.c +++ b/testhal/STM32F4xx/GPT/main.c @@ -20,13 +20,13 @@ /*
* GPT2 callback.
*/
-static void gpt2cb(GPTDriver *gptp) {
+static void gpt4cb(GPTDriver *gptp) {
(void)gptp;
palSetPad(GPIOD, GPIOD_LED5);
- chSysLockFromIsr();
+ chSysLockFromISR();
gptStartOneShotI(&GPTD3, 1000); /* 0.1 second pulse.*/
- chSysUnlockFromIsr();
+ chSysUnlockFromISR();
}
/*
@@ -41,9 +41,9 @@ static void gpt3cb(GPTDriver *gptp) { /*
* GPT2 configuration.
*/
-static const GPTConfig gpt2cfg = {
+static const GPTConfig gpt4cfg = {
10000, /* 10kHz timer clock.*/
- gpt2cb, /* Timer callback.*/
+ gpt4cb, /* Timer callback.*/
0
};
@@ -74,8 +74,8 @@ int main(void) { /*
* Initializes the GPT drivers 2 and 3.
*/
- gptStart(&GPTD2, &gpt2cfg);
- gptPolledDelay(&GPTD2, 10); /* Small delay.*/
+ gptStart(&GPTD4, &gpt4cfg);
+ gptPolledDelay(&GPTD4, 10); /* Small delay.*/
gptStart(&GPTD3, &gpt3cfg);
gptPolledDelay(&GPTD3, 10); /* Small delay.*/
@@ -85,12 +85,12 @@ int main(void) { */
while (TRUE) {
palSetPad(GPIOD, GPIOD_LED4);
- gptStartContinuous(&GPTD2, 5000);
+ gptStartContinuous(&GPTD4, 5000);
chThdSleepMilliseconds(5000);
- gptStopTimer(&GPTD2);
+ gptStopTimer(&GPTD4);
palClearPad(GPIOD, GPIOD_LED4);
- gptStartContinuous(&GPTD2, 2500);
+ gptStartContinuous(&GPTD4, 2500);
chThdSleepMilliseconds(5000);
- gptStopTimer(&GPTD2);
+ gptStopTimer(&GPTD4);
}
}
|