PAL driver implementations updated.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3065 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2011-06-20 19:03:17 +00:00
parent 2bae95e6cc
commit 971454dea3
16 changed files with 60 additions and 5 deletions

View File

@ -123,7 +123,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask, ioportmask_t mask,
uint_fast8_t mode) { uint_fast8_t mode) {
switch (mode & PAL_MODE_MASK) { switch (mode) {
case PAL_MODE_RESET: case PAL_MODE_RESET:
case PAL_MODE_INPUT_PULLUP: case PAL_MODE_INPUT_PULLUP:
port->PIO_PPUER = mask; port->PIO_PPUER = mask;

View File

@ -86,6 +86,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make * @details This type can be a scalar or some kind of pointer, do not make

View File

@ -89,7 +89,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask, ioportmask_t mask,
uint_fast8_t mode) { uint_fast8_t mode) {
switch (mode & PAL_MODE_MASK) { switch (mode) {
case PAL_MODE_RESET: case PAL_MODE_RESET:
case PAL_MODE_INPUT: case PAL_MODE_INPUT:
port->DIR &= ~mask; port->DIR &= ~mask;

View File

@ -93,6 +93,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
*/ */

View File

@ -89,7 +89,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask, ioportmask_t mask,
uint_fast8_t mode) { uint_fast8_t mode) {
switch (mode & PAL_MODE_MASK) { switch (mode) {
case PAL_MODE_RESET: case PAL_MODE_RESET:
case PAL_MODE_INPUT: case PAL_MODE_INPUT:
port->DIR &= ~mask; port->DIR &= ~mask;

View File

@ -93,6 +93,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
*/ */

View File

@ -89,6 +89,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
*/ */

View File

@ -134,6 +134,11 @@ typedef struct {
*/ */
typedef uint8_t ioportmask_t; typedef uint8_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint16_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make * @details This type can be a scalar or some kind of pointer, do not make

View File

@ -100,6 +100,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
*/ */

View File

@ -107,6 +107,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make * @details This type can be a scalar or some kind of pointer, do not make

View File

@ -69,7 +69,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask, ioportmask_t mask,
uint_fast8_t mode) { uint_fast8_t mode) {
switch (mode & PAL_MODE_MASK) { switch (mode) {
case PAL_MODE_RESET: case PAL_MODE_RESET:
case PAL_MODE_INPUT_PULLUP: case PAL_MODE_INPUT_PULLUP:
port->DDR &= ~mask; port->DDR &= ~mask;

View File

@ -86,6 +86,11 @@ typedef struct {
*/ */
typedef uint8_t ioportmask_t; typedef uint8_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint8_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
*/ */

View File

@ -69,7 +69,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask, ioportmask_t mask,
uint_fast8_t mode) { uint_fast8_t mode) {
switch (mode & PAL_MODE_MASK) { switch (mode) {
case PAL_MODE_RESET: case PAL_MODE_RESET:
case PAL_MODE_INPUT_PULLUP: case PAL_MODE_INPUT_PULLUP:
port->DDR &= ~mask; port->DDR &= ~mask;

View File

@ -84,6 +84,11 @@ typedef struct {
*/ */
typedef uint8_t ioportmask_t; typedef uint8_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint8_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
*/ */

View File

@ -100,6 +100,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
*/ */

View File

@ -68,6 +68,11 @@ typedef struct {
*/ */
typedef uint32_t ioportmask_t; typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/** /**
* @brief Port Identifier. * @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make * @details This type can be a scalar or some kind of pointer, do not make