CARME-M4 BSP  V1.5
carme_io2.c File Reference

CARME IO2 extension module board support package. More...

#include <stm32f4xx.h>
#include <carme.h>
#include <carme_io2.h>
+ Include dependency graph for carme_io2.c:

Go to the source code of this file.

Functions

void CARME_IO2_Init (void)
 CARME IO2 initialization. More...
 
void CARME_IO2_GPIO_OUT_Settings (uint8_t pin, CARME_IO2_GPIO_OUT_MODE mode)
 Configure the CARME IO2 GPIO Out 0..2 as GPIO or PWM. More...
 
void CARME_IO2_ADC_Get (CARME_IO2_ADC_CHANNEL channel, uint16_t *pValue)
 Get the value of an ADC channel. More...
 
void CARME_IO2_DAC_Set (CARME_IO2_DAC_CHANNEL channel, uint16_t Value)
 Set the value of an DAC channel. More...
 
void CARME_IO2_SPI_Select (CARME_IO2_SPI_CHANNEL select)
 Select the peripheral SPI chip. More...
 
void CARME_IO2_SPI_CS_Out (uint8_t cs)
 Generate the chip select pin. More...
 
void CARME_IO2_SPI_Send (uint16_t data)
 Send a half word over the SPI port. More...
 
void CARME_IO2_SPI_Receive (uint16_t *pValue)
 Receive a half word from the SPI input buffer. More...
 
void CARME_IO2_PWM_Settings (TIM_TimeBaseInitTypeDef *pTIM_TimeBaseStruct)
 Set the PWM time base settings. More...
 
ERROR_CODES CARME_IO2_PWM_Set (CARME_IO2_PWM_CHANNEL channel, uint16_t value)
 Set the PWM time base settings. More...
 
void CARME_IO2_PWM_Phase (CARME_IO2_PWM_PHASE dir)
 Set the DC motor direction. More...
 
void CARME_IO2_GPIO_IN_Get (uint8_t *pStatus)
 Get the GPIO In 0..3 value. More...
 
void CARME_IO2_GPIO_OUT_Set (uint8_t Status)
 Set the GPIO Out 0..3 value. More...
 
void CARME_IO2_OPTO_IN_Get (uint8_t *pStatus)
 Get the OPTO In 0..1 value. More...
 
void CARME_IO2_OPTO_OUT_Set (uint8_t Status)
 Set the OPTO Out 0..1 value. More...
 

Variables

static CARME_Port_Pin_t CARME_IO2_Port_Pin []
 CARME IO2 Port and Pin association. More...
 
static CARME_Port_Pin_t CARME_IO2_GPIO_Out_Port_Pin []
 CARME IO2 GPIO Out Port and Pin association. More...
 
static CARME_Port_Pin_t CARME_IO2_OPTO_Out_Port_Pin []
 CARME IO2 OPTO Out Port and Pin association. More...
 
static CARME_Port_Pin_t CARME_IO2_OPTO_In_Port_Pin []
 CARME IO2 OPTO In Port and Pin association. More...
 
static uint8_t CARME_IO2_ADC_Channels []
 CARME IO2 ADC channel list. More...
 

Detailed Description

CARME IO2 extension module board support package.

Version
1.0
Date
2013-01-09
Author
rct1

This software can be used by students and other personal of the Bern University of Applied Sciences under the terms of the MIT license. For other persons this software is under the terms of the GNU General Public License version 2.

Copyright © 2013, Bern University of Applied Sciences. All rights reserved.

MIT License

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.

GNU GENERAL PUBLIC LICENSE

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 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition in file carme_io2.c.