@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
/************************************************************************************
*
* Copyright ( C ) 2016 - 2017 Gregory Nutt . All rights reserved .
* Copyright ( C ) 2016 - 2018 Gregory Nutt . All rights reserved .
* Authors : Gregory Nutt < gnutt @ nuttx . org >
* David Sidrane < david_s5 @ nscdg . com >
*
@ -62,7 +62,7 @@
@@ -62,7 +62,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* This structure represents the changeable state of the automounter */
struct nxphlite _automount_state_s {
struct fmuk66 _automount_state_s {
volatile automount_handler_t handler ; /* Upper half handler */
FAR void * arg ; /* Handler argument */
bool enable ; /* Fake interrupt enable */
@ -71,40 +71,40 @@ struct nxphlite_automount_state_s {
@@ -71,40 +71,40 @@ struct nxphlite_automount_state_s {
/* This structure represents the static configuration of an automounter */
struct nxphlite _automount_config_s {
struct fmuk66 _automount_config_s {
/* This must be first thing in structure so that we can simply cast from struct
* automount_lower_s to struct nxphlite _automount_config_s
* automount_lower_s to struct fmuk66 _automount_config_s
*/
struct automount_lower_s lower ; /* Publicly visible part */
FAR struct nxphlite _automount_state_s * state ; /* Changeable state */
FAR struct fmuk66 _automount_state_s * state ; /* Changeable state */
} ;
/************************************************************************************
* Private Function Prototypes
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
static int nxphlite _attach( FAR const struct automount_lower_s * lower ,
static int fmuk66 _attach( FAR const struct automount_lower_s * lower ,
automount_handler_t isr , FAR void * arg ) ;
static void nxphlite _enable( FAR const struct automount_lower_s * lower , bool enable ) ;
static bool nxphlite _inserted( FAR const struct automount_lower_s * lower ) ;
static void fmuk66 _enable( FAR const struct automount_lower_s * lower , bool enable ) ;
static bool fmuk66 _inserted( FAR const struct automount_lower_s * lower ) ;
/************************************************************************************
* Private Data
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
static struct nxphlite _automount_state_s g_sdhc_state ;
static const struct nxphlite _automount_config_s g_sdhc_config = {
static struct fmuk66 _automount_state_s g_sdhc_state ;
static const struct fmuk66 _automount_config_s g_sdhc_config = {
. lower =
{
. fstype = CONFIG_NXPHLITE _SDHC_AUTOMOUNT_FSTYPE ,
. blockdev = CONFIG_NXPHLITE _SDHC_AUTOMOUNT_BLKDEV ,
. mountpoint = CONFIG_NXPHLITE _SDHC_AUTOMOUNT_MOUNTPOINT ,
. ddelay = MSEC2TICK ( CONFIG_NXPHLITE _SDHC_AUTOMOUNT_DDELAY ) ,
. udelay = MSEC2TICK ( CONFIG_NXPHLITE _SDHC_AUTOMOUNT_UDELAY ) ,
. attach = nxphlite _attach,
. enable = nxphlite _enable,
. inserted = nxphlite _inserted
. fstype = CONFIG_FMUK66 _SDHC_AUTOMOUNT_FSTYPE ,
. blockdev = CONFIG_FMUK66 _SDHC_AUTOMOUNT_BLKDEV ,
. mountpoint = CONFIG_FMUK66 _SDHC_AUTOMOUNT_MOUNTPOINT ,
. ddelay = MSEC2TICK ( CONFIG_FMUK66 _SDHC_AUTOMOUNT_DDELAY ) ,
. udelay = MSEC2TICK ( CONFIG_FMUK66 _SDHC_AUTOMOUNT_UDELAY ) ,
. attach = fmuk66 _attach,
. enable = fmuk66 _enable,
. inserted = fmuk66 _inserted
} ,
. state = & g_sdhc_state
} ;
@ -114,7 +114,7 @@ static const struct nxphlite_automount_config_s g_sdhc_config = {
@@ -114,7 +114,7 @@ static const struct nxphlite_automount_config_s g_sdhc_config = {
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/************************************************************************************
* Name : nxphlite _attach
* Name : fmuk66 _attach
*
* Description :
* Attach a new SDHC event handler
@ -129,15 +129,15 @@ static const struct nxphlite_automount_config_s g_sdhc_config = {
@@ -129,15 +129,15 @@ static const struct nxphlite_automount_config_s g_sdhc_config = {
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
static int nxphlite _attach( FAR const struct automount_lower_s * lower ,
static int fmuk66 _attach( FAR const struct automount_lower_s * lower ,
automount_handler_t isr , FAR void * arg )
{
FAR const struct nxphlite _automount_config_s * config ;
FAR struct nxphlite _automount_state_s * state ;
FAR const struct fmuk66 _automount_config_s * config ;
FAR struct fmuk66 _automount_state_s * state ;
/* Recover references to our structure */
config = ( FAR struct nxphlite _automount_config_s * ) lower ;
config = ( FAR struct fmuk66 _automount_config_s * ) lower ;
DEBUGASSERT ( config ! = NULL & & config - > state ! = NULL ) ;
state = config - > state ;
@ -154,7 +154,7 @@ static int nxphlite_attach(FAR const struct automount_lower_s *lower,
@@ -154,7 +154,7 @@ static int nxphlite_attach(FAR const struct automount_lower_s *lower,
}
/************************************************************************************
* Name : nxphlite _enable
* Name : fmuk66 _enable
*
* Description :
* Enable card insertion / removal event detection
@ -168,15 +168,15 @@ static int nxphlite_attach(FAR const struct automount_lower_s *lower,
@@ -168,15 +168,15 @@ static int nxphlite_attach(FAR const struct automount_lower_s *lower,
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
static void nxphlite _enable( FAR const struct automount_lower_s * lower , bool enable )
static void fmuk66 _enable( FAR const struct automount_lower_s * lower , bool enable )
{
FAR const struct nxphlite _automount_config_s * config ;
FAR struct nxphlite _automount_state_s * state ;
FAR const struct fmuk66 _automount_config_s * config ;
FAR struct fmuk66 _automount_state_s * state ;
irqstate_t flags ;
/* Recover references to our structure */
config = ( FAR struct nxphlite _automount_config_s * ) lower ;
config = ( FAR struct fmuk66 _automount_config_s * ) lower ;
DEBUGASSERT ( config ! = NULL & & config - > state ! = NULL ) ;
state = config - > state ;
@ -192,7 +192,7 @@ static void nxphlite_enable(FAR const struct automount_lower_s *lower, bool enab
@@ -192,7 +192,7 @@ static void nxphlite_enable(FAR const struct automount_lower_s *lower, bool enab
/* Yes.. perform the fake interrupt if the interrutp is attached */
if ( state - > handler ) {
bool inserted = nxphlite _cardinserted( ) ;
bool inserted = fmuk66 _cardinserted( ) ;
( void ) state - > handler ( & config - > lower , state - > arg , inserted ) ;
}
@ -203,7 +203,7 @@ static void nxphlite_enable(FAR const struct automount_lower_s *lower, bool enab
@@ -203,7 +203,7 @@ static void nxphlite_enable(FAR const struct automount_lower_s *lower, bool enab
}
/************************************************************************************
* Name : nxphlite _inserted
* Name : fmuk66 _inserted
*
* Description :
* Check if a card is inserted into the slot .
@ -216,9 +216,9 @@ static void nxphlite_enable(FAR const struct automount_lower_s *lower, bool enab
@@ -216,9 +216,9 @@ static void nxphlite_enable(FAR const struct automount_lower_s *lower, bool enab
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
static bool nxphlite _inserted( FAR const struct automount_lower_s * lower )
static bool fmuk66 _inserted( FAR const struct automount_lower_s * lower )
{
return nxphlite _cardinserted( ) ;
return fmuk66 _cardinserted( ) ;
}
/************************************************************************************
@ -226,7 +226,7 @@ static bool nxphlite_inserted(FAR const struct automount_lower_s *lower)
@@ -226,7 +226,7 @@ static bool nxphlite_inserted(FAR const struct automount_lower_s *lower)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/************************************************************************************
* Name : nxphlite _automount_initialize
* Name : fmuk66 _automount_initialize
*
* Description :
* Configure auto - mounters for each enable and so configured SDHC
@ -239,7 +239,7 @@ static bool nxphlite_inserted(FAR const struct automount_lower_s *lower)
@@ -239,7 +239,7 @@ static bool nxphlite_inserted(FAR const struct automount_lower_s *lower)
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void nxphlite _automount_initialize( void )
void fmuk66 _automount_initialize( void )
{
FAR void * handle ;
@ -255,7 +255,7 @@ void nxphlite_automount_initialize(void)
@@ -255,7 +255,7 @@ void nxphlite_automount_initialize(void)
}
/************************************************************************************
* Name : nxphlite _automount_event
* Name : fmuk66 _automount_event
*
* Description :
* The SDHC card detection logic has detected an insertion or removal event . It
@ -278,10 +278,10 @@ void nxphlite_automount_initialize(void)
@@ -278,10 +278,10 @@ void nxphlite_automount_initialize(void)
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void nxphlite _automount_event( bool inserted )
void fmuk66 _automount_event( bool inserted )
{
FAR const struct nxphlite _automount_config_s * config = & g_sdhc_config ;
FAR struct nxphlite _automount_state_s * state = & g_sdhc_state ;
FAR const struct fmuk66 _automount_config_s * config = & g_sdhc_config ;
FAR struct fmuk66 _automount_state_s * state = & g_sdhc_state ;
/* Is the auto-mounter interrupt attached? */