Intel® Quark™ Microcontroller Software Interface  1.4.0
Intel® Quark™ Microcontroller BSP
Pin Muxing setup

Pin muxing configuration. More...

Enumerations

enum  qm_pmux_fn_t { QM_PMUX_FN_0, QM_PMUX_FN_1, QM_PMUX_FN_2, QM_PMUX_FN_3 }
 Pin function type. More...
 
enum  qm_pmux_slew_t {
  QM_PMUX_SLEW_2MA, QM_PMUX_SLEW_4MA, QM_PMUX_SLEW_12MA, QM_PMUX_SLEW_16MA,
  QM_PMUX_SLEW_NUM
}
 Pin slew rate setting. More...
 
enum  qm_pin_id_t {
  QM_PIN_ID_0, QM_PIN_ID_1, QM_PIN_ID_2, QM_PIN_ID_3,
  QM_PIN_ID_4, QM_PIN_ID_5, QM_PIN_ID_6, QM_PIN_ID_7,
  QM_PIN_ID_8, QM_PIN_ID_9, QM_PIN_ID_10, QM_PIN_ID_11,
  QM_PIN_ID_12, QM_PIN_ID_13, QM_PIN_ID_14, QM_PIN_ID_15,
  QM_PIN_ID_16, QM_PIN_ID_17, QM_PIN_ID_18, QM_PIN_ID_19,
  QM_PIN_ID_20, QM_PIN_ID_21, QM_PIN_ID_22, QM_PIN_ID_23,
  QM_PIN_ID_24, QM_PIN_ID_25, QM_PIN_ID_26, QM_PIN_ID_27,
  QM_PIN_ID_28, QM_PIN_ID_29, QM_PIN_ID_30, QM_PIN_ID_31,
  QM_PIN_ID_32, QM_PIN_ID_33, QM_PIN_ID_34, QM_PIN_ID_35,
  QM_PIN_ID_36, QM_PIN_ID_37, QM_PIN_ID_38, QM_PIN_ID_39,
  QM_PIN_ID_40, QM_PIN_ID_41, QM_PIN_ID_42, QM_PIN_ID_43,
  QM_PIN_ID_44, QM_PIN_ID_45, QM_PIN_ID_46, QM_PIN_ID_47,
  QM_PIN_ID_48, QM_PIN_ID_49, QM_PIN_ID_50, QM_PIN_ID_51,
  QM_PIN_ID_52, QM_PIN_ID_53, QM_PIN_ID_54, QM_PIN_ID_55,
  QM_PIN_ID_56, QM_PIN_ID_57, QM_PIN_ID_58, QM_PIN_ID_59,
  QM_PIN_ID_60, QM_PIN_ID_61, QM_PIN_ID_62, QM_PIN_ID_63,
  QM_PIN_ID_64, QM_PIN_ID_65, QM_PIN_ID_66, QM_PIN_ID_67,
  QM_PIN_ID_68
}
 External Pad pin identifiers. More...
 

Functions

int qm_pmux_select (const qm_pin_id_t pin, const qm_pmux_fn_t fn)
 Set up pin muxing for a SoC pin. More...
 
int qm_pmux_set_slew (const qm_pin_id_t pin, const qm_pmux_slew_t slew)
 Set up pin's slew rate in the pin mux controller. More...
 
int qm_pmux_input_en (const qm_pin_id_t pin, const bool enable)
 Enable input for a pin in the pin mux controller. More...
 
int qm_pmux_pullup_en (const qm_pin_id_t pin, const bool enable)
 Enable pullup for a pin in the pin mux controller. More...
 

Detailed Description

Pin muxing configuration.

Enumeration Type Documentation

External Pad pin identifiers.

Enumerator
QM_PIN_ID_0 

Pin id 0.

QM_PIN_ID_1 

Pin id 1.

QM_PIN_ID_2 

Pin id 2.

QM_PIN_ID_3 

Pin id 3.

QM_PIN_ID_4 

Pin id 4.

QM_PIN_ID_5 

Pin id 5.

QM_PIN_ID_6 

Pin id 6.

QM_PIN_ID_7 

Pin id 7.

QM_PIN_ID_8 

Pin id 8.

QM_PIN_ID_9 

Pin id 9.

QM_PIN_ID_10 

Pin id 10.

QM_PIN_ID_11 

Pin id 11.

QM_PIN_ID_12 

Pin id 12.

QM_PIN_ID_13 

Pin id 13.

QM_PIN_ID_14 

Pin id 14.

QM_PIN_ID_15 

Pin id 15.

QM_PIN_ID_16 

Pin id 16.

QM_PIN_ID_17 

Pin id 17.

QM_PIN_ID_18 

Pin id 18.

QM_PIN_ID_19 

Pin id 19.

QM_PIN_ID_20 

Pin id 20.

QM_PIN_ID_21 

Pin id 21.

QM_PIN_ID_22 

Pin id 22.

QM_PIN_ID_23 

Pin id 23.

QM_PIN_ID_24 

Pin id 24.

QM_PIN_ID_25 

Pin id 25.

QM_PIN_ID_26 

Pin id 26.

QM_PIN_ID_27 

Pin id 27.

QM_PIN_ID_28 

Pin id 28.

QM_PIN_ID_29 

Pin id 29.

QM_PIN_ID_30 

Pin id 30.

QM_PIN_ID_31 

Pin id 31.

QM_PIN_ID_32 

Pin id 32.

QM_PIN_ID_33 

Pin id 33.

QM_PIN_ID_34 

Pin id 34.

QM_PIN_ID_35 

Pin id 35.

QM_PIN_ID_36 

Pin id 36.

QM_PIN_ID_37 

Pin id 37.

QM_PIN_ID_38 

Pin id 38.

QM_PIN_ID_39 

Pin id 39.

QM_PIN_ID_40 

Pin id 40.

QM_PIN_ID_41 

Pin id 41.

QM_PIN_ID_42 

Pin id 42.

QM_PIN_ID_43 

Pin id 43.

QM_PIN_ID_44 

Pin id 44.

QM_PIN_ID_45 

Pin id 45.

QM_PIN_ID_46 

Pin id 46.

QM_PIN_ID_47 

Pin id 47.

QM_PIN_ID_48 

Pin id 48.

QM_PIN_ID_49 

Pin id 49.

QM_PIN_ID_50 

Pin id 50.

QM_PIN_ID_51 

Pin id 51.

QM_PIN_ID_52 

Pin id 52.

QM_PIN_ID_53 

Pin id 53.

QM_PIN_ID_54 

Pin id 54.

QM_PIN_ID_55 

Pin id 55.

QM_PIN_ID_56 

Pin id 56.

QM_PIN_ID_57 

Pin id 57.

QM_PIN_ID_58 

Pin id 58.

QM_PIN_ID_59 

Pin id 59.

QM_PIN_ID_60 

Pin id 60.

QM_PIN_ID_61 

Pin id 61.

QM_PIN_ID_62 

Pin id 62.

QM_PIN_ID_63 

Pin id 63.

QM_PIN_ID_64 

Pin id 64.

QM_PIN_ID_65 

Pin id 65.

QM_PIN_ID_66 

Pin id 66.

QM_PIN_ID_67 

Pin id 67.

QM_PIN_ID_68 

Pin id 68.

Definition at line 45 of file qm_pinmux.h.

Pin function type.

Enumerator
QM_PMUX_FN_0 

Gpio function 0.

QM_PMUX_FN_1 

Gpio function 0.

QM_PMUX_FN_2 

Gpio function 0.

QM_PMUX_FN_3 

Gpio function 0.

Definition at line 21 of file qm_pinmux.h.

Pin slew rate setting.

Enumerator
QM_PMUX_SLEW_2MA 

Set gpio slew rate to 2MA.

QM_PMUX_SLEW_4MA 

Set gpio slew rate to 4MA.

QM_PMUX_SLEW_12MA 

Set gpio slew rate to 12MA.

QM_PMUX_SLEW_16MA 

Set gpio slew rate to 16MA.

QM_PMUX_SLEW_NUM 

Max number of slew rate options.

Definition at line 31 of file qm_pinmux.h.

Function Documentation

int qm_pmux_input_en ( const qm_pin_id_t  pin,
const bool  enable 
)

Enable input for a pin in the pin mux controller.

Parameters
[in]pinwhich pin to configure.
[in]enableset to true to enable input.
Returns
Standard errno return type for QMSI.
Return values
0on success.
Negativeerrno for possible error codes.

Definition at line 67 of file qm_pinmux.c.

int qm_pmux_pullup_en ( const qm_pin_id_t  pin,
const bool  enable 
)

Enable pullup for a pin in the pin mux controller.

Parameters
[in]pinwhich pin to configure.
[in]enableset to true to enable pullup.
Returns
Standard errno return type for QMSI.
Return values
0on success.
Negativeerrno for possible error codes.

Definition at line 82 of file qm_pinmux.c.

int qm_pmux_select ( const qm_pin_id_t  pin,
const qm_pmux_fn_t  fn 
)

Set up pin muxing for a SoC pin.

Select one of the pin functions.

Parameters
[in]pinwhich pin to configure.
[in]fnthe function to assign to the pin.
Returns
Standard errno return type for QMSI.
Return values
0on success.
Negativeerrno for possible error codes.

Definition at line 37 of file qm_pinmux.c.

References QM_PMUX_FN_3.

int qm_pmux_set_slew ( const qm_pin_id_t  pin,
const qm_pmux_slew_t  slew 
)

Set up pin's slew rate in the pin mux controller.

Parameters
[in]pinwhich pin to configure.
[in]slewthe slew rate to assign to the pin.
Returns
Standard errno return type for QMSI.
Return values
0on success.
Negativeerrno for possible error codes.

Definition at line 51 of file qm_pinmux.c.

References QM_PMUX_SLEW_NUM.