Skip to content

Commit

Permalink
Move N01S830HA_config.h to BSP
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter committed Nov 28, 2023
1 parent 13544d4 commit e6f81f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,12 @@
#include "mxc_device.h"
#include "fastspi.h"

#ifndef N01S830HA_HOLD_PIN_PORT
#define N01S830HA_HOLD_PIN_PORT MXC_GPIO0
#endif

#ifndef N01S830HA_HOLD_PIN_MASK
#define N01S830HA_HOLD_PIN_MASK MXC_GPIO_PIN_9
#endif

#ifndef N01S830HA_VSSEL
#define N01S830HA_VSSEL MXC_GPIO_VSSEL_VDDIOH
#endif

#ifndef N01S830HA_HOLD_PIN
#define N01S830HA_HOLD_PIN
// N01S830HA_HOLD_PIN can be defined by other files to completely re-define the
// hold pin struct if necessary. Otherwise, the hold pin will be defined here using
// the port, pin, and vssel definitions above.
Expand All @@ -46,6 +38,5 @@ static const mxc_gpio_cfg_t N01S830HA_hold_pin = { .port = N01S830HA_HOLD_PIN_PO
.func = MXC_GPIO_FUNC_OUT,
.pad = MXC_GPIO_PAD_WEAK_PULL_UP,
.vssel = N01S830HA_VSSEL };
#endif

#endif // LIBRARIES_MISCDRIVERS_SRAM_N01S830HA_CONFIG_H_
12 changes: 12 additions & 0 deletions Libraries/MiscDrivers/SRAM/N01S830HA.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
// - Must be supplied externally (!)
// - Default can be found in N01S830HA_config.h

#ifndef N01S830HA_HOLD_PIN_PORT
#error Missing definition 'N01S830HA_HOLD_PIN_PORT'
#endif

#ifndef N01S830HA_HOLD_PIN_MASK
#error Missing definition 'N01S830HA_HOLD_PIN_MASK'
#endif

#ifndef N01S830HA_VSSEL
#error Missing definition 'N01S830HA_VSSEL'
#endif

extern const mxc_gpio_cfg_t N01S830HA_hold_pin;

// =======================================================================================
Expand Down

0 comments on commit e6f81f6

Please sign in to comment.