Skip to content

Update to latest psoc6csp #11516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion targets/TARGET_Cypress/TARGET_PSOC6/cy_analogout_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void analogout_write_u16(dac_t *obj, uint16_t value)

float analogout_read(dac_t *obj)
{
return analogout_read_u16(obj) / UINT16_MAX;
return analogout_read_u16(obj) * (1.0f / UINT16_MAX);
}

uint16_t analogout_read_u16(dac_t *obj)
Expand Down
24 changes: 0 additions & 24 deletions targets/TARGET_Cypress/TARGET_PSOC6/psoc6csp/README.md

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@
* limitations under the License.
*******************************************************************************/

/**
* \addtogroup group_abstraction_resource Resource abstraction
* \ingroup group_abstraction
* \{
* Basic abstraction layer for dealing with resources.
*
* \defgroup group_abstraction_resource_macros Macros
* \defgroup group_abstraction_resource_enums Enums
* \defgroup group_abstraction_resource_data_structures Data Structures
* \defgroup group_abstraction_resource_functions Functions
*/

#pragma once

#include <stdint.h>
Expand All @@ -44,10 +32,12 @@
extern "C" {
#endif

/**
* \addtogroup group_abstraction_resource_macros
* \{
*/
/**
* \addtogroup group_abstraction_resource Resource Abstraction
* \{
*
* Basic abstraction layer for dealing with resources.
*/

/** Error code for when the specified resource operation is not valid. */
#define CY_RSLT_RSC_ERROR_UNSUPPORTED (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_RESOURCE, 0))
Expand All @@ -62,13 +52,6 @@ extern "C" {
/** Error code for when the specified resource can not be read. */
#define CY_RSLT_RSC_ERROR_READ (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_RESOURCE, 5))

/** \} group_abstraction_resource_macros */


/**
* \addtogroup group_abstraction_resource_enums
* \{
*/
/** Different types of memory that the resources can be stored in. */
typedef enum
{
Expand All @@ -77,15 +60,7 @@ typedef enum
CY_RESOURCE_IN_EXTERNAL_STORAGE /**< resource location in external storage */
} cy_resource_location_t;

/** \} group_abstraction_resource_enums */


/**
* \addtogroup group_abstraction_resource_data_structures
* \{
*/

/** Filesystem handle */
/** Filesystem handle */
typedef struct
{
unsigned long offset; /**< Offset to the start of the resource */
Expand All @@ -99,19 +74,12 @@ typedef struct
unsigned long size; /**< resource size */
union
{
cy_filesystem_resource_handle_t fs; /** < filesystem resource handle */
const uint8_t* mem_data; /** < memory resource handle */
void* external_storage_context; /** < external storage context */
} val;
cy_filesystem_resource_handle_t fs; /**< handle for resource in filesystem */
const uint8_t* mem_data; /**< handle for resource in internal memory */
void* external_storage_context; /**< handle for resource in external storage */
} val; /**< low-level handle (type varies depending on resource storage location) */
} cy_resource_handle_t;

/** \} group_abstraction_resource_data_structures */

/**
* \addtogroup group_abstraction_resource_functions
* \{
*/

/**
* \brief return the block size for the resource
* \param handle handle to a resource
Expand Down Expand Up @@ -147,16 +115,15 @@ cy_rslt_t cy_resource_get_block_count(const cy_resource_handle_t *handle, uint32
cy_rslt_t cy_resource_read(const cy_resource_handle_t *handle, uint32_t blockno, uint8_t **buffer, uint32_t *size);

/**
* \brief optimized version of read for resources stored in memory (\see CY_RESOURCE_IN_MEMORY)
* \brief optimized version of read for resources stored in memory
* \see CY_RESOURCE_IN_MEMORY
* \param handle the handle to the resource
* \param buffer pointer to receive buffer address from resource. This does NOT need to be freed.
* \param size location to receive the size of the block read
* \returns CY_RSLT_SUCCESS if data read, otherwise an error
*/
cy_rslt_t cy_resource_readonly_memory(const cy_resource_handle_t *handle, const uint8_t **buffer, uint32_t *size);

/** \} group_abstraction_resource_functions */

#if defined(__cplusplus)
}
#endif
Expand Down
Loading