You've likely seen a friend or coworker with one of these green drinks in hand and wondered why anyone would drink them. But green smoothies are actually a super quick and easy way to get your daily serving of nutrients from leafy greens and fruits.
Natural energy boosters: Green smoothies are packed with a ton of vitamins, minerals and other nutrients that give your body a powerful boost.
Tons of antioxidants: With plenty of disease fighting antioxidants and phytonutrients, green smoothies will help boost your immune system and help your body defend itself against disease.
Clearer skin: It's amazing what happens when you start eating healthier. Green smoothies help your body rid itself of toxins the right way instead of through your skin. This helps keep your skin healthy and radiant.
Natural weight loss: No, green smoothies aren't diet drinks. Instead, they're a combination of healthy carbs, sugars and other key ingredients. When you replace junk food's bad carbs and sugars with this healthy combo, your body will naturally start to burn fat faster and easier.
Good carbs and natural sugars: Sugar and carbs? Typically, those are the two words you'd stay away from. But, there are actually good carbs and sugars that your body needs to function. These are found in natural ingredients like leafy greens and fruits.
High in fiber: Unlike fruit juices, green smoothies give you a healthy dose of fiber that helps to keep your digestive system running smoothly.
Ready to start making your own smoothies? Check out our tips that are perfect for beginners.
A lot of people never attempt green smoothies because the recipes can seem complicated. But the good news is that unless you're weighing and calculating every little bit that goes into your smoothies, you don't really need to follow those fancy recipes as closely—or even at all. As long as you have a blender, an open mind and some leafy greens at home, you can likely go ahead and make one without a trip to the store.
Essentially you will need a combination of leafy greens, a liquid base that can range from water to your choice of milk and some ripe fruit for some natural sugar. Once you've got those base ingredients together, you can even give your smoothie an extra punch with boosters like chia seeds or coconut oil.
The Green Base: You'll need about two to three handfuls of your choice of leafy greens. If you're a beginner, we suggest using spinach to start with as it has a less prominent taste. Kale, collard greens, chard, romaine and green leafy herbs like cilantro, parsley and mint are also great if you're looking to experiment a little.
The Liquid: Add about one cup of water, or nut milk to your smoothie. This will help your smoothie get a nice drinkable texture. You can even add liquids like green tea for some extra antioxidants.
Add Fruit: About a cup of fruit will do the trick for your smoothie. Typically, you'll want to keep your greens at a double or even triple ratio to the fruit. This boost of antioxidants, texture and flavor will be like the icing on the cake for your smoothie. Otherwise, you might as well just be drinking a salad. Good starter fruits are bananas or avocados. They'll give your smoothie a nice, creamy texture.
Nuts, Seeds and Superfoods: Add a tablespoon or two of nuts or seeds like chia or flax seeds. This will make sure you're getting plenty of nutrients like vitamins A, K, E and D. Note that you'll want to avoid adding too much nut butter. A little is great to add some flavor and protein, but too much can slow your digestive system.
Green is just another word for healthy, nutritious and plant derived, not the actual color of the drink. Although you'll find that most of your drinks do in fact take the leafy green color from the spinach, depending on which fruits and veggies you choose to add, your drink may take on shades of browns, reds or oranges. This is perfectly ok.
You don't judge a book by its cover, right? Well you shouldn't judge a smoothie by its color either. Despite its earthy hues that may send you and others running for the door, you might find that you actually like the flavor.
If you venture into the world of green smoothies, be prepared for judgment from friends and family. Don't let that discourage you. Let's be honest; at face value, that carefully blended and nutritious smoothie you just made does in fact resemble green or brownish goo, but don't let the judgment of others keep you for drinking your smoothies.
You're entering into a whole new world when you add green smoothies to your diet. With all of the ingredients and nutrition facts, it can even be a bit overwhelming. Keep in mind that you're going to go through some trial and error before you find your perfect drink or mix.
Once you feel more comfortable making your smoothies, you'll find less use for following detailed recipes and start adding in your own ingredients. Test out other ideas, like replacing your milk or water with green tea. Or exchange the chia seeds for some flavorful peanut butter or oats. Maybe you'll even try adding in a pinch of ginger as a helpful metabolism booster. The possibilities are endless.
Do you love green smoothies? Share your favorite combos with us in the comments.


Bright idea ikea wood screen 9 is one of our best images of ikea wood screen easy home decorating ideas chic idea and its resolution is 0x0 pixels. Find out our other images similar to this bright idea ikea wood screen 9 at gallery below and if you want to find more ideas about ikea wood screen easy home decorating ideas chic idea, you could use search box at the top of this page.
And the last but not the least, our best ikea wood screen easy home decorating ideas chic idea, there are opulent ideas ikea wood screen 14, wonderful design ideas ikea wood screen 13, homely inpiration ikea wood screen 12, inspirational ikea wood screen 11, classy design ikea wood screen 10, wondrous ikea wood screen 8, neoteric ikea wood screen 7, amazing inspiration ideas ikea wood screen 6, fashionable design ikea wood screen 5, pretentious ikea wood screen 4, stylish ideas ikea wood screen 3, spectacular inspiration ikea wood screen 2, well suited ikea wood screen 0, and attractive ideas ikea wood screen 1.


I found it's easier to get a script to start it up which you can later get to run on boot. Download this file, save it something as 'istatd.sh' and chmod it to 0755 (or 0777 if that doesn't work). I received an error about a user on using the script, but the agent still runs. Go ahead and run './istatd.sh start' .
Start up iStat on your iPod Touch/iPhone and add the server running the agent. That's it! If you're monitoring something Mac, you're going to get more detailed information than other OS's. This app is well worth the $0.99 I spent on it.
Feel free to comment if you need help and/or have suggestions.


The Lord of the Rings: The Battle for Middle-earth II: The Rise of the Witch-king is a real-time strategy video game published by Electronic Arts, based on the Gameplay changes - Plot - Critical reception. Expanding on every feature found in The Lord of the Rings, The Battle for Middle- earth II as well as boasting entirely new content. The all new Mods - Battle for Middle-earth II: Rise - Addons - Age of the Ring Version 14 Sep - min - Uploaded by SpottinGames Full Complete Walkthrough of The Lord of the Rings: The Battle for Middle-Earth II: The.
22 Nov - 27 min - Uploaded by EmpireErwinRommel The Battle for Middle Earth 2- Rise of the Witch King- Angmar Mission 1 The Lord of. The Lord of the Rings: The Battle for Middle-earth II: The Rise of the Witch-king ( abbreviated ROTWK) is a real-time strategy video game published by Electronic . The Battle for Middle-earth II: Rise of the Witch-king is the expansion pack for The Battle for Middle-earth II. In the plot-line Lotr rise of witch king box. The Battle.
glossparis.com: The Lord of the Rings, The Battle for Middle Earth II: Rise of the Witch King Expansion Pack: Susan E. McMurry: Video Games. Find great deals for LOTR Battle for Middle Earth II 2 Rise of The Witch-king Expansion. Shop with confidence on eBay!. The Rise of the Witch-King is a fairly standard expansion that adds a brief campaign centered around one of the more enigmatic characters. For The Lord of the Rings: The Battle for Middle-Earth II - The Rise of the Witch- King on the PC, GameFAQs has 2 FAQs (game guides and walkthroughs).


Come and see a fragrant lavender farm, meandering hedge mazes and gardens with towering trees from the 1860s. How do you like your adventure? Ride, slide, zip or wander through adventure gardens, beautiful landscapes, or stroll along boardwalks through wetlands.


Baltimore, MD - Coppin State University announced today that its Center for Nanotechnology is officially a member of the Nanotechnology Professional Development Partnership (NPDP) Project. The project is hosted by Penn State's Center for Nanotechnology Education and Utilization (CNEU) and sponsored by the National Science Foundation.
Specifically, the project brings together several reputable universities across the country with the common purpose of advancing the knowledge and use of nanotechnology. The program is geared toward training and equipping students and educators with skills needed to create and sustain economically viable nanotechnology education across the United States. Participants can connect to training programs over the internet, and the program is accessible to pre-high school, high school, college, postgraduate and STEM educators through the Remote Access Instrumentation Nanotechnology (RAIN).
Partners in the program regularly organize workshops for nanotechnology educators and provide ongoing lessons to students in the Science, Technology, Engineering and Mathematics (STEM) disciplines. Courses offered include applications of nanotechnology in industry, nanofabrication process and use of nanotechnology instrumentation.
As a partner, Coppin State University's Center for Nanotechnology will offer training on state-of-the-art-instrumentation at the center via live web-streaming workshops. Registered students across the country can join in and learn useful skills. Likewise, students at Coppin State University can access and control nanotechnology-based analytical instruments and learn various nanotechnology concepts in other participating institutions from their home or classroom via a video conferencing calling program.


text:
ABOUT VEGA
Vega at a Glance
Our Vision & Strategy
Our Operational Excellence Programme
EXPLORE VEGA
VEGA Turnkey Projects
VEGA Resources
VEGA Energy
VEGA Intercommercial
PPP & Project Finance
Cedar Point International
Design & Planning
Construction & Project Management
Programme, Cost, Consultancy
Sourcing & Procurement Services
About Procurement
VEGA's Values
The board is responsible to the shareholders for the management of the company and for the protection of its assets. As such, it is ultimately responsible for implementing VEGA's systems of internal controls and for reviewing their effectiveness. These systems are designed to manage and minimize risk of failure to achieve business objectives and to comply with statutory requirements.
The board, through its committees and at its regular meetings, has a continuous process for identifying, evaluating and managing significant risks faced by VEGA, including strategy, major projects to be undertaken, significant mergers & acquisitions and disposals, as well as entry to and exit from different markets. Where appropriate, business decisions are reached following a structured and documented review of potential opportunities and threats, taking steps designed to manage or mitigate any residual risk exposure.
back to Our Values
Operational Excellence Programme
Built Environment:
Construction & Project Management:
Program, Cost, Consultancy
© Copyright 2015 VEGA Holdings (Pty) Ltd. Created by Crowberry

redpajama_set_name: RedPajamaCommonCrawl


text:
Carroll Toys for Tots campaign collects 1,050 toys
By By Blair Ames and bames@tribune.com
The Carroll County Sheriff's Office and the United States Marine Corps Reserve collected 1,050 toys through the annual Toys for Tots campaign in Carroll.
The Sheriff's Office announced the results in a news release Monday.
Collection boxes were placed at library branches, library headquarters, the Carroll County office building and the Sheriff's Office during the nearly three-week long drive, which began Nov. 29.
Sheriff's Deputies also held one-day events at Wal-Marts in Eldersburg, Hampstead, and Westminster to collect toys to be given as Christmas gifts for less fortunate children in the community.
In a statement, the Sheriff's Office said it appreciates all of the generous donations and looks forward to partnering with the Marine Corps Reserve Toys for Tots Campaign in the future.
Toy Industry
Marine Toys for Tots Foundation
Most Read • Carroll County Times
Legal Matters: Understand libel and slander after breakup


St. John's Mill is seeking a suitably experienced person to fill the post of Catering Manager. Key to the post is the ability to work very flexible hours. For full details see our website or Facebook page, or call the office on 802900.
Closing date: Monday 15th February 16.


text:
import {
  ADD_VALIDATION_ERRORS,
  SET_VALIDATION_ERRORS,
  REMOVE_VALIDATION_ERRORS,
  CLEAR_VALIDATION_ERRORS,
} from 'actions/errors';
import { createActionHandlers } from 'utils/reducer/actions-handlers';

const actionHandlers = {};

export function addValidationErrors(state, { errors }) {
  return {
    ...state,
    ...errors.reduce((acc, e) => {
      return {
        ...acc,
        [e.path]: acc[e.path] ? [...acc[e.path], e.errors] : [...e.errors],
      };
    }, {}),
  };
}

export function setValidationErrors(state, { errors }) {
  return errors.reduce((acc, e) => {
    return {
      ...acc,
      [e.path]: acc[e.path] ? [...acc[e.path], e.errors] : [...e.errors],
    };
  }, {});
}

export function removeValidationErrors(state, paths) {
  return paths.reduce((acc, p) => {
    const { [p]: remove, ...others } = acc;
    return others;
  }, state);
}

export function clearValidationErrors() {
  return {};
}

actionHandlers[ADD_VALIDATION_ERRORS] = addValidationErrors;
actionHandlers[SET_VALIDATION_ERRORS] = setValidationErrors;
actionHandlers[REMOVE_VALIDATION_ERRORS] = removeValidationErrors;
actionHandlers[CLEAR_VALIDATION_ERRORS] = clearValidationErrors;

export default createActionHandlers(actionHandlers);

redpajama_set_name: RedPajamaGithub


text:
#include "fsl_card.h"
#include "fsl_sdmmc.h"

/*******************************************************************************
 * Prototypes
 ******************************************************************************/
/*!
 * @brief Send SELECT_CARD command to set the card to be transfer state or not.
 *
 * @param card Card descriptor.
 * @param isSelected True to set the card into transfer state.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t inline SD_SelectCard(sd_card_t *card, bool isSelected);

/*!
 * @brief Wait write process complete.
 *
 * @param card Card descriptor.
 * @retval kStatus_Timeout Send command timeout.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_WaitWriteComplete(sd_card_t *card);

/*!
 * @brief Send SEND_APPLICATION_COMMAND command.
 *
 * @param card Card descriptor.
 * @param relativeaddress
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_SDMMC_CardNotSupport Card doesn't support.
 * @retval kStatus_Success Operate successfully.
 */
static status_t inline SD_SendApplicationCmd(sd_card_t *card, uint32_t relativeAddress);

/*!
 * @brief Send GO_IDLE command to set the card to be idle state.
 *
 * @param card Card descriptor.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t inline SD_GoIdle(sd_card_t *card);

/*!
 * @brief Send STOP_TRANSMISSION command after multiple blocks read/write.
 *
 * @param card Card descriptor.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_StopTransmission(sd_card_t *card);

/*!
 * @brief Send SET_BLOCK_SIZE command.
 *
 * @param card Card descriptor.
 * @param blockSize Block size.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t inline SD_SetBlockSize(sd_card_t *card, uint32_t blockSize);

/*!
 * @brief Send GET_RCA command to get card relative address.
 *
 * @param card Card descriptor.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_SendRca(sd_card_t *card);

/*!
 * @brief Send SWITCH_FUNCTION command to switch the card function group.
 *
 * @param card Card descriptor.
 * @param mode 0 to check function group. 1 to switch function group
 * @param group Function group
 * @param number Function number in the function group.
 * @param status Switch function status.
 * @retval kStatus_SDMMC_SetCardBlockSizeFailed Set card block size failed.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_SwitchFunction(sd_card_t *card, uint32_t mode, uint32_t group, uint32_t number, uint32_t *status);

/*!
 * @brief Decode raw SCR register content in the data blocks.
 *
 * @param card Card descriptor.
 * @param rawScr Raw SCR register content.
 */
static void SD_DecodeScr(sd_card_t *card, uint32_t *rawScr);

/*!
 * @brief Send GET_SCR command.
 *
 * @param card Card descriptor.
 * @retval kStatus_SDMMC_SendApplicationCommandFailed Send application command failed.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_SDMMC_NotSupportYet Not support yet.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_SendScr(sd_card_t *card);

/*!
 * @brief Switch the card to be high speed mode.
 *
 * @param card Card descriptor.
 * @param group number
 * @param functio number
 * @retval kStatus_SDMMC_CardNotSupport Card not support.
 * @retval kStatus_SDMMC_SwitchFailed Switch failed.
 * @retval kStatus_SDMMC_NotSupportYet Not support yet.
 * @retval kStatus_Fail Switch failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_SelectFunction(sd_card_t *card, uint32_t group, uint32_t function);

/*!
 * @brief Send SET_DATA_WIDTH command to set SD bus width.
 *
 * @param card Card descriptor.
 * @param width Data bus width.
 * @retval kStatus_SDMMC_SendApplicationCommandFailed Send application command failed.
 * @retval kStatus_InvalidArgument Invalid argument.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_SetDataBusWidth(sd_card_t *card, sd_data_bus_width_t width);

/*!
 * @brief Decode raw CSD register content in the data blocks.
 *
 * @param card Card descriptor.
 * @param rawCsd Raw CSD register content.
 */
static void SD_DecodeCsd(sd_card_t *card, uint32_t *rawCsd);

/*!
 * @brief Send SEND_CSD command to get CSD register content from Card.
 *
 * @param card Card descriptor.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_SendCsd(sd_card_t *card);

/*!
 * @brief Decode raw CID register content in the data blocks.
 *
 * @param rawCid raw CID register content.
 * @param card Card descriptor.
 */
static void SD_DecodeCid(sd_card_t *card, uint32_t *rawCid);

/*!
 * @brief Send GET_CID command to get CID from card.
 *
 * @param card Card descriptor.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_AllSendCid(sd_card_t *card);

/*!
 * @brief Send SEND_OPERATION_CONDITION command.
 *
 * This function sends host capacity support information and asks the accessed card to send its operating condition
 * register content.
 *
 * @param card Card descriptor.
 * @param argument The argument of the send operation condition ncomamnd.
 * @retval kStatus_SDMMC_SendApplicationCommandFailed Send application command failed.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Timeout Timeout.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_ApplicationSendOperationCondition(sd_card_t *card, uint32_t argument);

/*!
 * @brief Send GET_INTERFACE_CONDITION command to get card interface condition.
 *
 * This function checks card interface condition, which includes host supply voltage information and asks the card
 * whether card supports the specified host voltage.
 *
 * @param card Card descriptor.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_SDMMC_CardNotSupport Card doesn't support.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_SendInterfaceCondition(sd_card_t *card);

/*!
 * @brief Send switch voltage command
 * switch card voltage to 1.8v
 *
 * @param card Card descriptor.
 */
static status_t SD_SwitchVoltage(sd_card_t *card);

/*!
 * @brief select bus timing
 * select card timing
 * @param card Card descriptor.
 */
static status_t SD_SelectBusTiming(sd_card_t *card);

/*!
 * @brief select card driver strength
 * select card driver strength
 * @param card Card descriptor.
 * @param driver strength
 */
static status_t SD_SetDriverStrength(sd_card_t *card, sd_driver_strength_t driverStrength);

/*!
 * @brief select max current
 * select max operation current
 * @param card Card descriptor.
 * @param max current
 */
static status_t SD_SetMaxCurrent(sd_card_t *card, sd_max_current_t maxCurrent);

/*!
 * @brief Read data from specific SD card.
 *
 * @param card Card descriptor.
 * @param buffer Buffer to save data blocks read.
 * @param startBlock Card start block number to be read.
 * @param blockSize Block size.
 * @param blockCount Block count.
 * @retval kStatus_SDMMC_CardNotSupport Card doesn't support.
 * @retval kStatus_SDMMC_WaitWriteCompleteFailed Wait write complete failed.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_SDMMC_StopTransmissionFailed Stop transmission failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_Read(sd_card_t *card, uint8_t *buffer, uint32_t startBlock, uint32_t blockSize, uint32_t blockCount);

/*!
 * @brief Write data to specific card
 *
 * @param card Card descriptor.
 * @param buffer Buffer to be sent.
 * @param startBlock Card start block number to be written.
 * @param blockSize Block size.
 * @param blockCount Block count.
 * @retval kStatus_SDMMC_CardNotSupport Card doesn't support.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_SDMMC_StopTransmissionFailed Stop transmission failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_Write(
    sd_card_t *card, const uint8_t *buffer, uint32_t startBlock, uint32_t blockSize, uint32_t blockCount);

/*!
 * @brief Erase data for the given block range.
 *
 * @param card Card descriptor.
 * @param startBlock Card start block number to be erased.
 * @param blockCount The block count to be erased.
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 */
static status_t SD_Erase(sd_card_t *card, uint32_t startBlock, uint32_t blockCount);

/*!
 * @brief card transfer function.
 *
 * @param card Card descriptor.
 * @param transfer content.
 * @param retry times
 * @retval kStatus_SDMMC_TransferFailed Transfer failed.
 * @retval kStatus_Success Operate successfully.
 * @retval kStatus_SDMMC_TuningFail tuning fail
 */
static status_t SD_Transfer(sd_card_t *card, HOST_TRANSFER *content, uint32_t retry);

/*!
 * @brief card execute tuning function.
 *
 * @param card Card descriptor.
 * @retval kStatus_Success Operate successfully.
 * @retval kStatus_SDMMC_TuningFail tuning fail.
 * @retval kStatus_SDMMC_TransferFailed transfer fail
 */
static status_t inline SD_ExecuteTuning(sd_card_t *card);

/*******************************************************************************
 * Variables
 ******************************************************************************/

/*******************************************************************************
 * Code
 ******************************************************************************/
static status_t inline SD_SelectCard(sd_card_t *card, bool isSelected)
{
    assert(card);

    return SDMMC_SelectCard(card->host.base, card->host.transfer, card->relativeAddress, isSelected);
}

static status_t inline SD_SendApplicationCmd(sd_card_t *card, uint32_t relativeAddress)
{
    assert(card);

    return SDMMC_SendApplicationCommand(card->host.base, card->host.transfer, relativeAddress);
}

static status_t inline SD_GoIdle(sd_card_t *card)
{
    assert(card);

    return SDMMC_GoIdle(card->host.base, card->host.transfer);
}

static status_t inline SD_SetBlockSize(sd_card_t *card, uint32_t blockSize)
{
    assert(card);

    return SDMMC_SetBlockSize(card->host.base, card->host.transfer, blockSize);
}

static status_t inline SD_ExecuteTuning(sd_card_t *card)
{
    assert(card);

    return SDMMC_ExecuteTuning(card->host.base, kSD_SendTuningBlock, 64U);
}

static status_t SD_SwitchVoltage(sd_card_t *card)
{
    assert(card);

    return SDMMC_SwitchVoltage(card->host.base, card->host.transfer);
}

static status_t SD_Transfer(sd_card_t *card, HOST_TRANSFER *content, uint32_t retry)
{
    assert(card->host.transfer);
    assert(content);
    status_t error;

    do
    {
        error = card->host.transfer(card->host.base, content);
        if (((error == HOST_RETUNING_REQUEST) || (content->command->response[0U] & kSDMMC_R1ErrorAllFlag)) &&
            ((card->currentTiming == kSD_TimingSDR104Mode) || (card->currentTiming == kSD_TimingSDR50Mode)))
        {
            /* execute re-tuning */
            if (SD_ExecuteTuning(card) != kStatus_Success)
            {
                error = kStatus_SDMMC_TuningFail;
            }
            else
            {
                continue;
            }
        }
        else if (error != kStatus_Success)
        {
            error = kStatus_SDMMC_TransferFailed;
        }

        if (retry != 0U)
        {
            retry--;
        }
        else
        {
            break;
        }

    } while ((error != kStatus_Success) && (error != kStatus_SDMMC_TuningFail));

    return error;
}

static status_t SD_WaitWriteComplete(sd_card_t *card)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};

    command.index = kSDMMC_SendStatus;
    command.argument = card->relativeAddress << 16U;
    command.responseType = kCARD_ResponseTypeR1;
    command.responseErrorFlags = kSDMMC_R1ErrorAllFlag;

    do
    {
        content.command = &command;
        content.data = 0U;
        if (kStatus_Success != SD_Transfer(card, &content, 2U))
        {
            return kStatus_SDMMC_TransferFailed;
        }

        if ((command.response[0U] & kSDMMC_R1ReadyForDataFlag) &&
            (SDMMC_R1_CURRENT_STATE(command.response[0U]) != kSDMMC_R1StateProgram))
        {
            break;
        }
    } while (true);

    return kStatus_Success;
}

static status_t SD_StopTransmission(sd_card_t *card)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};

    command.index = kSDMMC_StopTransmission;
    command.argument = 0U;
    command.type = kCARD_CommandTypeAbort;
    command.responseType = kCARD_ResponseTypeR1b;
    command.responseErrorFlags = kSDMMC_R1ErrorAllFlag;

    content.command = &command;
    content.data = 0U;
    if (kStatus_Success != SD_Transfer(card, &content, 1U))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    return kStatus_Success;
}

static status_t SD_SendRca(sd_card_t *card)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};

    command.index = kSD_SendRelativeAddress;
    command.argument = 0U;
    command.responseType = kCARD_ResponseTypeR6;

    content.command = &command;
    content.data = NULL;
    if (kStatus_Success == card->host.transfer(card->host.base, &content))
    {
        card->relativeAddress = (command.response[0U] >> 16U);
        return kStatus_Success;
    }

    return kStatus_SDMMC_TransferFailed;
}

static status_t SD_SwitchFunction(sd_card_t *card, uint32_t mode, uint32_t group, uint32_t number, uint32_t *status)
{
    assert(card);
    assert(status);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};
    HOST_DATA data = {0};

    command.index = kSD_Switch;
    command.argument = (mode << 31U | 0x00FFFFFFU);
    command.argument &= ~((uint32_t)(0xFU) << (group * 4U));
    command.argument |= (number << (group * 4U));
    command.responseType = kCARD_ResponseTypeR1;

    data.blockSize = 64U;
    data.blockCount = 1U;
    data.rxData = status;

    if (kStatus_Success != SD_SetBlockSize(card, data.blockSize))
    {
        return kStatus_SDMMC_SetCardBlockSizeFailed;
    }

    content.command = &command;
    content.data = &data;
    if ((kStatus_Success != card->host.transfer(card->host.base, &content)) ||
        ((command.response[0U]) & kSDMMC_R1ErrorAllFlag))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    return kStatus_Success;
}

static void SD_DecodeScr(sd_card_t *card, uint32_t *rawScr)
{
    assert(card);
    assert(rawScr);

    sd_scr_t *scr;

    scr = &(card->scr);
    scr->scrStructure = (uint8_t)((rawScr[0U] & 0xF0000000U) >> 28U);
    scr->sdSpecification = (uint8_t)((rawScr[0U] & 0xF000000U) >> 24U);
    if ((uint8_t)((rawScr[0U] & 0x800000U) >> 23U))
    {
        scr->flags |= kSD_ScrDataStatusAfterErase;
    }
    scr->sdSecurity = (uint8_t)((rawScr[0U] & 0x700000U) >> 20U);
    scr->sdBusWidths = (uint8_t)((rawScr[0U] & 0xF0000U) >> 16U);
    if ((uint8_t)((rawScr[0U] & 0x8000U) >> 15U))
    {
        scr->flags |= kSD_ScrSdSpecification3;
    }
    scr->extendedSecurity = (uint8_t)((rawScr[0U] & 0x7800U) >> 10U);
    scr->commandSupport = (uint8_t)(rawScr[0U] & 0x3U);
    scr->reservedForManufacturer = rawScr[1U];
    /* Get specification version. */
    switch (scr->sdSpecification)
    {
        case 0U:
            card->version = kSD_SpecificationVersion1_0;
            break;
        case 1U:
            card->version = kSD_SpecificationVersion1_1;
            break;
        case 2U:
            card->version = kSD_SpecificationVersion2_0;
            if (card->scr.flags & kSD_ScrSdSpecification3)
            {
                card->version = kSD_SpecificationVersion3_0;
            }
            break;
        default:
            break;
    }
    if (card->scr.sdBusWidths & 0x4U)
    {
        card->flags |= kSD_Support4BitWidthFlag;
    }
    /* speed class control cmd */
    if (card->scr.commandSupport & 0x01U)
    {
        card->flags |= kSD_SupportSpeedClassControlCmd;
    }
    /* set block count cmd */
    if (card->scr.commandSupport & 0x02U)
    {
        card->flags |= kSD_SupportSetBlockCountCmd;
    }
}

static status_t SD_SendScr(sd_card_t *card)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};
    HOST_DATA data = {0};
    uint32_t rawScr[2U] = {0U};

    if (kStatus_Success != SD_SendApplicationCmd(card, card->relativeAddress))
    {
        return kStatus_SDMMC_SendApplicationCommandFailed;
    }

    command.index = kSD_ApplicationSendScr;
    command.responseType = kCARD_ResponseTypeR1;
    command.argument = 0U;

    data.blockSize = 8U;
    data.blockCount = 1U;
    data.rxData = rawScr;

    content.data = &data;
    content.command = &command;
    if ((kStatus_Success != card->host.transfer(card->host.base, &content)) ||
        ((command.response[0U]) & kSDMMC_R1ErrorAllFlag))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    /* SCR register data byte sequence from card is big endian(MSB first). */
    switch (card->host.config.endianMode)
    {
        case kHOST_EndianModeLittle:
            /* In little endian mode, SD bus byte transferred first is the byte stored in lowest byte position in a
            word which will cause 4 byte's sequence in a word is not consistent with their original sequence from
            card. So the sequence of 4 bytes received in a word should be converted. */
            rawScr[0U] = SWAP_WORD_BYTE_SEQUENCE(rawScr[0U]);
            rawScr[1U] = SWAP_WORD_BYTE_SEQUENCE(rawScr[1U]);
            break;
        case kHOST_EndianModeBig:
            break; /* Doesn't need to switch byte sequence when decodes bytes as big endian sequence. */
        case kHOST_EndianModeHalfWordBig:
            rawScr[0U] = SWAP_HALF_WROD_BYTE_SEQUENCE(rawScr[0U]);
            rawScr[1U] = SWAP_HALF_WROD_BYTE_SEQUENCE(rawScr[1U]);
            break;
        default:
            return kStatus_SDMMC_NotSupportYet;
    }
    memcpy(card->rawScr, rawScr, sizeof(card->rawScr));
    SD_DecodeScr(card, rawScr);

    return kStatus_Success;
}

static status_t SD_SelectFunction(sd_card_t *card, uint32_t group, uint32_t function)
{
    assert(card);

    uint32_t functionStatus[16U] = {0U};
    uint16_t functionGroupInfo[6U] = {0};
    uint32_t currentFunctionStatus = 0U;
    /* check if card support CMD6 */
    if ((card->version < kSD_SpecificationVersion1_0) || (!(card->csd.cardCommandClass & kSDMMC_CommandClassSwitch)))
    {
        return kStatus_SDMMC_NotSupportYet;
    }

    /* Check if card support high speed mode. */
    if (kStatus_Success != SD_SwitchFunction(card, kSD_SwitchCheck, group, function, functionStatus))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    /* Switch function status byte sequence from card is big endian(MSB first). */
    switch (card->host.config.endianMode)
    {
        case kHOST_EndianModeLittle:
            /* In little endian mode, SD bus byte transferred first is the byte stored in lowest byte position in
            a word which will cause 4 byte's sequence in a word is not consistent with their original sequence from
            card. So the sequence of 4 bytes received in a word should be converted. */
            functionStatus[0U] = SWAP_WORD_BYTE_SEQUENCE(functionStatus[0U]);
            functionStatus[1U] = SWAP_WORD_BYTE_SEQUENCE(functionStatus[1U]);
            functionStatus[2U] = SWAP_WORD_BYTE_SEQUENCE(functionStatus[2U]);
            functionStatus[3U] = SWAP_WORD_BYTE_SEQUENCE(functionStatus[3U]);
            functionStatus[4U] = SWAP_WORD_BYTE_SEQUENCE(functionStatus[4U]);
            break;
        case kHOST_EndianModeBig:
            break; /* Doesn't need to switch byte sequence when decodes bytes as big endian sequence. */
        case kHOST_EndianModeHalfWordBig:
            functionStatus[0U] = SWAP_HALF_WROD_BYTE_SEQUENCE(functionStatus[0U]);
            functionStatus[1U] = SWAP_HALF_WROD_BYTE_SEQUENCE(functionStatus[1U]);
            functionStatus[2U] = SWAP_HALF_WROD_BYTE_SEQUENCE(functionStatus[2U]);
            functionStatus[3U] = SWAP_HALF_WROD_BYTE_SEQUENCE(functionStatus[3U]);
            functionStatus[4U] = SWAP_HALF_WROD_BYTE_SEQUENCE(functionStatus[4U]);
            break;
        default:
            return kStatus_SDMMC_NotSupportYet;
    }
    /* -functionStatus[0U]---bit511~bit480;
       -functionStatus[1U]---bit479~bit448;
       -functionStatus[2U]---bit447~bit416;
       -functionStatus[3U]---bit415~bit384;
       -functionStatus[4U]---bit383~bit352;
       According to the "switch function status[bits 511~0]" return by switch command in mode "check function":
       -Check if function 1(high speed) in function group 1 is supported by checking if bit 401 is set;
       -check if function 1 is ready and can be switched by checking if bits 379~376 equal value 1;
     */
    functionGroupInfo[5U] = (uint16_t)functionStatus[0U];
    functionGroupInfo[4U] = (uint16_t)(functionStatus[1U] >> 16U);
    functionGroupInfo[3U] = (uint16_t)(functionStatus[1U]);
    functionGroupInfo[2U] = (uint16_t)(functionStatus[2U] >> 16U);
    functionGroupInfo[1U] = (uint16_t)(functionStatus[2U]);
    functionGroupInfo[0U] = (uint16_t)(functionStatus[3U] >> 16U);
    currentFunctionStatus = ((functionStatus[3U] & 0xFFU) << 8U) | (functionStatus[4U] >> 24U);

    /* check if function is support */
    if (((functionGroupInfo[group] & (1 << function)) == 0U) ||
        ((currentFunctionStatus >> (group * 4U)) & 0xFU) != function)
    {
        return kStatus_SDMMC_CardNotSupport;
    }

    /* Switch to high speed mode. */
    if (kStatus_Success != SD_SwitchFunction(card, kSD_SwitchSet, group, function, functionStatus))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    /* Switch function status byte sequence from card is big endian(MSB first). */
    switch (card->host.config.endianMode)
    {
        case kHOST_EndianModeLittle:
            /* In little endian mode is little endian, SD bus byte transferred first is the byte stored in lowest byte
            position in a word which will cause 4 byte's sequence in a word is not consistent with their original
            sequence from card. So the sequence of 4 bytes received in a word should be converted. */
            functionStatus[3U] = SWAP_WORD_BYTE_SEQUENCE(functionStatus[3U]);
            functionStatus[4U] = SWAP_WORD_BYTE_SEQUENCE(functionStatus[4U]);
            break;
        case kHOST_EndianModeBig:
            break; /* Doesn't need to switch byte sequence when decodes bytes as big endian sequence. */
        case kHOST_EndianModeHalfWordBig:
            functionStatus[3U] = SWAP_HALF_WROD_BYTE_SEQUENCE(functionStatus[3U]);
            functionStatus[4U] = SWAP_HALF_WROD_BYTE_SEQUENCE(functionStatus[4U]);
            break;
        default:
            return kStatus_SDMMC_NotSupportYet;
    }
    /* According to the "switch function status[bits 511~0]" return by switch command in mode "set function":
       -check if group 1 is successfully changed to function 1 by checking if bits 379~376 equal value 1;
     */
    currentFunctionStatus = ((functionStatus[3U] & 0xFFU) << 8U) | (functionStatus[4U] >> 24U);

    if (((currentFunctionStatus >> (group * 4U)) & 0xFU) != function)
    {
        return kStatus_SDMMC_SwitchFailed;
    }

    return kStatus_Success;
}

static status_t SD_SetDataBusWidth(sd_card_t *card, sd_data_bus_width_t width)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};

    if (kStatus_Success != SD_SendApplicationCmd(card, card->relativeAddress))
    {
        return kStatus_SDMMC_SendApplicationCommandFailed;
    }

    command.index = kSD_ApplicationSetBusWdith;
    command.responseType = kCARD_ResponseTypeR1;
    switch (width)
    {
        case kSD_DataBusWidth1Bit:
            command.argument = 0U;
            break;
        case kSD_DataBusWidth4Bit:
            command.argument = 2U;
            break;
        default:
            return kStatus_InvalidArgument;
    }

    content.command = &command;
    content.data = NULL;
    if ((kStatus_Success != card->host.transfer(card->host.base, &content)) ||
        ((command.response[0U]) & kSDMMC_R1ErrorAllFlag))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    return kStatus_Success;
}

static void SD_DecodeCsd(sd_card_t *card, uint32_t *rawCsd)
{
    assert(card);
    assert(rawCsd);

    sd_csd_t *csd;

    csd = &(card->csd);
    csd->csdStructure = (uint8_t)((rawCsd[3U] & 0xC0000000U) >> 30U);
    csd->dataReadAccessTime1 = (uint8_t)((rawCsd[3U] & 0xFF0000U) >> 16U);
    csd->dataReadAccessTime2 = (uint8_t)((rawCsd[3U] & 0xFF00U) >> 8U);
    csd->transferSpeed = (uint8_t)(rawCsd[3U] & 0xFFU);
    csd->cardCommandClass = (uint16_t)((rawCsd[2U] & 0xFFF00000U) >> 20U);
    csd->readBlockLength = (uint8_t)((rawCsd[2U] & 0xF0000U) >> 16U);
    if (rawCsd[2U] & 0x8000U)
    {
        csd->flags |= kSD_CsdReadBlockPartialFlag;
    }
    if (rawCsd[2U] & 0x4000U)
    {
        csd->flags |= kSD_CsdReadBlockPartialFlag;
    }
    if (rawCsd[2U] & 0x2000U)
    {
        csd->flags |= kSD_CsdReadBlockMisalignFlag;
    }
    if (rawCsd[2U] & 0x1000U)
    {
        csd->flags |= kSD_CsdDsrImplementedFlag;
    }
    switch (csd->csdStructure)
    {
        case 0:
            csd->deviceSize = (uint32_t)((rawCsd[2U] & 0x3FFU) << 2U);
            csd->deviceSize |= (uint32_t)((rawCsd[1U] & 0xC0000000U) >> 30U);
            csd->readCurrentVddMin = (uint8_t)((rawCsd[1U] & 0x38000000U) >> 27U);
            csd->readCurrentVddMax = (uint8_t)((rawCsd[1U] & 0x7000000U) >> 24U);
            csd->writeCurrentVddMin = (uint8_t)((rawCsd[1U] & 0xE00000U) >> 20U);
            csd->writeCurrentVddMax = (uint8_t)((rawCsd[1U] & 0x1C0000U) >> 18U);
            csd->deviceSizeMultiplier = (uint8_t)((rawCsd[1U] & 0x38000U) >> 15U);

            /* Get card total block count and block size. */
            card->blockCount = ((csd->deviceSize + 1U) << (csd->deviceSizeMultiplier + 2U));
            card->blockSize = (1U << (csd->readBlockLength));
            if (card->blockSize != FSL_SDMMC_DEFAULT_BLOCK_SIZE)
            {
                card->blockCount = (card->blockCount * card->blockSize);
                card->blockSize = FSL_SDMMC_DEFAULT_BLOCK_SIZE;
                card->blockCount = (card->blockCount / card->blockSize);
            }
            break;
        case 1:
            card->blockSize = FSL_SDMMC_DEFAULT_BLOCK_SIZE;

            csd->deviceSize = (uint32_t)((rawCsd[2U] & 0x3FU) << 16U);
            csd->deviceSize |= (uint32_t)((rawCsd[1U] & 0xFFFF0000U) >> 16U);
            if (csd->deviceSize >= 0xFFFFU)
            {
                card->flags |= kSD_SupportSdxcFlag;
            }

            card->blockCount = ((csd->deviceSize + 1U) * 1024U);
            break;
        default:
            break;
    }
    if ((uint8_t)((rawCsd[1U] & 0x4000U) >> 14U))
    {
        csd->flags |= kSD_CsdEraseBlockEnabledFlag;
    }
    csd->eraseSectorSize = (uint8_t)((rawCsd[1U] & 0x3F80U) >> 7U);
    csd->writeProtectGroupSize = (uint8_t)(rawCsd[1U] & 0x7FU);
    if ((uint8_t)(rawCsd[0U] & 0x80000000U))
    {
        csd->flags |= kSD_CsdWriteProtectGroupEnabledFlag;
    }
    csd->writeSpeedFactor = (uint8_t)((rawCsd[0U] & 0x1C000000U) >> 26U);
    csd->writeBlockLength = (uint8_t)((rawCsd[0U] & 0x3C00000U) >> 22U);
    if ((uint8_t)((rawCsd[0U] & 0x200000U) >> 21U))
    {
        csd->flags |= kSD_CsdWriteBlockPartialFlag;
    }
    if ((uint8_t)((rawCsd[0U] & 0x8000U) >> 15U))
    {
        csd->flags |= kSD_CsdFileFormatGroupFlag;
    }
    if ((uint8_t)((rawCsd[0U] & 0x4000U) >> 14U))
    {
        csd->flags |= kSD_CsdCopyFlag;
    }
    if ((uint8_t)((rawCsd[0U] & 0x2000U) >> 13U))
    {
        csd->flags |= kSD_CsdPermanentWriteProtectFlag;
    }
    if ((uint8_t)((rawCsd[0U] & 0x1000U) >> 12U))
    {
        csd->flags |= kSD_CsdTemporaryWriteProtectFlag;
    }
    csd->fileFormat = (uint8_t)((rawCsd[0U] & 0xC00U) >> 10U);
}

static status_t SD_SendCsd(sd_card_t *card)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};

    command.index = kSDMMC_SendCsd;
    command.argument = (card->relativeAddress << 16U);
    command.responseType = kCARD_ResponseTypeR2;

    content.command = &command;
    content.data = NULL;
    if (kStatus_Success == card->host.transfer(card->host.base, &content))
    {
        memcpy(card->rawCsd, command.response, sizeof(card->rawCsd));
        /* The response is from bit 127:8 in R2, corrisponding to command.response[3U]:command.response[0U][31U:8]. */
        SD_DecodeCsd(card, command.response);

        return kStatus_Success;
    }

    return kStatus_SDMMC_TransferFailed;
}

static void SD_DecodeCid(sd_card_t *card, uint32_t *rawCid)
{
    assert(card);
    assert(rawCid);

    sd_cid_t *cid;

    cid = &(card->cid);
    cid->manufacturerID = (uint8_t)((rawCid[3U] & 0xFF000000U) >> 24U);
    cid->applicationID = (uint16_t)((rawCid[3U] & 0xFFFF00U) >> 8U);

    cid->productName[0U] = (uint8_t)((rawCid[3U] & 0xFFU));
    cid->productName[1U] = (uint8_t)((rawCid[2U] & 0xFF000000U) >> 24U);
    cid->productName[2U] = (uint8_t)((rawCid[2U] & 0xFF0000U) >> 16U);
    cid->productName[3U] = (uint8_t)((rawCid[2U] & 0xFF00U) >> 8U);
    cid->productName[4U] = (uint8_t)((rawCid[2U] & 0xFFU));

    cid->productVersion = (uint8_t)((rawCid[1U] & 0xFF000000U) >> 24U);

    cid->productSerialNumber = (uint32_t)((rawCid[1U] & 0xFFFFFFU) << 8U);
    cid->productSerialNumber |= (uint32_t)((rawCid[0U] & 0xFF000000U) >> 24U);

    cid->manufacturerData = (uint16_t)((rawCid[0U] & 0xFFF00U) >> 8U);
}

static status_t SD_AllSendCid(sd_card_t *card)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};

    command.index = kSDMMC_AllSendCid;
    command.argument = 0U;
    command.responseType = kCARD_ResponseTypeR2;

    content.command = &command;
    content.data = NULL;
    if (kStatus_Success == card->host.transfer(card->host.base, &content))
    {
        memcpy(card->rawCid, command.response, sizeof(card->rawCid));
        SD_DecodeCid(card, command.response);

        return kStatus_Success;
    }

    return kStatus_SDMMC_TransferFailed;
}

static status_t SD_ApplicationSendOperationCondition(sd_card_t *card, uint32_t argument)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};
    status_t error = kStatus_Fail;
    uint32_t i = FSL_SDMMC_MAX_VOLTAGE_RETRIES;

    command.index = kSD_ApplicationSendOperationCondition;
    command.argument = argument;
    command.responseType = kCARD_ResponseTypeR3;

    while (i--)
    {
        if (kStatus_Success != SD_SendApplicationCmd(card, 0U))
        {
            continue;
        }

        content.command = &command;
        content.data = NULL;
        if (kStatus_Success != card->host.transfer(card->host.base, &content))
        {
            return kStatus_SDMMC_TransferFailed;
        }

        /* Wait until card exit busy state. */
        if (command.response[0U] & kSD_OcrPowerUpBusyFlag)
        {
            /* high capacity check */
            if (command.response[0U] & kSD_OcrCardCapacitySupportFlag)
            {
                card->flags |= kSD_SupportHighCapacityFlag;
            }
            /* 1.8V support */
            if (command.response[0U] & kSD_OcrSwitch18AcceptFlag)
            {
                card->flags |= kSD_SupportVoltage180v;
            }
            error = kStatus_Success;
            card->ocr = command.response[0U];
            break;
        }
        error = kStatus_Timeout;
    }

    return error;
}

static status_t SD_SendInterfaceCondition(sd_card_t *card)
{
    assert(card);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};
    uint32_t i = FSL_SDMMC_MAX_CMD_RETRIES;
    status_t error;

    command.index = kSD_SendInterfaceCondition;
    command.argument = 0x1AAU;
    command.responseType = kCARD_ResponseTypeR7;

    content.command = &command;
    content.data = NULL;
    do
    {
        if (kStatus_Success != card->host.transfer(card->host.base, &content))
        {
            error = kStatus_SDMMC_TransferFailed;
        }
        else
        {
            if ((command.response[0U] & 0xFFU) != 0xAAU)
            {
                error = kStatus_SDMMC_CardNotSupport;
            }
            else
            {
                error = kStatus_Success;
            }
        }
    } while (--i && (error != kStatus_Success));

    return error;
}

static status_t SD_SelectBusTiming(sd_card_t *card)
{
    assert(card);

    status_t error = kStatus_SDMMC_SwitchBusTimingFailed;

    if (card->operationVoltage != kCARD_OperationVoltage180V)
    {
        /* Switch the card to high speed mode */
        if (card->host.capability.flags & kHOST_SupportHighSpeed)
        {
            /* group 1, function 1 ->high speed mode*/
            error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionSDR25HighSpeed);
            /* If the result isn't "switching to high speed mode(50MHZ) successfully or card doesn't support high speed
             * mode". Return failed status. */
            if (error == kStatus_Success)
            {
                card->currentTiming = kSD_TimingSDR25HighSpeedMode;
                card->busClock_Hz = HOST_SET_CARD_CLOCK(card->host.base, card->host.sourceClock_Hz, SD_CLOCK_50MHZ);
            }
        }
        else
        {
            /* if not support high speed, keep the card work at default mode */
            return kStatus_Success;
        }
    }
    /* card is in UHS_I mode */
    else if ((kHOST_SupportSDR104 != HOST_NOT_SUPPORT) || (kHOST_SupportSDR50 != HOST_NOT_SUPPORT) ||
             (kHOST_SupportDDR50 != HOST_NOT_SUPPORT))
    {
        switch (card->currentTiming)
        {
            /* if not select timing mode, sdmmc will handle it automatically*/
            case kSD_TimingSDR12DefaultMode:
            case kSD_TimingSDR104Mode:
                error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionSDR104);
                if (error == kStatus_Success)
                {
                    card->currentTiming = kSD_TimingSDR104Mode;
                    card->busClock_Hz =
                        HOST_SET_CARD_CLOCK(card->host.base, card->host.sourceClock_Hz, HOST_SUPPORT_SDR104_FREQ);
                    break;
                }
            case kSD_TimingDDR50Mode:
                error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionDDR50);
                if (error == kStatus_Success)
                {
                    card->currentTiming = kSD_TimingDDR50Mode;
                    card->busClock_Hz =
                        HOST_SET_CARD_CLOCK(card->host.base, card->host.sourceClock_Hz, SD_CLOCK_100MHZ);
                    HOST_ENABLE_DDR_MODE(card->host.base, true);
                }
                break;
            case kSD_TimingSDR50Mode:
                error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionSDR50);
                if (error == kStatus_Success)
                {
                    card->currentTiming = kSD_TimingSDR50Mode;
                    card->busClock_Hz =
                        HOST_SET_CARD_CLOCK(card->host.base, card->host.sourceClock_Hz, SD_CLOCK_100MHZ);
                }
                break;
            case kSD_TimingSDR25HighSpeedMode:
                error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionSDR25HighSpeed);
                if (error == kStatus_Success)
                {
                    card->currentTiming = kSD_TimingSDR25HighSpeedMode;
                    card->busClock_Hz = HOST_SET_CARD_CLOCK(card->host.base, card->host.sourceClock_Hz, SD_CLOCK_50MHZ);
                }
                break;

            default:
                break;
        }
    }
    else
    {
    }

    return error;
}

static status_t SD_SetDriverStrength(sd_card_t *card, sd_driver_strength_t driverStrength)
{
    assert(card);

    status_t error;
    uint32_t strength = driverStrength;

    error = SD_SelectFunction(card, kSD_GroupDriverStrength, strength);

    return error;
}

static status_t SD_SetMaxCurrent(sd_card_t *card, sd_max_current_t maxCurrent)
{
    assert(card);

    status_t error;
    uint32_t current = maxCurrent;

    error = SD_SelectFunction(card, kSD_GroupCurrentLimit, current);

    return error;
}

static status_t SD_Read(sd_card_t *card, uint8_t *buffer, uint32_t startBlock, uint32_t blockSize, uint32_t blockCount)
{
    assert(card);
    assert(buffer);
    assert(blockCount);
    assert(blockSize);
    assert(blockSize == FSL_SDMMC_DEFAULT_BLOCK_SIZE);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};
    HOST_DATA data = {0};
    status_t error;

    if (((card->flags & kSD_SupportHighCapacityFlag) && (blockSize != 512U)) || (blockSize > card->blockSize) ||
        (blockSize > card->host.capability.maxBlockLength) || (blockSize % 4))
    {
        return kStatus_SDMMC_CardNotSupport;
    }

    /* Wait for the card write process complete because of that card read process and write process use one buffer. */
    if (kStatus_Success != SD_WaitWriteComplete(card))
    {
        return kStatus_SDMMC_WaitWriteCompleteFailed;
    }

    data.blockSize = blockSize;
    data.blockCount = blockCount;
    data.rxData = (uint32_t *)buffer;

    command.index = kSDMMC_ReadMultipleBlock;
    if (data.blockCount == 1U)
    {
        command.index = kSDMMC_ReadSingleBlock;
    }
    command.argument = startBlock;
    if (!(card->flags & kSD_SupportHighCapacityFlag))
    {
        command.argument *= data.blockSize;
    }
    command.responseType = kCARD_ResponseTypeR1;
    command.responseErrorFlags = kSDMMC_R1ErrorAllFlag;

    content.command = &command;
    content.data = &data;

    error = SD_Transfer(card, &content, 1U);
    if (kStatus_Success != error)
    {
        return error;
    }

    /* Send STOP_TRANSMISSION command in multiple block transmission and host's AUTO_COMMAND12 isn't enabled. */
    if ((data.blockCount > 1U) && (!(data.enableAutoCommand12)))
    {
        if (kStatus_Success != SD_StopTransmission(card))
        {
            return kStatus_SDMMC_StopTransmissionFailed;
        }
    }

    return kStatus_Success;
}

static status_t SD_Write(
    sd_card_t *card, const uint8_t *buffer, uint32_t startBlock, uint32_t blockSize, uint32_t blockCount)
{
    assert(card);
    assert(buffer);
    assert(blockCount);
    assert(blockSize);
    assert(blockSize == FSL_SDMMC_DEFAULT_BLOCK_SIZE);

    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};
    HOST_DATA data = {0};
    status_t error;

    if (((card->flags & kSD_SupportHighCapacityFlag) && (blockSize != 512U)) || (blockSize > card->blockSize) ||
        (blockSize > card->host.capability.maxBlockLength) || (blockSize % 4U))
    {
        return kStatus_SDMMC_CardNotSupport;
    }

    /* Wait for the card's buffer to be not full to write to improve the write performance. */
    while ((GET_HOST_STATUS(card->host.base) & CARD_DATA0_STATUS_MASK) != CARD_DATA0_NOT_BUSY)
    {
    }

    /* Wait for the card write process complete because of that card read process and write process use one buffer.*/
    if (kStatus_Success != SD_WaitWriteComplete(card))
    {
        return kStatus_SDMMC_WaitWriteCompleteFailed;
    }

    data.blockSize = blockSize;
    data.blockCount = blockCount;
    data.txData = (const uint32_t *)buffer;

    command.index = kSDMMC_WriteMultipleBlock;
    if (data.blockCount == 1U)
    {
        command.index = kSDMMC_WriteSingleBlock;
    }
    command.argument = startBlock;
    if (!(card->flags & kSD_SupportHighCapacityFlag))
    {
        command.argument *= data.blockSize;
    }
    command.responseType = kCARD_ResponseTypeR1;
    command.responseErrorFlags = kSDMMC_R1ErrorAllFlag;

    content.command = &command;
    content.data = &data;

    error = SD_Transfer(card, &content, 1U);
    if (kStatus_Success != error)
    {
        return error;
    }

    /* Send STOP_TRANSMISSION command in multiple block transmission and host's AUTO_COMMAND12 isn't enabled. */
    if ((data.blockCount > 1U) && (!(data.enableAutoCommand12)))
    {
        if (kStatus_Success != SD_StopTransmission(card))
        {
            return kStatus_SDMMC_StopTransmissionFailed;
        }
    }

    return kStatus_Success;
}

static status_t SD_Erase(sd_card_t *card, uint32_t startBlock, uint32_t blockCount)
{
    assert(card);
    assert(blockCount);

    uint32_t eraseBlockStart;
    uint32_t eraseBlockEnd;
    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};

    /* Wait for the card's buffer to be not full to write to improve the write performance. */
    while ((GET_HOST_STATUS(card->host.base) & CARD_DATA0_STATUS_MASK) != CARD_DATA0_NOT_BUSY)
    {
    }

    /* Wait for the card write process complete because of that card read process and write process use one buffer.*/
    if (kStatus_Success != SD_WaitWriteComplete(card))
    {
        return kStatus_SDMMC_WaitWriteCompleteFailed;
    }

    eraseBlockStart = startBlock;
    eraseBlockEnd = eraseBlockStart + blockCount - 1U;
    if (!(card->flags & kSD_SupportHighCapacityFlag))
    {
        eraseBlockStart = eraseBlockStart * FSL_SDMMC_DEFAULT_BLOCK_SIZE;
        eraseBlockEnd = eraseBlockEnd * FSL_SDMMC_DEFAULT_BLOCK_SIZE;
    }

    /* Send ERASE_WRITE_BLOCK_START command to set the start block number to erase. */
    command.index = kSD_EraseWriteBlockStart;
    command.argument = eraseBlockStart;
    command.responseType = kCARD_ResponseTypeR1;
    command.responseErrorFlags = kSDMMC_R1ErrorAllFlag;

    content.command = &command;
    content.data = NULL;

    if (kStatus_Success != SD_Transfer(card, &content, 1U))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    /* Send ERASE_WRITE_BLOCK_END command to set the end block number to erase. */
    command.index = kSD_EraseWriteBlockEnd;
    command.argument = eraseBlockEnd;

    content.command = &command;
    content.data = NULL;
    if (kStatus_Success != SD_Transfer(card, &content, 0U))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    /* Send ERASE command to start erase process. */
    command.index = kSDMMC_Erase;
    command.argument = 0U;
    command.responseType = kCARD_ResponseTypeR1b;
    command.responseErrorFlags = kSDMMC_R1ErrorAllFlag;

    content.command = &command;
    content.data = NULL;
    if (kStatus_Success != SD_Transfer(card, &content, 0U))
    {
        return kStatus_SDMMC_TransferFailed;
    }

    return kStatus_Success;
}

status_t SD_Init(sd_card_t *card)
{
    assert(card);

    uint32_t applicationCommand41Argument = 0U;
    status_t error = kStatus_Success;
    card_operation_voltage_t tempVoltage = kCARD_OperationVoltageNone;

    if (!card->isHostReady)
    {
        error = HOST_Init(&(card->host));
        if (error != kStatus_Success)
        {
            return error;
        }
        /* set the host status flag, after the card re-plug in, don't need init host again */
        card->isHostReady = true;
    }

    /* voltage switch to normal but not 1.8V */
    HOST_SWITCH_VOLTAGE180V(card->host.base, false);
    /* Disable DDR mode */
    HOST_ENABLE_DDR_MODE(card->host.base, false);
    /* disable tuning */
    HOST_EXECUTE_STANDARD_TUNING_ENABLE(card->host.base, false);
    /* set data bus width to 1bit */
    HOST_SET_CARD_BUS_WIDTH(card->host.base, kHOST_DATABUSWIDTH1BIT);

    /*detect card insert*/
    error = CardInsertDetect(card->host.base);
    if (error != kStatus_Success)
    {
        return error;
    }
    /* delay for power up ramp time*/
    SDMMC_Delay(200U);
    /*set card freq to 400KHZ*/
    card->busClock_Hz = HOST_SET_CARD_CLOCK(card->host.base, card->host.sourceClock_Hz, SDMMC_CLOCK_400KHZ);
    /* send card active */
    HOST_SEND_CARD_ACTIVE(card->host.base, 100U);
    /* reset variables */
    card->flags = 0U;

    if (kStatus_Success != SD_GoIdle(card))
    {
        return kStatus_SDMMC_GoIdleFailed;
    }

    /* Hand-shaking with card to validate the interface voltage range. */
    /* Get host capability. */
    GET_HOST_CAPABILITY(card->host.base, &(card->host.capability));
    if (kHOST_SupportV330 != HOST_NOT_SUPPORT)
    {
        applicationCommand41Argument |= (kSD_OcrVdd32_33Flag | kSD_OcrVdd33_34Flag);
        tempVoltage = kCARD_OperationVoltage330V;
    }
    else if (kHOST_SupportV300 != HOST_NOT_SUPPORT)
    {
        applicationCommand41Argument |= kSD_OcrVdd29_30Flag;
        tempVoltage = kCARD_OperationVoltage330V;
    }

    /* allow user select the work voltage, if not select, sdmmc will handle it automatically */
    if ((kHOST_SupportV180 != HOST_NOT_SUPPORT) && ((card->operationVoltage == kCARD_OperationVoltageNone) ||
                                                    (card->operationVoltage == kCARD_OperationVoltage180V)))
    {
        /*switch to 1.8V request*/
        applicationCommand41Argument |= kSD_OcrSwitch18RequestFlag;
    }

    /* Check card's supported interface condition. */
    if (kStatus_Success == SD_SendInterfaceCondition(card))
    {
        /* SDHC or SDXC card */
        applicationCommand41Argument |= kSD_OcrHostCapacitySupportFlag;
        card->flags |= kSD_SupportSdhcFlag;
    }
    else
    {
        /* SDSC card */
        if (kStatus_Success != SD_GoIdle(card))
        {
            return kStatus_SDMMC_GoIdleFailed;
        }
    }
    /* Set card interface condition according to SDHC capability and card's supported interface condition. */
    if (kStatus_Success != SD_ApplicationSendOperationCondition(card, applicationCommand41Argument))
    {
        return kStatus_SDMMC_HandShakeOperationConditionFailed;
    }

    /* check if card support 1.8V */
    if ((card->flags & kSD_SupportVoltage180v))
    {
        if (kStatus_Success != SD_SwitchVoltage(card))
        {
            return kStatus_SDMMC_InvalidVoltage;
        }
        card->operationVoltage = kCARD_OperationVoltage180V;
    }
    else
    {
        card->operationVoltage = tempVoltage;
    }

    /* Initialize card if the card is SD card. */
    if (kStatus_Success != SD_AllSendCid(card))
    {
        return kStatus_SDMMC_AllSendCidFailed;
    }
    if (kStatus_Success != SD_SendRca(card))
    {
        return kStatus_SDMMC_SendRelativeAddressFailed;
    }
    if (kStatus_Success != SD_SendCsd(card))
    {
        return kStatus_SDMMC_SendCsdFailed;
    }
    if (kStatus_Success != SD_SelectCard(card, true))
    {
        return kStatus_SDMMC_SelectCardFailed;
    }

    if (kStatus_Success != SD_SendScr(card))
    {
        return kStatus_SDMMC_SendScrFailed;
    }

    /* Set to max frequency in non-high speed mode. */
    card->busClock_Hz = HOST_SET_CARD_CLOCK(card->host.base, card->host.sourceClock_Hz, SD_CLOCK_25MHZ);

    /* Set to 4-bit data bus mode. */
    /*if (((card->host.capability.flags) & kHOST_Support4BitBusWidth) && (card->flags & kSD_Support4BitWidthFlag))
    {
        if (kStatus_Success != SD_SetDataBusWidth(card, kSD_DataBusWidth4Bit))
        {
            return kStatus_SDMMC_SetDataBusWidthFailed;
        }
        HOST_SET_CARD_BUS_WIDTH(card->host.base, kHOST_DATABUSWIDTH4BIT);
    }*/

    /* set sd card driver strength */
    SD_SetDriverStrength(card, card->driverStrength);
    /* set sd card current limit */
    SD_SetMaxCurrent(card, card->maxCurrent);

    /* set block size */
    if (SD_SetBlockSize(card, FSL_SDMMC_DEFAULT_BLOCK_SIZE))
    {
        return kStatus_SDMMC_SetCardBlockSizeFailed;
    }

    /* select bus timing */
    if (kStatus_Success != SD_SelectBusTiming(card))
    {
        return kStatus_SDMMC_SwitchBusTimingFailed;
    }

    /* SDR50 and SDR104 mode need tuning */
    if ((card->currentTiming == kSD_TimingSDR50Mode) || (card->currentTiming == kSD_TimingSDR104Mode))
    {
        /* config IO strength in IOMUX*/
        if (card->currentTiming == kSD_TimingSDR50Mode)
        {
            HOST_CONFIG_SD_IO(CARD_BUS_FREQ_100MHZ1, CARD_BUS_STRENGTH_7);
        }
        else
        {
            HOST_CONFIG_SD_IO(CARD_BUS_FREQ_200MHZ, CARD_BUS_STRENGTH_7);
        }
        /* execute tuning */
        if (SD_ExecuteTuning(card) != kStatus_Success)
        {
            return kStatus_SDMMC_TuningFail;
        }
    }
    else if (card->currentTiming == kSD_TimingDDR50Mode)
    {
        HOST_CONFIG_SD_IO(CARD_BUS_FREQ_100MHZ1, CARD_BUS_STRENGTH_3);
    }

    return kStatus_Success;
}

void SD_Deinit(sd_card_t *card)
{
    assert(card);

    SD_SelectCard(card, false);
    HOST_Deinit(&(card->host));
    /* should re-init host */
    card->isHostReady = false;
}

bool SD_CheckReadOnly(sd_card_t *card)
{
    assert(card);

    return ((card->csd.flags & kSD_CsdPermanentWriteProtectFlag) ||
            (card->csd.flags & kSD_CsdTemporaryWriteProtectFlag));
}

status_t SD_ReadBlocks(sd_card_t *card, uint8_t *buffer, uint32_t startBlock, uint32_t blockCount)
{
    assert(card);
    assert(buffer);
    assert(blockCount);

    uint32_t blockCountOneTime;
    uint32_t blockLeft;
    uint32_t blockDone;
    uint8_t *nextBuffer;
    status_t error;

    if ((blockCount + startBlock) > card->blockCount)
    {
        return kStatus_InvalidArgument;
    }

    blockLeft = blockCount;
    blockDone = 0U;
    while (blockLeft)
    {
        if (blockLeft > card->host.capability.maxBlockCount)
        {
            blockLeft = (blockLeft - card->host.capability.maxBlockCount);
            blockCountOneTime = card->host.capability.maxBlockCount;
        }
        else
        {
            blockCountOneTime = blockLeft;
            blockLeft = 0U;
        }

        nextBuffer = (buffer + blockDone * FSL_SDMMC_DEFAULT_BLOCK_SIZE);
        error = SD_Read(card, nextBuffer, (startBlock + blockDone), FSL_SDMMC_DEFAULT_BLOCK_SIZE, blockCountOneTime);
        if (error != kStatus_Success)
        {
            return error;
        }

        blockDone += blockCountOneTime;
    }

    return kStatus_Success;
}

status_t SD_WriteBlocks(sd_card_t *card, const uint8_t *buffer, uint32_t startBlock, uint32_t blockCount)
{
    assert(card);
    assert(buffer);
    assert(blockCount);

    uint32_t blockCountOneTime; /* The block count can be wrote in one time sending WRITE_BLOCKS command. */
    uint32_t blockLeft;         /* Left block count to be wrote. */
    uint32_t blockDone = 0U;    /* The block count has been wrote. */
    const uint8_t *nextBuffer;
    status_t error;

    if ((blockCount + startBlock) > card->blockCount)
    {
        return kStatus_InvalidArgument;
    }

    blockLeft = blockCount;
    while (blockLeft)
    {
        if (blockLeft > card->host.capability.maxBlockCount)
        {
            blockLeft = (blockLeft - card->host.capability.maxBlockCount);
            blockCountOneTime = card->host.capability.maxBlockCount;
        }
        else
        {
            blockCountOneTime = blockLeft;
            blockLeft = 0U;
        }

        nextBuffer = (buffer + blockDone * FSL_SDMMC_DEFAULT_BLOCK_SIZE);
        error = SD_Write(card, nextBuffer, (startBlock + blockDone), FSL_SDMMC_DEFAULT_BLOCK_SIZE, blockCountOneTime);
        if (error != kStatus_Success)
        {
            return error;
        }

        blockDone += blockCountOneTime;
    }

    return kStatus_Success;
}

status_t SD_EraseBlocks(sd_card_t *card, uint32_t startBlock, uint32_t blockCount)
{
    assert(card);
    assert(blockCount);

    uint32_t blockCountOneTime; /* The block count can be erased in one time sending ERASE_BLOCKS command. */
    uint32_t blockDone = 0U;    /* The block count has been erased. */
    uint32_t blockLeft;         /* Left block count to be erase. */
    status_t error;

    if ((blockCount + startBlock) > card->blockCount)
    {
        return kStatus_InvalidArgument;
    }

    blockLeft = blockCount;
    while (blockLeft)
    {
        if (blockLeft > (card->csd.eraseSectorSize + 1U))
        {
            blockCountOneTime = card->csd.eraseSectorSize + 1U;
            blockLeft = blockLeft - blockCountOneTime;
        }
        else
        {
            blockCountOneTime = blockLeft;
            blockLeft = 0U;
        }

        error = SD_Erase(card, (startBlock + blockDone), blockCountOneTime);
        if (error != kStatus_Success)
        {
            return error;
        }

        blockDone += blockCountOneTime;
    }

    return kStatus_Success;
}


United Kingdom Chats and Forums directory is a free web listing of Internet web sites of United Kingdom.
Chats and Forums category provides listings of useful websites of United Kingdom. If you have an United Kingdom Internet website that is relevant to this category of our Internet Chats and Forums directory, you are welcome to submit it. In order to add your website to Chats and Forums category, click on "Add URL" and fill out the site description form.


EOC Tech Center releases their Fall 2017 Small Business Management Programs. For more information, contact Harold Baade, Small Business Programs Coordinator at 390-5313 or hbaade@eoctech.edu.
We had a great opportunity to have lunch with Senator James Lankford and learn about Lankford's plans, challenges and ideas about everything ranging from health care, foreign affairs, to court nominees and more.
Thanks to Okie Express Auto Wash every single golfer will receive a $15 car wash! Thank you, Okie Express Auto Wash!
Thanks to Comtec Security, this Gazebo Chandelier could be yours! Just another reason why our annual golf tournament is everyone's favorite!
Thanks to Choctaw Liquor Depot for this fantastic door prize! Our annual golf tournament is one of our most popular events of the year all because of our fantastic members!
It's that time of year again! Get yourself Oktoberfest ready! Choctaw Creek Park, Choctaw.
Watch McGregor vs. Mayweather at Calico Joe's on Aug. 26. $15 entry fee, opens at 7:30 PM, fight starts at 8 PM. Limited food menu and drink specials.


A nasty Fuzz Octave based on the most famous transformer based octave pedal of our time. With an additional input gain control you have even more flexibility over your octave tones than ever before. So whether you like a hint of octave or a full onslaught of nasty fuzzy octave tones the Octave Up is sure to deliver. The Octave up also comes in a compact size therefore it doesn't take up all of that valuable space on your pedal board. It should be noted that as with any other fuzz based octave pedal you will achieve the best results when you use the Octave Up in conjunction with another fuzz or overdrive pedal. This will ad to the sustain of the octave notes and fill out the pedal quite nicely. The Octave Up is true bypass and is powered by an industry standard 2.1mm center negative power supply or 9v battery. It is also hand made from the highest quality components available today and is backed by a one year warranty. If you happen to have any questions about this or any Wilson Effects pedals please feel free to contact me via email at wilsoneffects@wilsoneffects.com.


text:
How the Covid-19 Pandemic May Shape Our Future
The global pandemic has exposed several medical, public health, societal, and even structural limitations some of which are likely to see an increased focus during and after the pandemic ...
Published first on LinkedIn in March 2020
The global pandemic has exposed several medical, public health, societal, and even structural limitations some of which are likely to see an increased focus during and after the pandemic - presenting opportunities for investors, entrepreneurs, tech. companies, and startups.
"It is not the strongest of the species that survives, nor the most intelligent, but the one most responsive to change" - paraphrased quote attributed to Charles Darwin
Covid-19 is a tragedy that has exposed some gaps in preparedness and management that are opportunities for innovation and change
The Covid-19 pandemic is a human tragedy and a catastrophic event of scale we have not witnessed in recent history. Time will tell whether this will be the watershed event of our lifetime but one thing is clear that neither the public health institutions nor governments (developed or developing) or the private sector were prepared for this and the ripples it has caused. Necessity is the mother of invention or innovation and Covid-19 pandemic will bring to light not only some opportunities for improvement and innovations but could fundamentally change the fabric of society and bring about structural changes to institutions, markets and the metropolitan living model.
A matrixed view of opportunities and changes
Opportunities in pandemic management
The Covid-19 crisis is expected to last at least 2 seasons in the northern hemisphere. In order to manage the situation now and when normal life and business start getting back there are a few capabilities that need urgent development and mass availability:
1) Smart and verifiable tracking of current and past infections (immunity) with Immunoglobulins - Besides therapeutics and other treatments, in order to restrict spread through travel, a verifiable registry (perhaps blockchain based) of individual IgG/IgM against the pathogen could be used as a check for travel (Temperature and symptom checks obviously have failed)
2) Sharing economy models for healthcare on Telehealth is already happening with doctors helping hospitals across state line. Ride share companies like Uber and Lyft or EHR/Telehealth providers could rapidly implement a provider discovery and treatment service to address surge capacity needs in pandemic hotspots
3) GTech or G2B/G2C tech is government (all levels) using the power of tech to reach people and small businesses (and other governments) to provide accurate information, assistance, stimulus and disaster loans (instant workflow capital access). While this is already happening, the Government agencies like SBA could leverage unused fintech capacity and fintech innovations like alternative credit decisioning, blockchain and data aggregators to streamline their current processes.
Modernization of Healthcare with Smart Telehealth, AI, Robotics and edge devices for Dx
1) Digital and AI technology adoption in health care is quite lagging compared to other industries. We are close to having autonomous driving vehicles or know more about the the temperature and pressure of atmospheres of planets billions of miles away yet a medical provider can't measure quantitatively the symptoms like temperature and blood pressure of a Telehealth patient a few miles away (instead Telehealth implementation focus is on ensuring HIPAA compliance) let alone a CT scan of their lungs to assess the severity of high contagious infection. Covid-19 will likely see the modernization of health care with Digital, AI, Robots and edge instruments (like sensors connected to mobile phones and wearable that can provide facesheet of a patient). Opportunities are endless including things that are relevant to the pandemic we are in like leveraging Robots for swabs and intubation. It is conceivable that mobile phones and wearables will become mobile hospital pods allowing for effective distance care.
2) Immunogenic treatment as EpiPen for mass use for the vulnerable - blood plasma derived therapeutics like providing antibody from recovered healthy to vulnerable population to develop a strong immune response that can be made available like EpiPen shots. For example, an immune compromised patient when accidentally exposed to a pathogen and developing symptoms or other indicators (like IgM) can be given a shot of antibodies to augment their immune system. This would require studies, approvals and distribution but could be a lifesaver if it works for the most vulnerable amongst us.
Supply chain resiliency and 3-D printing based manufacturing for critical pandemic supplies
1) Permissioned blockchain networks of supply chain have already added transparency and efficiencies. While the adoption of these are in pockets, a macro blockchain based supply chain system for key food and medical items that provides transparency and ability to dynamically alter in response to pandemics or other disasters will improve the preparedness of the supply chain for disasters like this.
2) The Defense Production Act that President Trump invoked was enacted in 1950 in response to the needs of then Korean war. Manufacturing and production have changed in the 70 years and with technologies such as 3-D printing, why can't we have 3-D printing capabilities for N95 masks and even other medical equipments with inventory challenges. A modern version of Defense Production Act needs to address 3-D printing capabilities across the nation.
Immersive distance learning with VR/AR
In this new normal, students of all ages are becoming intimately familiar with distance learning (via Zoom, Google Meet and other digital collaboration tools or online education portals like Khan Academy, Udemy etc). The opportunity here is to augment distance learning with immersive learning like how a student would learn in a lab. (credit to Jim Blair at DVC for bringing this up). Zoom is worth $40 Billion (at a P/E ratio of 1800+ which is crazy) but the startup that creates immersive learning experiences integrated with MOOCs may well beat that by multiples.
It is conceivable that several conferences and expos this year will pivot to an immersive digital event format. iValley, the host and producer of FINTECHTALK™, the intersection of silicon valley and financial services event, is exploring such an immersive production in fall of 2020.
Decongesting metropolitan spaces - reducing population density
We don't have to be a data scientist to conclude that the most vulnerable places especially in the U.S. have been the metropolitan areas like New York City. High population density, network of public transportation, large number travelers in and out provides fertile ground for pathogen spreads. While we don't expect high density metros to go away anytime soon, city planners and government agencies will be looking at pandemic control codes in the future. I have always wondered if high density metros are also fundamentally less sustainable as they result in huge movements of food, materials and energy from points of productions.
Resiliency of markets
March 2020 saw equity markets throughout the world lose multiple trillion of dollars in a matter of days (some of which has been recreated in the recent rallies). While the Covid-19 pandemic and resulting social distancing was going to affect several businesses, most of the reaction in the markets was due to emotions and not fundamentals (and maybe some senators and billionaires moving to cash positions on non public information). There are circuit breakers in markets which get triggered by at thresholds and too much control in a free market may not be the right thing to do but one has to wonder in this age of algorithmic, high frequency trading, do markets need to be more immune to emotion and track to financial fundamentals.
Rethinking National security
What are the defense and intelligence capabilities that need to be developed to combat future threats from adversaries that may plan things resembling a Covid-19 attack. I am sure this is an area of focus for defense and intelligence agencies. Bio threats, cyber-security threats, supply chain disruptions will become paramount national security considerations.
This pandemic will indisputably shape our future and the areas we focus as communities, nations and the human race. Reminds me of the lines from the great Bob Dylan song The Times They Are A Changing
"Come gather 'round people Wherever you roam And admit that the waters Around you have grown And accept it that soon You'll be drenched to the bone. If your time to you Is worth savln' Then you better start Swimmin' Or you'll sink like a stone For the times they are a-changin'."
Out of great tragedies comes great purpose and will. Are we ready?
Paddy Ramanathan is Founder and Managing Director of the iValley Innovation Center in the East San Francisco bay area. iValley Innovation Center (http://www.ivalley.co) is a corporate venture studio and host of FINTECHTALK™. iValley's mission is to incubate and catalyze the development of big ideas and innovation.
11040 Bollinger Canyon Rd,


BuddyPress Registration Groups is a plugin that adds a list of groups to the registration form so that new members can be introduced and choose to join your groups. It means they don't need to go looking for them to be instantly tied in to their preferred groups. Adding this kind or form to your registration can help you to build a profile for each new member.
The main gotcha is showing too many groups in the registration form, creating a cumbersome form, you are able to limit the number of groups shown and the selection criteria allow you to show your top ten groups for new users to join. I think one interesting enhancement to this would be the ability to specify exactly which group to show in which order. Then you could choose to actively promote specific groups, but as it is this is a very useful plugin.
One aspect of this plugin is how it can help with the prevention of spammers. By filling out their group preferences at sign up your users are helping you paint a picture of them, which helps if you are actively moderating new members.
This plugin really does help kick off site participation, I think it's one of the most useful BuddyPress registration plugins around.
As you can see the "JOIN OUR GROUPS" text is sitting a little too close to the input box above it. The entire block is sitting to the right, instead of the left and also in my instance the group selection box is a little too wide.
Obviously there's other CSS elements that need to change to get this form looking really good, but this is just an example of what you can do.
Overall I give this plugin 10 out of 10, it works really well, is stable and well maintained, it usually needs a few tweaks in CSS but so does most of WordPress! I think there is more room for development but actually I'm pretty happy with the plugin as it stands!
Just installed it and it's working well. One feature request for the next update: If the admin could select the featured groups (which are not necessarily the most popular) in the plugin settings, this would make this plugin even more awesome.
I was a hesitant to install as the plugin has not been updated in six months, but this is an absolutely necessary feature for my site. So far works marvelously, thanks!!!


The Dewitt County Courthouse, located in the county seat of Cuero and completed in 1896, survives as one of the finest examples of Richardsonian Romanesque architectural designs in Texas, inspiring a particular affinity for its characteristics as well as its unusual history among architects, historians, and courthouse enthusiasts across the state. The three-story structure, comprised of rusticated Pecos and Leon sandstone in hues of light brown and red, features polished granite columns, granite steps and a six-story clock tower. Its Richardsonian style, formulated by the Louisiana-born and French-trained architect Henry Hobson Richardson, rose to national popularity in the late 19th century and was considered a modern, distinctly American break from the prevailing European classicism once dominating architectural design. Bold, massive details in rustic stone, wide and low semicircular-arched doorways, deep set porches, and a variety of colored stonework distinguish the movement, all characteristics found in the Dewitt County courthouse details.
The courthouse was designed by Texas-born and Austin-based architect Arthur Osborn Watson who, together with his partner Jacob L. Larmour, was responsible for a half-dozen Texas county courthouses, the Gothic Revival All Saints Episcopal Chapel of Austin, and numerous homes and institutional buildings in the state's capital. Curiously, although Watson completed the designs for the Dewitt courthouse he never finished its construction, abdicating any responsibility for its completion in November of 1895. His construction superintendent, Paul Helwig, submitted a written report to the Dewitt County Commissioners Court the following month, stating that the building had reached the stage where an immediate continuation of the work was imperative in order to secure the integrity of the building's structure. Shortly after submitting his report, Helwig resigned from the project.
Within the month, the county entered into a new contract for the completion of the courthouse with prominent Houston architect Eugene T. Heiner, a leader in developing the architecture profession in Texas and, along with Watson, considered one of the founding fathers of the Texas Society of Architects. Heiner completed the project and the county accepted their new courthouse on May 20, 1896.
A dramatic interior renovation in the 1950s, courtesy of the design studio of San Antonio architect Ralph Haywood Cameron, removed much of Watson's original materials and design. Cameron, considered one of the state's leading architects during the first half of the 20th century, created an impressive body of work worthy of its own preservation and restoration. However, the decision was made to return the Dewitt County Courthouse to Watson's original design. Cameron's work had done little to change the exterior but the courthouse interior required a significant amount of work and financing to return it to its 1896 iteration. In fact, the Dewitt County courthouse restoration project truly became a labor of love when a lack of funding resulted in Cuero volunteers hand-painting more than three hundred pressed-metal panels fabricated/manufactured for reconstruction of the courtroom ceiling. If you gain access to the attic, you will see hundreds of handwritten dedications on the back side of the tiles.


On Friday 23rd November, Edinburgh Healthcare Coordinator, Lee McClung, shaved his hair for the cancer charity, Macmillan. Diana Boyd, Edinburgh's Branch Manager, took great pleasure in doing the shaving!
"After my Papa being a very lucky survivor of cancer, my Nana has now been diagnosed with breast cancer. I have decided to now help raise money to help fight this disease and help give hope and strength to all those still going through what we have. My workplace are being so supportive and we will be doing the shave on the day in the office at Newcross Healthcare Edinburgh. If you would like to come along to support, give us a call to confirm the details."
Congratulations Lee - we think you look great!
To donate to Lee, you can do so by following this link.


text:
Q: Probabilistic game involving tiles and patterns This is a probability question related to a board game. You   basically had to compute the probability of winning (by selecting the optimum strategy). The game was that you have tiles with patterns underneath and to win you have to flip two tiles with the same figure underneath. (a)The first game is with 4 tiles and 2 patterns. (b)The second game is with 6 tiles and 2 patterns.
I have no idea how to proceed with this question.
Thank You

redpajama_set_name: RedPajamaStackExchange


Discussion in 'General Discussion' started by joe_hill115side, Apr 13, 2019.
I am currently designing a PWM board for DIY vaping purposes, but need assistance with the microcontroller portion.
Please use private Conversation feature of the forum.


Beautiful Ocean Front Home with Pool. Sleeps 12. Views of the Atlantic City Skyline, beach and inlet from several decks and backyard patio. Pool, sunroom, elevator and several other amenities that will make your summer vacation one to remember!! Call to Book your Dream Vacation Right on the Beach!!!


text:
Man on scooter dies after being hit by truck in Jamaica, Queens
WABC
By Eyewitness News
JAMAICA, N.Y. (WABC) -- A man riding a motorized scooter died after he hit an open car door in Queens Monday afternoon.
The incident happened just after 1:30 p.m. near the intersection of Jamaica Avenue and 107th Street in Jamaica.
Police said the 62-year-old man riding the scooter ran into an open door of a parked BMW on Jamaica Avenue. He was thrown to the ground and struck by a Toyota Tundra.
The Tundra was driven by Saul Herrera of Woodhaven. He was arrested on an open warrant unrelated to the scooter crash.
The man on the scooter was taken to Jamaica Hospital in critical condition, where he died a short time later.
Here's a look at that intersection where it happened, via Google Maps Street View:
trafficjamaica (qn12)new york citypedestrian struckpedestrian injuredaccident
Copyright © 2019 WABC-TV. All Rights Reserved.


Search for entertainers in Boxborough, Massachusetts to find unique entertainment for your party. Keeping guests entertained is key to hosting a fabulous party. As expected, Boxborough entertainers will vary depending on the type of event. For example, you might want a party clown for a kid's birthday or a magic show for a corporate party.
There's definitely no shortage of unique and talented B...Read moreSearch for entertainers in Boxborough, Massachusetts to find unique entertainment for your party. Keeping guests entertained is key to hosting a fabulous party. As expected, Boxborough entertainers will vary depending on the type of event. For example, you might want a party clown for a kid's birthday or a magic show for a corporate party.
There's definitely no shortage of unique and talented Boxborough, Massachusetts entertainers to meet your event needs. If you're hosting a children's party, you might want to consider clowns or jugglers. Kids also enjoy activities like a petting zoo, face painting, and balloon animals. Magicians are also extremely popular with kids as well as adults. No matter how many times we've seen the same tricks, we can never figure out how they work!
A talented and skilled entertainer in Boxborough can also amuse a group of adults. Consider performers such as comedians, mimes, or a ventriloquist. Another option for adults is a hypnotist. The number of hypnotists hired for events has grown over the last few years. One reason is that hypnosis involves audience participation so everyone can get involved! Search our Boxborough entertainer listings to find professionals in your area.
Looking for a fun idea to Celebrate your girls birthday princess / Princess & SPA Parties/ Manicure, mini hair Salon . Lots sparkles We are the spa that comes to you!
This talented band of musicians and singers has a varied, intriguing repertoire of 18th and 19th Century material from period commemorative, tavern/drinking, romantic ballads, sea shanties, children's ...Read moreThis talented band of musicians and singers has a varied, intriguing repertoire of 18th and 19th Century material from period commemorative, tavern/drinking, romantic ballads, sea shanties, children's ditties, Irish tunes and songs.
Included among the songs are those which invite listening (instrumentals), clapping and foot tapping or singing along with a solo or harmonic melody. Others may invoke a melancholy mood.
Among the titles will be found Rosin the Beau, Lizzie Lindsay, The Wild Colonial Boy, All for Me Grog, Raggle Taggle Gypsy, Star of the County Down, The Parting Glass, Rattlin Bog, Boston Harbor Shanty, Staten Island Hornpipe, I'll Tell Me Ma, Leaving of Liverpool, Whiskey is the Life of Man, Finnegans Wake, Harvest Home, Mermaid, Boys of Blue Hill, The Butcher Boy, Three Jolly Coachmen, Maid of Amsterdam, Irish Rover, Grand to be Bloody Well Dead, Haste to the Wedding, Lark in the Clear Air, Dawing of the Day, Mairi's Wedding, Si Bheag Si Mhor, and Soldier's Joy to name a few.
The Boston Rovers are carving out a unique niche in local musical entertainment. Call (508) 574-3104 for more information!
New England's premier source for your Wedding or Special Event.
Celebrity Look-alikes: Michael Jackson, Barbra Streisand, Elvis, Sinatra, Tony Bennett, Deano, Rod Stewart, Neil Diamond, Bruce Springsteen, Joan Rivers, Jack Nicholson, Bono, Parish Hilton, Austin Powers, Mr T, Charlie Chaplin, Pavarotti, Marilyn Monroe, Lady Gaga, Madonna, Tom Cruise , Johnny Depp, Captain Jack Sparrow, Dolly Parton, and many more..
Kids and Teen Disc Jockey's, Karaoke,Comedians, Caricature Artists, Psychics, Tarot Card Readers, Magicians, Hypnotists,Casinos,Carnival Acts, Clowns,Mimes, Jugglers, Balloon Twisters, Air Brush Tattoos, Face Painters, Stilt Walkers, Balloons & Singing Telegrams and full Balloon Decorating Services.
Specialties: Top 40 Bands, Ethnic World Music: Arabic, Greek, Armenian and Turkish, Persian Ensembles, Steel Bands, Acappella Groups, Irish Bands, Umpa/Bravarian Bands, Italian Bands, Bag Pippers, Marching Bands Latin/Salsa Dancers, Dance like an Egyptian Belly Dancers, Hawaiian and Polynesian Dancers, Irish Step Dancers, Rock 'n Roll / Swing Dancers.
CHILDREN's division offers Princess and Pirate Parties, Spiderman, Batman, many Superheros and popular Cartoon Characters.
Holiday characters: Santa, Rudolph, Magical Elves, Leprechauns, Easter Bunny, Uncle Sam, Thanksgiving Turkey and many more.
Locomotion can also provide wireless led up-lighting for your special event. Inquire now!


text:
Your Most Embarrassing Period Questions — Answered!
We asked, so you don't have to.
By Kara Wahlgren
Obviously periods are a normal part of life and nothing to be embarrassed about. After all, half the population deals with pretty much the same exact thing at some point. But we totally get that there are certain questions you may feel awkward talking about, even with your bestie or your doctor —so we asked two obgyns to tackle your worries.
How much blood is too much blood?
If you have a heavy flow, it may feel like you're losing half your blood supply, but it's probably more like four to 12 teaspoons per cycle. No need to break out the measuring spoons — if you're changing your pad or tampon every few hours, and your period only lasts a few days, you're probably somewhere in that zone. "It really comes down to whether it interferes with your daily activity," says Sarah Yamaguchi, OB/GYN at Good Samaritan Hospital in Los Angeles. If you're soaking through a pad or tampon every hour, or you still have a moderate flow after seven days or more, give your doctor a call.
Why is the blood brown sometimes?
The hue depends on how heavy your flow is. "It can take time for the blood to pass out of the uterus, through the cervix, and out the vagina," Dr. Yamaguchi says. "Red blood is fresher, but as time passes, it will turn a darker color." So as you get into your slower-flow days, your blood is more likely to be brownish.
Why do I have to poop so often when I have my period?
As if cramps don't suck enough, it's not unusual to deal with diarrhea during that time of the month. "Gastrointestinal havoc is common during your menstrual cycle," says Sherry Ross, MD, an OB/GYN and Women's Health Expert at Providence Saint John's Health Center in Santa Monica, CA. The reason? Prostaglandins — the same chemicals that trigger cramps — can also cause your intestines to contract, giving you that gotta-go-now feeling.
If my flow is light, can I just wear a super tampon all day so I don't have to deal with changing it?
Nope. "Even if you have a light day and less blood flow, you still need to change your tampon every four to eight hours," Dr. Ross says. Leaving your tampon in too long, or using a higher absorbency than you really need, can increase your risk for toxic shock syndrome (TSS), a rare but life-threatening condition caused by bacterial infection. Doctors think it's because super-absorbent tampons, when they're still mostly dry, can cause tiny tears in the skin inside your vagina when removed, making it easier for bacteria to get into your bloodstream.
Is it humanly possible to change a menstrual cup in a public bathroom without making a bloody mess?
Menstrual cups are getting more popular, but they definitely require a hands-on approach, which can be tricky in a public bathroom stall. The key is to plan ahead and pack supplies: "You can carry some baby wipes in your purse and use them to clean it," Dr. Yamaguchi says. "Or you can carry a small bottle with you, fill it with water from the sink before you go into the stall, and then rinse the cup over the toilet." Too complicated? You can always switch to a pad or tampon when you're going out.
What is up with the blood clots?
Breathe easy — those blobs are gross, but you definitely don't need to panic. When you have your period, you body usually releases anticoagulants to keep things slowing smoothly. Sometimes your flow is too heavy for those anticoagulants to keep up, and voilà, you get chunks of blood. "Small clots the size of raisins are usually nothing to worry about," Dr. Ross says. If you get a clot bigger than a quarter, let your gyno know. But seriously, don't freak out — clots are rarely a sign of anything major.
Can I lose a tampon inside of me?
Yes and no. While it's possible to push a tampon out of reach or forget you're wearing one in the first place, it's never really lost, because it can't get past your cervix. So even if you can't feel it, it's in there somewhere. "With some gentle exploration, the tampon can be found," Dr. Yamaguchi says. "If you can't find it — or you're having pain, abnormal discharge, fever, or you're just not sure if you got all of it — contact your gynecologist for an appointment."
From: Seventeen
Kara Wahlgren Kara Wahlgren is a New Jersey-based freelance writer specializing in health, entertainment, and personal finance.
The Best Diets of 2021
These 30-Minute Workouts Bring the Gym to You
How to Eat Dessert Every Day and Still Be Healthy
10 Delicious Fruits for Diabetics
12 Expert Tips to Optimize Muscle Recovery
The Ultimate Guide to At-Home Fitness
How to Stop Your Mask From Fogging Your Glasses
Everything to Know About the New Weight Watchers
10 Nutritionist-Approved Snacks
9 Embarrassing Period Questions You're Afraid to Ask Your Gyno — Answered!
The Long and Interesting History of Periods
10 Embarrassing Beauty Questions, Answered
9 Common iPhone Questions — Answered!
Summer Skin Questions, Answered
Summer Hair Questions


The Fire / Arson Investigation Unit is responsible for investigating fires to determine the cause and origin of fires within the township. The Unit works cooperatively with the Bensalem Police Department (Criminal Investigation Division), in addition to the Bucks County DA's Office, PA State Police (FM Unit), Philadelphia Fire Marshal's Office, and the ATF to achieve the goal of preventing injuries and property damage as a result of fires, and reducing the crime of arson in our community.
Battalion Chief Robert Sponheimer, the lead fire investigator is a Certified Fire Investigator and has the responsibility of determining cause and origin fires, he is assisted by Firefighter Nicholas Altomare and Firefighter Nicholas Weaver. The Fire Investigation Unit conducts systematic, thorough and professional investigations.
• Incendiary (Arson): fires that are intentionally set under circumstances in which the person knows that the fire should not be ignited.
• Undetermined: fires where the cause cannot or hasn't been proven, the fire might still be under investigation, and the cause may be determined later.
• Natural: involve fires caused without direct human intervention, such as lightning, earthquake, wind, etc.
If the Fire Investigator determines the cause is incendiary in nature (arson) a Detective from the Bensalem Police Departments Criminal Investigation Division is assigned to the investigation. Fire Investigator(s) and Detective(s) work jointly to conduct the criminal investigation. A detective is also assigned to any fire with a major monetary loss, injuries or fatalities.