MIOS32_BOARD

Defines

#define J5_NUM_PINS   0
#define J10_NUM_PINS   0
#define J28_NUM_PINS   0
#define J15_AVAILABLE   0
#define J5_NUM_PINS   0
#define J10_NUM_PINS   0
#define J28_NUM_PINS   0
#define J15_AVAILABLE   0
#define J5_NUM_PINS   0
#define J10_NUM_PINS   0
#define J28_NUM_PINS   0
#define J15_AVAILABLE   0

Functions

s32 MIOS32_BOARD_Init (u32 mode)
s32 MIOS32_BOARD_LED_Init (u32 leds)
s32 MIOS32_BOARD_LED_Set (u32 leds, u32 value)
u32 MIOS32_BOARD_LED_Get (void)
s32 MIOS32_BOARD_J5_PinInit (u8 pin, mios32_board_pin_mode_t mode)
s32 MIOS32_BOARD_J5_Set (u16 value)
s32 MIOS32_BOARD_J5_PinSet (u8 pin, u8 value)
s32 MIOS32_BOARD_J5_Get (void)
s32 MIOS32_BOARD_J5_PinGet (u8 pin)
s32 MIOS32_BOARD_J10_PinInit (u8 pin, mios32_board_pin_mode_t mode)
s32 MIOS32_BOARD_J10_Set (u16 value)
s32 MIOS32_BOARD_J10_PinSet (u8 pin, u8 value)
s32 MIOS32_BOARD_J10_Get (void)
s32 MIOS32_BOARD_J10_PinGet (u8 pin)
s32 MIOS32_BOARD_J10A_Get (void)
s32 MIOS32_BOARD_J10A_Set (u8 value)
s32 MIOS32_BOARD_J10B_Get (void)
s32 MIOS32_BOARD_J10B_Set (u8 value)
s32 MIOS32_BOARD_J28_PinInit (u8 pin, mios32_board_pin_mode_t mode)
s32 MIOS32_BOARD_J28_Set (u16 value)
s32 MIOS32_BOARD_J28_PinSet (u8 pin, u8 value)
s32 MIOS32_BOARD_J28_Get (void)
s32 MIOS32_BOARD_J28_PinGet (u8 pin)
s32 MIOS32_BOARD_J15_PortInit (u32 mode)
s32 MIOS32_BOARD_J15_DataSet (u8 data)
s32 MIOS32_BOARD_J15_SerDataShift (u8 data)
s32 MIOS32_BOARD_J15_RS_Set (u8 rs)
s32 MIOS32_BOARD_J15_RW_Set (u8 rw)
s32 MIOS32_BOARD_J15_E_Set (u8 lcd, u8 e)
s32 MIOS32_BOARD_J15_GetD7In (void)
s32 MIOS32_BOARD_J15_D7InPullUpEnable (u8 enable)
s32 MIOS32_BOARD_J15_PollUnbusy (u8 lcd, u32 time_out)
s32 MIOS32_BOARD_DAC_PinInit (u8 chn, u8 enable)
s32 MIOS32_BOARD_DAC_PinSet (u8 chn, u16 value)

Detailed Description

Development Board specific functions for MIOS32


Define Documentation

#define J10_NUM_PINS   0
#define J10_NUM_PINS   0
#define J10_NUM_PINS   0
#define J15_AVAILABLE   0
#define J15_AVAILABLE   0
#define J15_AVAILABLE   0
#define J28_NUM_PINS   0
#define J28_NUM_PINS   0
#define J28_NUM_PINS   0
#define J5_NUM_PINS   0
#define J5_NUM_PINS   0
#define J5_NUM_PINS   0

Function Documentation

s32 MIOS32_BOARD_DAC_PinInit ( u8  chn,
u8  enable 
)

This function enables or disables one of the two DAC channels provided by STM32F103RE (and not by STM32F103RB).

  • the first channel (chn == 0) is output at pin RA4 (J16:RC1 of the MBHP_CORE_STM32 module)
  • the second channel (chn == 1) is output at pin RA5 (J16:SC of the MBHP_CORE_STM32 module)
Parameters:
[in] chn channel number (0 or 1)
[in] enable 0: channel disabled, 1: channel enabled.
Returns:
< 0 if DAC channel not supported (e.g. STM32F103RB)
s32 MIOS32_BOARD_DAC_PinSet ( u8  chn,
u16  value 
)

This function sets an output channel to a given 16-bit value.

Note that actually the DAC will work at 12-bit resolution. The lowest 4 bits are ignored (reserved for future STM chips).

Parameters:
[in] chn channel number (0 or 1)
[in] value the 16-bit value (0..65535). Lowest 4 bits are ignored.
Returns:
< 0 if DAC channel not supported (e.g. STM32F103RB)
s32 MIOS32_BOARD_Init ( u32  mode  ) 

Initializes MIOS32_BOARD driver

Parameters:
[in] mode currently only mode 0 supported
Returns:
< 0 if initialisation failed
s32 MIOS32_BOARD_J10_Get ( void   ) 

This function returns the state of all pins of J10

Returns:
8 bits which are forwarded from J10

This function returns the state of all pins of J10

Returns:
16 bits which are forwarded from J10
s32 MIOS32_BOARD_J10_PinGet ( u8  pin  ) 

This function returns the state of a single pin of J10

Parameters:
[in] pin the pin number (0..7)
Returns:
< 0 if pin not available
>= 0: input state of pin

This function returns the state of a single pin of J10

Parameters:
[in] pin the pin number (0..15)
Returns:
< 0 if pin not available
>= 0: input state of pin
s32 MIOS32_BOARD_J10_PinInit ( u8  pin,
mios32_board_pin_mode_t  mode 
)

Initializes a J10 pin

Parameters:
[in] pin the pin number (0..7)
[in] mode the pin mode

  • MIOS32_BOARD_PIN_MODE_IGNORE: configuration shouldn't be touched
  • MIOS32_BOARD_PIN_MODE_ANALOG: select analog input mode (default)
  • MIOS32_BOARD_PIN_MODE_INPUT: pin is used as input w/o pull device (floating)
  • MIOS32_BOARD_PIN_MODE_INPUT_PD: pin is used as input, internal pull down enabled
  • MIOS32_BOARD_PIN_MODE_INPUT_PU: pin is used as input, internal pull up enabled
  • MIOS32_BOARD_PIN_MODE_OUTPUT_PP: pin is used as output in push-pull mode
  • MIOS32_BOARD_PIN_MODE_OUTPUT_OD: pin is used as output in open drain mode
Returns:
< 0 if initialisation failed

Initializes a J10 pin

Parameters:
[in] pin the pin number (0..15)
[in] mode the pin mode

  • MIOS32_BOARD_PIN_MODE_IGNORE: configuration shouldn't be touched
  • MIOS32_BOARD_PIN_MODE_ANALOG: select analog input mode (default)
  • MIOS32_BOARD_PIN_MODE_INPUT: pin is used as input w/o pull device (floating)
  • MIOS32_BOARD_PIN_MODE_INPUT_PD: pin is used as input, internal pull down enabled
  • MIOS32_BOARD_PIN_MODE_INPUT_PU: pin is used as input, internal pull up enabled
  • MIOS32_BOARD_PIN_MODE_OUTPUT_PP: pin is used as output in push-pull mode
  • MIOS32_BOARD_PIN_MODE_OUTPUT_OD: pin is used as output in open drain mode
Returns:
< 0 if initialisation failed
s32 MIOS32_BOARD_J10_PinSet ( u8  pin,
u8  value 
)

This function sets a single pin of J10

Parameters:
[in] pin the pin number (0..7)
[in] value the pin value (0 or 1)
Returns:
< 0 on errors

This function sets a single pin of J10

Parameters:
[in] pin the pin number (0..15)
[in] value the pin value (0 or 1)
Returns:
< 0 on errors
s32 MIOS32_BOARD_J10_Set ( u16  value  ) 

This function sets all pins of J10 at once

Parameters:
[in] value 8 bits which are forwarded to J10
Returns:
< 0 on errors

This function sets all pins of J10 at once

Parameters:
[in] value 16 bits which are forwarded to J10
Returns:
< 0 on errors
s32 MIOS32_BOARD_J10A_Get ( void   ) 

This function returns the state of all pins of J10A (J10[7:0])

Returns:
8 bits which are forwarded from J10A
s32 MIOS32_BOARD_J10A_Set ( u8  value  ) 

This function sets all pins of J10A (J10[7:0]) at once

Parameters:
[in] value 8 bits which are forwarded to J10A
Returns:
< 0 on errors
s32 MIOS32_BOARD_J10B_Get ( void   ) 

This function returns the state of all pins of J10B (J10[15:8])

Returns:
8 bits which are forwarded from J10B
s32 MIOS32_BOARD_J10B_Set ( u8  value  ) 

This function sets all pins of J10B (J10[15:8]) at once

Parameters:
[in] value 8 bits which are forwarded to J10B
Returns:
< 0 on errors
s32 MIOS32_BOARD_J15_D7InPullUpEnable ( u8  enable  ) 

This function enables/disables the pull up on the D7 pin return < 0 if LCD port not available

s32 MIOS32_BOARD_J15_DataSet ( u8  data  ) 

This function is used by LCD drivers under $MIOS32_PATH/modules/app_lcd to output an 8bit value on the data lines

Parameters:
[in] data the 8bit value
Returns:
< 0 if access to data port not supported by board
s32 MIOS32_BOARD_J15_E_Set ( u8  lcd,
u8  e 
)

This function is used by LCD drivers under $MIOS32_PATH/modules/app_lcd to set the E pin

Parameters:
[in] lcd display port (0=J15A, 1=J15B)
[in] e state of the E pin
Returns:
< 0 if access to E pin not supported by board
s32 MIOS32_BOARD_J15_GetD7In ( void   ) 

This function returns the state of the D7_IN pin return < 0 if LCD port not available return 0 if logic level is 0 return 1 if logic level is 1

s32 MIOS32_BOARD_J15_PollUnbusy ( u8  lcd,
u32  time_out 
)

This function is used by LCD drivers under $MIOS32_PATH/modules/app_lcd to poll the busy bit (D7) of a LCD

Parameters:
[in] lcd display port (0=J15A, 1=J15B)
[in] time_out how many times should the busy bit be polled?
Returns:
-1 if LCD not available
-2 on timeout return >= 0 on success

Here is the call graph for this function:

s32 MIOS32_BOARD_J15_PortInit ( u32  mode  ) 

Initializes the J15 port

Parameters:
[in] mode 
  • 0: J15 pins are configured in Push Pull Mode (3.3V)
  • 1: J15 pins are configured in Open Drain mode (perfect for 3.3V->5V levelshifting)
Returns:
< 0 if initialisation failed
s32 MIOS32_BOARD_J15_RS_Set ( u8  rs  ) 

This function is used by LCD drivers under $MIOS32_PATH/modules/app_lcd to set the RS pin

Parameters:
[in] rs state of the RS pin
Returns:
< 0 if access to RS pin not supported by board
s32 MIOS32_BOARD_J15_RW_Set ( u8  rw  ) 

This function is used by LCD drivers under $MIOS32_PATH/modules/app_lcd to set the RW pin

Parameters:
[in] rw state of the RW pin
Returns:
< 0 if access to RW pin not supported by board
s32 MIOS32_BOARD_J15_SerDataShift ( u8  data  ) 

This function is used by LCD drivers under $MIOS32_PATH/modules/app_lcd to shift an 8bit data value to LCDs with serial interface (SCLK connected to J15A:E, Data line connected to J15A:RW)

Parameters:
[in] data the 8bit value
Returns:
< 0 if access to data port not supported by board

Here is the call graph for this function:

s32 MIOS32_BOARD_J28_Get ( void   ) 

This function returns the state of all pins of J28

Returns:
8 bits which are forwarded from J28
s32 MIOS32_BOARD_J28_PinGet ( u8  pin  ) 

This function returns the state of a single pin of J28

Parameters:
[in] pin the pin number (0..7)
Returns:
< 0 if pin not available
>= 0: input state of pin
s32 MIOS32_BOARD_J28_PinInit ( u8  pin,
mios32_board_pin_mode_t  mode 
)

Initializes a J28 pin

Parameters:
[in] pin the pin number (0..3)
[in] mode the pin mode

  • MIOS32_BOARD_PIN_MODE_IGNORE: configuration shouldn't be touched
  • MIOS32_BOARD_PIN_MODE_ANALOG: select analog input mode (default)
  • MIOS32_BOARD_PIN_MODE_INPUT: pin is used as input w/o pull device (floating)
  • MIOS32_BOARD_PIN_MODE_INPUT_PD: pin is used as input, internal pull down enabled
  • MIOS32_BOARD_PIN_MODE_INPUT_PU: pin is used as input, internal pull up enabled
  • MIOS32_BOARD_PIN_MODE_OUTPUT_PP: pin is used as output in push-pull mode
  • MIOS32_BOARD_PIN_MODE_OUTPUT_OD: pin is used as output in open drain mode
Returns:
< 0 if initialisation failed

Initializes a J28 pin

Parameters:
[in] pin the pin number (0..7)
[in] mode the pin mode

  • MIOS32_BOARD_PIN_MODE_IGNORE: configuration shouldn't be touched
  • MIOS32_BOARD_PIN_MODE_ANALOG: select analog input mode (default)
  • MIOS32_BOARD_PIN_MODE_INPUT: pin is used as input w/o pull device (floating)
  • MIOS32_BOARD_PIN_MODE_INPUT_PD: pin is used as input, internal pull down enabled
  • MIOS32_BOARD_PIN_MODE_INPUT_PU: pin is used as input, internal pull up enabled
  • MIOS32_BOARD_PIN_MODE_OUTPUT_PP: pin is used as output in push-pull mode
  • MIOS32_BOARD_PIN_MODE_OUTPUT_OD: pin is used as output in open drain mode
Returns:
< 0 if initialisation failed
s32 MIOS32_BOARD_J28_PinSet ( u8  pin,
u8  value 
)

This function sets a single pin of J28

Parameters:
[in] pin the pin number (0..7)
[in] value the pin value (0 or 1)
Returns:
< 0 on errors
s32 MIOS32_BOARD_J28_Set ( u16  value  ) 

This function sets all pins of J28 at once

Parameters:
[in] value 8 bits which are forwarded to J28
Returns:
< 0 on errors
s32 MIOS32_BOARD_J5_Get ( void   ) 

This function returns the state of all pins of J5

Returns:
8 bits which are forwarded from J5A/B

This function returns the state of all pins of J5

Returns:
12 bits which are forwarded from J5A/B/C
s32 MIOS32_BOARD_J5_PinGet ( u8  pin  ) 

This function returns the state of a single pin of J5

Parameters:
[in] pin the pin number (0..7)
Returns:
< 0 if pin not available
>= 0: input state of pin

This function returns the state of a single pin of J5

Parameters:
[in] pin the pin number (0..11)
Returns:
< 0 if pin not available
>= 0: input state of pin
s32 MIOS32_BOARD_J5_PinInit ( u8  pin,
mios32_board_pin_mode_t  mode 
)

Initializes a J5 pin

Parameters:
[in] pin the pin number (0..7)
[in] mode the pin mode

  • MIOS32_BOARD_PIN_MODE_IGNORE: configuration shouldn't be touched
  • MIOS32_BOARD_PIN_MODE_ANALOG: select analog input mode (default)
  • MIOS32_BOARD_PIN_MODE_INPUT: pin is used as input w/o pull device (floating)
  • MIOS32_BOARD_PIN_MODE_INPUT_PD: pin is used as input, internal pull down enabled
  • MIOS32_BOARD_PIN_MODE_INPUT_PU: pin is used as input, internal pull up enabled
  • MIOS32_BOARD_PIN_MODE_OUTPUT_PP: pin is used as output in push-pull mode
  • MIOS32_BOARD_PIN_MODE_OUTPUT_OD: pin is used as output in open drain mode
Returns:
< 0 if initialisation failed

Initializes a J5 pin

Parameters:
[in] pin the pin number (0..11)
[in] mode the pin mode

  • MIOS32_BOARD_PIN_MODE_IGNORE: configuration shouldn't be touched
  • MIOS32_BOARD_PIN_MODE_ANALOG: select analog input mode (default)
  • MIOS32_BOARD_PIN_MODE_INPUT: pin is used as input w/o pull device (floating)
  • MIOS32_BOARD_PIN_MODE_INPUT_PD: pin is used as input, internal pull down enabled
  • MIOS32_BOARD_PIN_MODE_INPUT_PU: pin is used as input, internal pull up enabled
  • MIOS32_BOARD_PIN_MODE_OUTPUT_PP: pin is used as output in push-pull mode
  • MIOS32_BOARD_PIN_MODE_OUTPUT_OD: pin is used as output in open drain mode
Returns:
< 0 if initialisation failed
s32 MIOS32_BOARD_J5_PinSet ( u8  pin,
u8  value 
)

This function sets a single pin of J5

Parameters:
[in] pin the pin number (0..7)
[in] value the pin value (0 or 1)
Returns:
< 0 on errors

This function sets a single pin of J5

Parameters:
[in] pin the pin number (0..11)
[in] value the pin value (0 or 1)
Returns:
< 0 on errors
s32 MIOS32_BOARD_J5_Set ( u16  value  ) 

This function sets all pins of J5 at once

Parameters:
[in] value 8 bits which are forwarded to J5A/B
Returns:
< 0 on errors

This function sets all pins of J5 at once

Parameters:
[in] value 12 bits which are forwarded to J5A/B/C
Returns:
< 0 on errors
u32 MIOS32_BOARD_LED_Get ( void   ) 

Returns the status of all LEDs

Returns:
status of all LEDs
s32 MIOS32_BOARD_LED_Init ( u32  leds  ) 

Initializes LEDs of the board

Parameters:
[in] leds mask contains a flag for each LED which should be initialized

  • MBHP_CORE_STM32: 1 LED (flag 0: green)
  • STM32_PRIMER: 2 LEDs (flag 0: green, flag 1: red)
Returns:
0 if initialisation passed
-1 if no LEDs specified for board
-2 if one or more LEDs not available on board

Initializes LEDs of the board

Parameters:
[in] leds mask contains a flag for each LED which should be initialized

  • STM32F4DISCOVERY: 4 LEDs (flag 0: green, flag1: orange, flag2: red, flag3: blue)
Returns:
0 if initialisation passed
-1 if no LEDs specified for board
-2 if one or more LEDs not available on board
s32 MIOS32_BOARD_LED_Set ( u32  leds,
u32  value 
)

Sets one or more LEDs to the given value(s)

Parameters:
[in] leds mask contains a flag for each LED which should be changed
[in] value contains the value which should be set
Returns:
0 if initialisation passed
-1 if no LEDs specified for board
-2 if one or more LEDs not available on board

Generated on 22 Jan 2016 for MIOS32 by  doxygen 1.6.1