Skip to content

Commit

Permalink
boards: frdm_k22f: Add support for frdm_stbc_agm01
Browse files Browse the repository at this point in the history
Provide the arduino_i2c node name from i2c_0.
Provide pinmux for frdm_stbc_agm01.

The frdm_stbc_agm01 supplies access to an FXOS8700 and FXAS21002.
when using frdm_stbc_agm01 with frdm_k22f, the FXAS21002 sample
sensor project can be utilized and the FXOS8700 sample sensor
project utilizes the shield's FXOS8700.

Signed-off-by: Ryan Holleran <rhollerar@gmail.com>
  • Loading branch information
hollerdawg authored and MaureenHelm committed Feb 16, 2021
1 parent fea20bc commit b9fdab4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion boards/arm/frdm_k22f/frdm_k22f.dts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
status = "okay";
};

&i2c0 {
arduino_i2c: &i2c0 {
status = "okay";

fxos8700@1c {
Expand Down
1 change: 1 addition & 0 deletions boards/arm/frdm_k22f/frdm_k22f.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ toolchain:
supported:
- adc
- arduino_gpio
- arduino_i2c
- gpio
- i2c
- nvs
Expand Down
12 changes: 12 additions & 0 deletions boards/arm/frdm_k22f/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ static int frdm_k22f_pinmux_init(const struct device *dev)
| PORT_PCR_ODE_MASK);
#endif

#if CONFIG_SHIELD_FRDM_STBC_AGM01
/* FXOS8700 INT1 */
pinmux_pin_set(portb, 16, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* FXOS8700 INT2 */
pinmux_pin_set(porta, 4, PORT_PCR_MUX(kPORT_MuxAsGpio));

/* FXAS21002 INT1 */
pinmux_pin_set(portb, 18, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* FXAS21002 INT2 */
pinmux_pin_set(portb, 19, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif

return 0;
}

Expand Down

0 comments on commit b9fdab4

Please sign in to comment.