* File addition for PWM.

* updated port apis for variable (start) data type change.
pull/1297/head
akhilpanayam 2015-07-16 17:48:14 +05:30 committed by Karthik Purushothaman
parent c47f60bb23
commit ef2b6cfd66
4 changed files with 69 additions and 7 deletions

View File

@ -42,7 +42,7 @@
#define DEVICE_ETHERNET 0
#define DEVICE_PWMOUT 0
#define DEVICE_PWMOUT 1
#define DEVICE_SEMIHOST 0
#define DEVICE_LOCALFILESYSTEM 0

View File

@ -67,9 +67,9 @@ struct analogin_s {
struct adc_module adc_instance;
struct adc_config config_adc;
};
/*
struct pwmout_s {
};*/
};
struct spi_s {
Sercom *spi;

View File

@ -44,7 +44,7 @@ void port_init(port_t *obj, PortName port, int mask, PinDirection dir)
MBED_ASSERT(obj);
struct port_config pin_conf;
int i, j;
uint32_t start;
int start;
PortGroup *const port_base = (PortGroup*)port_get_group_from_gpio_pin(port * 32); // 32 pins in port // function reused to get the port base
switch (port) {
@ -92,7 +92,7 @@ void port_mode(port_t *obj, PinMode mode)
{
MBED_ASSERT(obj);
int i, j;
uint32_t start;
int start;
start = start_pin(obj->port);
if(start == NC)
return;
@ -108,7 +108,7 @@ void port_dir(port_t *obj, PinDirection dir)
MBED_ASSERT(obj);
struct port_config pin_conf;
int i, j;
uint32_t start;
int start;
start = start_pin(obj->port);
if(start == NC)
return;
@ -137,7 +137,7 @@ void port_write(port_t *obj, int value)
{
MBED_ASSERT(obj);
int i;
uint32_t start;
int start;
start = start_pin(obj->port);
if(start == NC)
return;

View File

@ -0,0 +1,62 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mbed_assert.h"
#include "pwmout_api.h"
#include "cmsis.h"
#include "pinmap.h"
#include "PeripheralPins.h"
void pwmout_init(pwmout_t* obj, PinName pin)
{
}
void pwmout_free(pwmout_t* obj)
{
}
void pwmout_write(pwmout_t* obj, float value)
{
}
float pwmout_read(pwmout_t* obj)
{
}
void pwmout_period(pwmout_t* obj, float seconds)
{
}
void pwmout_period_ms(pwmout_t* obj, int ms)
{
}
void pwmout_period_us(pwmout_t* obj, int us)
{
}
void pwmout_pulsewidth(pwmout_t* obj, float seconds)
{
}
void pwmout_pulsewidth_ms(pwmout_t* obj, int ms)
{
}
void pwmout_pulsewidth_us(pwmout_t* obj, int us)
{
}